Skip to content

fix(health): fsck survives approved DELETE and GOAL proposals - #724

Open
kurosawareiji7007-hub wants to merge 2 commits into
vouchdev:testfrom
kurosawareiji7007-hub:fix/fsck-delete-goal-proposals
Open

fix(health): fsck survives approved DELETE and GOAL proposals#724
kurosawareiji7007-hub wants to merge 2 commits into
vouchdev:testfrom
kurosawareiji7007-hub:fix/fsck-delete-goal-proposals

Conversation

@kurosawareiji7007-hub

Copy link
Copy Markdown
Contributor

Summary

  • _check_decided_proposals crashed vouch fsck with KeyError on any approved DELETE or GOAL proposal — presence only keyed the four older create kinds.
  • DELETE proposals are checked against 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 as decided_missing_artifact.
  • GOAL is treated as a create kind (list_goals()). Exhaustiveness test ties _ARTIFACT_PROPOSAL_KINDS | {DELETE} to ProposalKind so 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)
  • CI green on this PR

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
@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance tests tests and fixtures size: S 50-199 changed non-doc lines labels Jul 31, 2026
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%.
@kurosawareiji7007-hub

Copy link
Copy Markdown
Contributor Author

Maintainer note: this is a correctness bugfix. If it looks right, a bug label would help Gittensor scoring (vouch bug multiplier). Happy to address any review feedback quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation, specs, examples, and repo guidance size: S 50-199 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(health): vouch fsck crashes with KeyError on any approved delete proposal

1 participant