Skip to content

formal: kit v2.1 (stale mutant patch check) - #13

Merged
zachyking merged 1 commit into
mainfrom
formal/p3-kit21
Oct 10, 2026
Merged

zachyking merged 1 commit into
mainfrom
formal/p3-kit21

Conversation

@zachyking

Copy link
Copy Markdown
Member

Problem

govder nightly 38054717665 failed: a full-tier mutant no longer applied after govder#20 changed internal/enforce/kill.go, and full-tier mutants only run nightly, so the PR that made it stale went green.

Fix / Proof

Kit v2.1 vendored byte-identical (scripts/formal/ from plans/formal-02/kit): check_claims now runs git apply --check for EVERY registered mutant patch against the current tree (no build), so a patch made stale by a source change fails formal-fast on the PR that changes it, not in the nightly. KIT_VERSION = "2.1". Inside check_mutants the tree is deliberately mutated, so it sets FORMAL_KIT_MUTATED_TREE=1 and the check is skipped there (the runner already proved the patch applied).
No claims or patches changed (every averin patch applies).

Red-first / bite evidence

Kit unit tests added first for the stale-patch check (stale patch fails with a regenerate hint, shared patch checked once, mutated-tree env skips); the check flagged the two genuinely stale patches below on origin/main content (govder e2e-kill-reports-contained-without-effect, vultrino policy-write-warned-prompt-accepted).

Gates run

Kit unit tests (python3 -m unittest discover -s scripts/formal/tests, 103 pass), check_claims on this tree. averin kit-claims.json: 264 checks, 0 failures.

What this does NOT establish

Only that each patch APPLIES (no build, no kill): a patch that applies but no longer compiles or is no longer semantic is still caught only by the mutant run. Merge order: kit consumers, any order.

@zachyking
zachyking merged commit 8a2880a into main Oct 10, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant