fix(health): fsck survives approved DELETE and GOAL proposals - #724
Open
kurosawareiji7007-hub wants to merge 2 commits into
Open
fix(health): fsck survives approved DELETE and GOAL proposals#724kurosawareiji7007-hub wants to merge 2 commits into
kurosawareiji7007-hub wants to merge 2 commits into
Conversation
presence was keyed on four create kinds, so any KB that had approved a delete or a goal crashed vouch fsck with KeyError. Handle DELETE against target_kind (and skip legitimately removed ids on the create pass), treat GOAL as a create kind, and pin exhaustiveness to ProposalKind in tests. Fixes vouchdev#682
drop the unreachable decided_unknown_kind branch (exhaustiveness test guards enum drift) and hit the second-pass decided_no_artifact_id path so diff-coverage stays at 100%.
Contributor
Author
|
Maintainer note: this is a correctness bugfix. If it looks right, a |
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.
Summary
_check_decided_proposalscrashedvouch fsckwithKeyErroron any approvedDELETEorGOALproposal —presenceonly keyed the four older create kinds.target_kind(absent = ok; still present / invalid kind = Finding); legitimately deleted ids are skipped on the create pass so the original approve does not false-positive asdecided_missing_artifact.list_goals()). Exhaustiveness test ties_ARTIFACT_PROPOSAL_KINDS | {DELETE}toProposalKindso a seventh member fails the suite instead of users.Addresses the review that closed #683 (GOAL gap + exhaustiveness). Fixes #682.
Test plan
uv run pytest tests/test_health.py -q(29 passed)