fix(gates): restore the round-2 checker β #1375's squash landed the doc but a STALE copy of its instrument - #1422
Merged
Merged
Conversation
β¦oc but a STALE copy of its instrument #1375 merged with the document at its round-2 content and `scripts/check-gate-inventory.py` at its round-1 content. Measured on origin/main: the doc is byte-identical to the branch tip, the checker is 166 lines against the branch's 286 and contains zero of the round-2 changes. Cause: the first `gh pr merge --squash --delete-branch` errored locally on `fatal: 'main' is already used by worktree`, but the API merge had already fired against the PR head as GitHub knew it, before the last push propagated. The local error read as "the merge did not happen"; it had, partially. The state that left on main is worse than either version alone: the document declares `<!-- inventory-rows: 81 -->` and `<!-- inventory-tally: β¦ -->`, and the checker beside it does not read either marker β so the document asserts it is machine-checked while nothing checks it. It also reinstated all three defects an audit had found in that script: * the scoping control was VACUOUS β its fixture had no `## 3.` line, so `in_scope` was False from the first line regardless of the SECTION_END branch it claimed to cover. Deleting that branch left the self-test fully green. The round-2 fixture opens the scope first; mutation-checked, the control now fails with ITS OWN error when the branch is deleted. * evidence acceptance was VOCABULARY, not evidence β the bare word `CONFIRMED` and a bare `ΓN` count both passed. Replacing all 81 evidence cells with `CONFIRMED` yielded RESULT: PASS. It now requires a lookup-able identifier (UUID session id, `agent-<12+ hex>`, a >=7-hex sha in backticks, or `#<digits>`); the same control now fails all 81 rows. * the zero-row guard was narrower than its docstring β a document truncated to ONE row passed. It now cross-checks the row count AND the verdict tally against the document's own markers, and exits 2 when either is missing. Verified on this tree (origin/main + this one file): --self-test all 9 controls pass vs the doc ON main rows checked: 81 (declared: 81) problems: 0 No document change: the doc already on main is the correct round-2 text. This is the instrument catching up to it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXxTANDijZTVxj398NrWBU Claude-Session-Id: 45e79797-ec0e-45c7-ad21-5d623afb297b
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.
Follow-up to #1375, which merged partially.
Measured on
origin/mainafter that merge:claudedocs/gate-inventory-2026-09-08.mdis byte-identical to the branch tip βscripts/check-gate-inventory.pyis 166 lines against the branch's 286, and containszero of the round-2 changes β
Cause, recorded because the failure mode is easy to repeat: the first
gh pr merge --squash --delete-brancherrored locally withfatal: 'main' is already used by worktree at 'β¦'β but the API merge had already firedagainst the PR head as GitHub knew it, before the last push propagated. The local error read as
"the merge did not happen". It had, partially.
π΄ The state that left on
mainis worse than either version alone: the document declares<!-- inventory-rows: 81 -->and<!-- inventory-tally: KEEP=51 TIER=30 DROP=0 -->, and thechecker sitting beside it reads neither marker β so the document asserts it is machine-checked
while nothing checks it. It also reinstated all three defects an adversarial audit had found:
## 3.line, soin_scopewasFalsefrom the first line regardless of theSECTION_ENDbranch it claimed to cover.Deleting that branch left the self-test fully green. The round-2 fixture opens the scope
first β mutation-checked: with the branch deleted the control now fails with its own
error (
rows=2, problems=1), i.e. it is reachable.CONFIRMEDand a bareΓNcount both passed. Decisive control: replacing all 81 evidence cells withCONFIRMEDyielded
RESULT: PASS. It now requires a lookup-able identifier β a UUID session id,agent-<12+ hex>, a β₯7-hex sha in backticks, or#<digits>. The same control now fails all81 rows.
not certify an empty table. A document truncated to one row passed. It now cross-checks
the row count and the verdict tally against the document's own markers, and exits 2 when
either marker is missing β absent expectation means cannot-vouch, never a pass.
No document change. The doc already on
mainis the correct round-2 text; this is theinstrument catching up to it.
Verification
Both tiers, on this tree (
origin/main5b564844+ this one file):scripts/gate.sh --tier bothGATE: RESULT=PASS exit=0β pytest 21,127 collected / 21,125 passed / 2 skipped / 0 failed (floor 20,342); node 1,449/1,449; 43 PASS targets, 0 FAIL, 0 timeout panicsnix build .#checks.x86_64-linux.pytestsrc=0, real streaming build, valid store outputnix build .#checks.x86_64-linux.nodetestsrc=0, valid store outputcheck-gate-inventory.py --self-testrows checked: 81 (declared: 81) problems: 0Sandbox derivations built one at a time; store-output validity is the check, since a failing
derivation produces no output path.
β One earlier gate run on this branch failed and it was my own contamination, not this change.
test_no_predictable_tmp_path_is_live_while_the_verifier_runstripped on 29 stale/tmp/nebula-relay-pre.<pid>files left by my earlier runs against the pre-#1407 nebula code.All 29 PIDs were dead; removed after re-checking liveness immediately before each delete. Current
maindoes not leak them β the file now runs 30/30 twice with zero leftovers. Reporting itbecause "the gate failed once" would otherwise read as a red suite.
π€ Generated with Claude Code
https://claude.ai/code/session_01HXxTANDijZTVxj398NrWBU