Health v2: Snapshot v2 (v2 signal in the snapshot format) - #80
Merged
Conversation
…es, v2 diff fragment The snapshot format gains a v2 shape (old v1 snapshots still load). - fleet/health.py: ProjectHealth gains a defaulted health_v2: str | None = None field (last position, so existing keyword constructions stay valid). - fleet/snapshot.py: save_snapshot(healths, path, git_states=None) computes each row's health_v2 via classify_health_v2(days, last_outcome, git_state) when git_states is provided; _health_to_dict/_health_from_dict round-trip health_v2 (an old v1 snapshot without the key loads with health_v2=None); _field_changes surfaces a health_v2 <a>-><b> fragment (- for None) via _fmt_v2, appended after the v1 health fragment. - fleet/cli.py: _cmd_snapshot passes git_states=_git_states(root) so a saved snapshot carries the v2 class. - tests/test_snapshot.py: +7 v2 tests (round-trip, none-without-git, old-v1-loads, diff v2 change/unchanged/none-to-set, canary classes). - tests/test_cli.py: snapshot-then-diff now surfaces health_v2 <class>->- transitions. Tickets: TICKET-068..072. Closes #75 #76 #77 #78 #79.
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The snapshot format gains a v2 shape; old v1 snapshots still load.
Gate: pytest 153 passed, ruff clean, mypy clean.
Closes #75 #76 #77 #78 #79