gates: every gate script with a verdict trap fails through it - six sibling gates repaired, 66 pre-empting exits removed, the ratchet widened by shape (the #802 class) - #818
Merged
Conversation
PR #805 fixed the AF_UNIX/absolute-path preflights in run-x86-prod-profile-boot-test.sh so a rejection routes through report_gate_failure instead of a bare `exit`, and disclosed that six sibling scripts carrying the identical report_gate_failure/ERR-trap architecture were left with the pre-#805 shape: run-x86-boot-tests.sh, run-x86-tty-oracle-gate.sh, run-aarch64-tty-oracle-gate.sh, run-fs-fault-gate.sh, run-ext2-lock-race-gate.sh, and run-coreproof-gate.sh. This applies the same idiom to each of them. Two had the exact #802 shape: run-x86-boot-tests.sh's BREENIX_GATE_TMP absolute-path check and run-x86-tty-oracle-gate.sh's absolute-path + AF_UNIX sun_path checks moved to a BASE-DIR PREFLIGHT block right after their ERR traps, echo + bare `false` instead of `exit 1`. run-fs-fault-gate.sh and run-ext2-lock-race-gate.sh had the same absolute-path check running before their traps even existed; both traps and their `redden`/`fail` helpers moved earlier so the check runs armed. run-coreproof-gate.sh had no BREENIX_GATE_TMP check but ran its entire argument-parsing and validation block before its trap installed; the trap, cleanup, and a new `redden()` helper moved to install first. run-aarch64-tty-oracle-gate.sh had no BREENIX_GATE_TMP check either; its argument-parsing exits were already past its trap and only needed converting to `false`. Every other bare `exit` in the six scripts converts the same way: case-arm and `||`-group exits to `false`, and each script's own `fail()`-style helper (where one exists) to `false` so a call already routes through the trap that is already installed. run-ext2-lock-race-gate.sh's `--park-only` mode is the one case with three deliberately distinct process exit codes (0/1/2, review finding F10); its five-branch cascade is now if/elif so the success case (PARK OBSERVED) falls through with no `exit`, and the two FAIL-shaped branches call a new `redden N` helper (`return N` inside a function, which fires the ERR trap with $?=N the same way a failing command would, without an `exit` statement) so their distinct codes survive. run-coreproof-gate.sh's five usage-error sites (previously exit 2) use the same `redden 2` pattern. run-fs-fault-gate.sh's two `exit 0` success paths (armed vs. --disarm) merge into one if/else so both converge without an early exit, matching run-x86-prod-profile-boot-test.sh's own PASS path (falls off the end). tests/teardown_structure.rs gains a generalized, content-derived version of validate_x86_prod_profile_harness's own no-pre-empting-exit scan: has_report_gate_failure_verdict_trap() finds each script under docker/qemu/ and scripts/ that defines a report_gate_failure() function and arms it on ERR (a census, not a file list -- #549/#551/#527-r1 precedent), and verdict_trap_has_no_preempting_exit() applies the same "no exit statement other than the trap's own re-raise" rule to each, deriving the re-raise variable from each script's own `local <name>=$?` opener rather than hardcoding "exit_code". Two new tests: gate_scripts_with_verdict_trap_have_no_preempting_exits (the ratchet itself, with a >=7 anti-vacuity floor on the census) and verdict_trap_no_preempting_exit_rule_is_not_vacuous (plants a standalone `exit 1` preflight on run-x86-tty-oracle-gate.sh in a scratch copy and checks the rule reddens by name, plus a second mutation on the re-raise-variable opener itself). Evidence: scripts/run-structure-tests.sh teardown_structure -> 85 passed / 0 failed (up from 83; the two new tests are in that count); the tests/*_structure.rs sweep -> 30 of 30 suites green, 564 cases, 0 failed. Full census, per-script disposition, run proofs (aarch64 on this Mac, x86 on beast) and simulated preflight failures are in docs/planning/green-program/gates/GATE-VERDICT-DISCIPLINE-2026-09-05.md, added in the next commit. claim-lint: scripts/claim-lint.py -> exit 0 claim-lint: scripts/claim-lint.py --commit-msg <this file> -> exit 0 Co-Authored-By: Ryan Breen <ryan.breen@gmail.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
…pairs Records the census that scoped the previous commit's repair (36 scripts grepped for verdict-line shapes, 7 found with the report_gate_failure/ERR-trap architecture, 6 of those 7 not yet carrying #805's idiom, 29 classified as a different verdict shape and left untouched), the per-script repair details, the widened Rust ratchet's design, and default-env + simulated-preflight- failure run proofs for each of the 6 repaired scripts: 4 on this Mac (aarch64), 2 on beast (x86, own clone /root/breenix-verdict). Also documents what those proofs do and do not establish -- this worktree's missing rust-fork/prebuilt-userspace gap and the read-only artifacts substituted for it on the aarch64 side, and the structure-test scanner's inherited first-token-of-line blind spot, caught live while writing this round's own anti-vacuity mutation and disclosed rather than silently worked around. Raw output for each of the 12 runs (6 scripts x 2 runs) is under docs/planning/green-program/gates/serials/verdict-widened-2026-09-05/. claim-lint: scripts/claim-lint.py -> exit 0 claim-lint: scripts/claim-lint.py --files <the doc> -> exit 0 claim-lint: scripts/claim-lint.py --commit-msg <this file> -> exit 0 Co-Authored-By: Ryan Breen <ryan.breen@gmail.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
…se the inline-exit scanner blind spot Two code-level findings from the widened-ratchet review (F2 blocking-shaped, F4 major), fixed together since both touch the same two files. F4: commit 5a5c1ce (this arc's own repair) silently converted run-fs-fault-gate.sh's two usage-error sites (`unknown argument`, `unknown shape`) from origin/main's `exit 2` straight to a bare `false`, collapsing them onto the generic `exit 1` gate-FAIL code -- the exact collision the widened-ratchet doc's own "Distinct exit codes" section argues must not happen, and which the same commit correctly avoided for run-ext2-lock-race-gate.sh (`redden 64`) and run-coreproof-gate.sh (`redden 2`). Fixed: run-fs-fault-gate.sh now defines its own `redden()` helper (same `return "$1"` shape as its siblings) immediately after its `trap ... ERR` line, and both usage-error sites call `redden 2`, restoring the pre-5a5c1ce4 contract. No caller in the tree checks this script's exit code today, so the collapse had no live consumer -- still an undisclosed contract change, now reverted. F2: `verdict_trap_has_no_preempting_exit` in tests/teardown_structure.rs only checked the first whitespace token of each raw line, so a case-arm exit (`*) echo "..."; exit 1 ;;`) or an `||`-guarded group's exit (`cmd || { echo "..."; exit 1; }`) reintroduced into any of the six repaired scripts would pass the gate silently -- confirmed by reverting two real repaired sites in run-aarch64-tty-oracle-gate.sh and getting a clean `ok` from the structure suite both times. Fixed: the rule now splits each non-comment line into individual statements on `;`, `&&`, and `||` before the leading-token check (`split_shell_statements`, quote-aware -- a separator inside a single- or double-quoted string is not treated as a boundary, which the first cut at this fix needed after it false-positived on run-coreproof-gate.sh's embedded `awk ... '$1 == required { print $2; exit }'`, where the `;` and the `exit` are AWK's own, not bash's). New test `verdict_trap_no_preempting_exit_rule_catches_inline_exit_shapes` reverts the same two real sites the review used and confirms the rule now reddens both, by name. Evidence: `scripts/run-structure-tests.sh teardown_structure verdict` -> 4 passed / 0 failed (the two pre-existing tests plus the new one, plus the unrelated x86-prod-profile test the name filter also matches); full `scripts/run-structure-tests.sh teardown_structure` -> 86 passed / 0 failed (85 before this round). Runtime check of the F4 fix, confirming `redden 2` fires as designed: `docker/qemu/run-fs-fault-gate.sh --bogus` and `--disarm bogus` both now exit 2 (were 1); `docker/qemu/run-fs-fault-gate.sh --disarm bogus` full output saved as docs/planning/green-program/gates/serials/verdict-widened-2026-09-05/fs-fault-badshape-fail.txt in the docs commit that follows this one. No kernel, userspace, or libs source changed. claim-lint: scripts/claim-lint.py -> exit 0 claim-lint: scripts/claim-lint.py --commit-msg <this file> -> exit 0 Co-Authored-By: Ryan Breen <ryan.breen@gmail.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
…ndercount the round-1 review found
F1 (BLOCKING): the doc's own "What is NOT claimed" section said "each of
the 6 repaired scripts places `exit`/`false`/`redden N` on its own line
specifically so the scanner *can* see it." False for 5 of 6 -- only
run-x86-boot-tests.sh has zero inline sites; the other five carry 16
between them (counted and line-numbered in the corrected text). That
sentence neutralized the blind-spot disclosure it followed. Corrected in
place, and paired with the fix (previous commit) that actually closes the
gap: `verdict_trap_has_no_preempting_exit` now splits each line into
statements on `;`/`&&`/`||` before the leading-token check.
F3 (MAJOR): the four aarch64 preflight-fail serials carried no host/SHA
provenance header, unlike the x86 pair. Added headers to 8 of 8 aarch64
serials (default-pass and preflight-fail). The finding's second half --
that these four "do not reproduce at HEAD" -- does not hold up: re-running
all four against this same worktree reproduces every one byte-for-byte,
including the exact line numbers already published, when the script is
invoked directly (its own shebang, the same way its callers and CI run
it). Traced the reviewer's discrepancy to a bash-version difference:
these scripts read `${BASH_LINENO[0]}` inside their ERR trap, and macOS's
system `/bin/bash` reports a different line for a `case` inside a loop
than a newer `bash` resolved from `$PATH` does (reproduced directly on a
minimal script sharing the shape) -- an explicit `bash script.sh` picks up
the different interpreter and produces the higher line number the review
reported.
F5 (MAJOR): commit 5a5c1ce's own message (immutable -- corrected here,
not by rewriting pushed history, per this project's own rule) contains
three statements the diff contradicts: two scripts' traps did not "move
earlier" (they moved by 0-1 lines; what actually moved was the *check*,
downward, to after the already-installed trap), run-x86-boot-tests.sh has
no "BASE-DIR PREFLIGHT" block at all, and run-coreproof-gate.sh has eight
usage-error sites, not five. 3 of 3 corrected in the doc, next to the
paragraphs they touch, with the actual git evidence (`git show
5a5c1ce:<script> | grep -n`) for each.
F6 (MAJOR): the doc's own census grep (`"PASS:`, `"FAIL:`, etc.) undercounts
scripts with a PASS/FAIL-shaped verdict by missing an `: PASS"` / `:
FAILED (` / `RATCHET: FAILED` phrasing 18 other scripts use, four of them
gate scripts this campaign's own scripts invoke as sub-checks. Corrected
the candidate-pool count (37, not 36 -- also an independent off-by-one in
the doc's own "22 scripts" ad-hoc sub-list, now 23) and disclosed the 18
missed scripts; checked all 18 directly for the `report_gate_failure`/
`ERR`-trap shape that decides scope -- 0 of 18 carry it, so the repair's
7-script answer is unaffected.
Also updates the doc's own text for the F4 fix (previous commit): the
"Distinct exit codes" section now covers run-fs-fault-gate.sh's `redden 2`
alongside ext2/coreproof's, the Run Proofs section's fs-fault-gate.sh
preflight-fail snippet is re-captured at its new line number (:93 -> :105,
shifted by F4's own `redden()` addition), and a new proof block shows
`--disarm bogus` exiting 2 (was 1) -- serial saved as
fs-fault-badshape-fail.txt.
Evidence: `python3 scripts/claim-lint.py --files
docs/planning/green-program/gates/GATE-VERDICT-DISCIPLINE-2026-09-05.md`
-> exit 0 (4 findings surfaced while drafting the corrections above, each
discharged with an N-of-M count or a resolving citation, not weakened
text). The corrected line numbers -- F1's 16, F3's 4, F5's 3 -- were
independently re-derived from the committed scripts at this branch's HEAD
(`grep -n`, or a direct re-run of the failing command), not copied from
the review's own numbers.
claim-lint: scripts/claim-lint.py -> exit 0
claim-lint: scripts/claim-lint.py --commit-msg <this file> -> exit 0
Co-Authored-By: Ryan Breen <ryan.breen@gmail.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
…ue positives, 5 false, and a stale 29-of-36 leftover to 30-of-37 The round-1 review left exactly one item open (F6): the doc's own correction of the census undercount claimed 18 missed scripts. Re-deriving that list directly (the three named phrasings plus the eight original census patterns, over the 91-script tree, then reading each of the 18 named files in full) finds only 13 true positives; the other 5 (scripts/parallels/build-efi.sh, collect-breenix-cpu0-traces.sh, collect-hwdump.sh, collect-linux-cpu0-traces.sh, screenshot-vm.sh) print no PASS/FAIL/verdict-shaped text at all -- zero hits on a broad pass|fail|verdict|success sweep of each file's full body, confirmed by reading each one directly. Corrected in place, doc's own strike-through convention, with the reason named for each excluded script. 0 of 13 carry the report_gate_failure+ERR-trap architecture that decides repair scope (the same null result the doc's own wrong 18-count, 0 of 18, already reported for its wrong superset), so the six-script repair is unaffected by the count either way. Also found and corrected, same file, same pass: a stale "29 of the 36" sentence left over from this doc's own earlier 36-to-37 census correction -- the itemized 23+7 breakdown two paragraphs below already summed to 30, matching 37-7, not 36-7. Both occurrences (the no-verdict- path paragraph and the "What is NOT claimed" bullet) now read 30 of 37. claim-lint: scripts/claim-lint.py --files docs/planning/green-program/gates/GATE-VERDICT-DISCIPLINE-2026-09-05.md -> exit 0
Pulls in PR #815 (aarch64 native-boot-test gate guard, review r157) from main; no file overlap with this branch's 7 gate scripts, doc, serials, or tests/teardown_structure.rs -- main's own changes this round touched docker/qemu/run-aarch64-boot-test-native.sh and tests/strand_handoff_structure.rs instead, so this merge carries no conflicts.
Full tests/*_structure.rs sweep: 30 of 30 suites green, 565 cases, 0 failed (run individually through scripts/run-structure-tests.sh, the same worktree workaround the earlier proofs used). scripts/test_claim_lint.py: 72 tests, OK, exit 0. aarch64 (this Mac): built via the mandated build-std invocation, clean, then scripts/check-kernel-no-neon.sh PASS; docker/qemu/run-aarch64-tty-oracle-gate.sh PASS on a default-env run and FAIL (exit 1) on a simulated bad-argument preflight. Prebuilt userspace ELFs and the ext2 disk were copied in from the main checkout (gitignored build products, no source changed on this branch), same as the earlier proofs' own documented workaround. x86 (beast, breenix-x86 container, /root/breenix-verdict at 8c87639): clean build first (cargo build --release --features boot_tests,testing,external_test_bins --bin qemu-uefi, 0 of 3 output lines matched ^(warning|error)), then docker/qemu/run-x86-boot-tests.sh 1 PASS on a default-env run and FAIL (exit 1) on a simulated relative-path BREENIX_GATE_TMP preflight. Host-load rule checked before each boot on both arches. git diff --stat origin/main..HEAD lists only this branch's own 21 files; 0 of 6 re-smoke checks produced an unattributed red. claim-lint: scripts/claim-lint.py --files docs/planning/green-program/gates/GATE-VERDICT-DISCIPLINE-2026-09-05.md -> exit 0
ryanbreen
added a commit
that referenced
this pull request
Sep 5, 2026
Brings in PR #818 (gates/verdict-discipline-widened): the six gate scripts run-x86-boot-tests.sh, run-aarch64-tty-oracle-gate.sh, run-coreproof-gate.sh, run-ext2-lock-race-gate.sh, run-fs-fault-gate.sh, and run-x86-tty-oracle-gate.sh now reject through their ERR-trap verdict path (echo + bare `false`) rather than a silent `exit`, and tests/teardown_structure.rs gained the matching verdict-trap shape tests. git auto-merged: 0 of 39 files touched across both sides landed with conflict markers, per `git status --short` after the merge. The two files this branch also touches -- docker/qemu/run-x86-boot-tests.sh and tests/teardown_structure.rs -- had disjoint hunks on each side: main's preflight-rejection and per-run FAIL-line idiom change landed alongside this branch's own FCNTL_PM_CONTENTION_ORACLE literal and gate-shape additions. Verified post-merge: all nine touched gate scripts pass `bash -n`, and run-x86-boot-tests.sh's preflight check still exits nonzero through the ERR-trap verdict line when given a relative BREENIX_GATE_TMP.
ryanbreen
added a commit
that referenced
this pull request
Sep 5, 2026
Adds a "Landing re-smoke" table for the merge with origin/main at aa7e0fd (PR #818's verdict-discipline widening): 31 of 31 tests/*_structure.rs suites green (567 cases), scripts/test_claim_lint.py exit 0, and PASS on 4 of 4 boot gates -- aarch64 strict and production, x86 boot-tests and production -- quoting the FCNTL_PM_CONTENTION_ORACLE lines each gate scores.
This was referenced Sep 5, 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.
Background
docker/qemu/run-x86-prod-profile-boot-test.shcarries a specific architecture:set -euo pipefail+set -E(errtrace), areport_gate_failure()functionarmed on the
ERRtrap, and a rule --tests/teardown_structure.rs'sx86_production_profile_gate_verdict_discipline_holds-- that noexitstatement may appear anywhere in the script other than the trap's own
re-raise (
exit "$exit_code"). #801 added twoBREENIX_GATE_TMPpreflightchecks to that script with a bare
exit 1, which reached before the trapexisted and could end the gate with no verdict line at all -- #802. #805
fixed it in that one script and disclosed the open question: whether each
sibling gate's own preflight should print its own FAIL line "is a judgement
about that gate's verdict model, not a red this branch is carrying." This PR
is that judgement, made uniformly, and the repair that follows from it.
Census
Grepped
docker/qemu/andscripts/for the verdict-line shapes named inthe task (
"PASS:,"FAIL:,PASS (,FAIL (,gate: (PASS|FAIL),gate run,verdict,BREENIX_GATE_TMP): 37 of the tree's 91.shfilesmatched.
That pattern set is itself an undercount: it misses any script phrased as
: PASS",: FAILED (, orRATCHET: FAILEDinstead of the exact shapesabove. Re-deriving that gap directly (the same phrasings, plus the eight
original patterns, over the 91 scripts, then reading each named file in
full) finds 13 true positives, not 18 as an earlier draft of this
branch's own doc claimed. 5 of that draft's 18 are false positives that
print no PASS/FAIL/verdict-shaped text at all -- zero hits on a
case-insensitive
pass|fail|verdict|successsweep of each file's fullbody -- 5 of 5
scripts/parallels/VM-manipulation utilities whose onlyexit Nstatements are argument/prerequisite validation, never acompletion verdict:
scripts/parallels/build-efi.sh(0 PASS/FAIL/verdict/successhits; its one sweep hit is a comment describing
newfs_msdos's ownlimitation, not this script's verdict),
scripts/parallels/collect-breenix-cpu0-traces.shand
scripts/parallels/collect-hwdump.sh(0 hits each; diagnosticcollectors, no completion verdict),
scripts/parallels/collect-linux-cpu0-traces.sh(0 verdict hits; the sweep's only hit is
VM_PASSWORD/VM_SUDO_PASSWORD, asubstring match on "pass" inside "password"), and
scripts/parallels/screenshot-vm.sh(0 hits). 5 excluded scripts total.
The other 13 are genuine (each prints a PASS/FAIL/SUCCESS/FAILURE-shaped
line and has at least one bare
exit N): 5 use coloredPASS:/FAIL:(
"${GREEN}PASS:${NC}", invisible to the literal"PASS:pattern because acolor-code variable sits between the opening quote and the word) --
scripts/check-kernel-no-neon.sh,scripts/check-x86-dispatch-no-alloc.sh,scripts/check-coreproof-production-clean.sh,scripts/check-fs-fault-production-clean.sh,scripts/check-coreproof-seams.sh-- and 8 use a differently-worded banner(
docker/qemu/run-dns-test.sh,docker/qemu/run-keyboard-test.sh,docker/qemu/run-kthread-test.sh,scripts/ci/ring3_check.sh,scripts/parallels/inject.sh,scripts/test_fork_mcp.sh,docker/qemu/run-blocking-recv-test.sh,scripts/run-arm64-keyboard-test.sh).0 of these 13 (the same null result the wrong 18-count already reported for
its wrong superset) carry the architecture that actually decides repair
scope, so this correction changes the doc's candidate-pool count, not the
repair's scope.
Grepping the 37 candidates for
report_gate_failure+ anERRtrap thatarms it -- the shape that actually decides scope -- found exactly 7, 7
of 7 under
docker/qemu/, 0 of 7 underscripts/:The remaining 30 of 37 are no-verdict-path: they print PASS/FAIL-shaped
text (or a bisect/probe-shaped verdict) through their own ad hoc means, with
no
report_gate_failure/ERR-trap backstop, so this idiom does not applyto them, and 0 of 30 were touched. Two sub-shapes: 23 scripts with an ad hoc
echo-then-exit sequence and no trap backstop (own retry loop or
classify-at-the-end shape), and 7 that are exit-code-primary, own text
diagnostic context rather than a PASS/FAIL banner. Retrofitting a
report_gate_failurearchitecture onto any of the 30 is a separate, largerchange with its own review.
Per-script disposition
run-x86-prod-profile-boot-test.shrun-x86-boot-tests.shexit 1(6 sites)run-x86-tty-oracle-gate.shsun_path+ 1 missing-disk + 10 in-loop (16 sites)run-aarch64-tty-oracle-gate.shBREENIX_GATE_TMPsupportrun-fs-fault-gate.shexit 2) + 1 build-warning +fail()helper + 2exit 0success paths (7 sites)run-ext2-lock-race-gate.shexit 64) + 1 build-warning +fail()helper + 5-branch--park-onlycascade + 1 finalexit 0(10 sites)run-coreproof-gate.shexit 2sites reached before its trap was installed + 1exit 1+ 1 finalexit 0(10 sites)6 + 16 + 17 + 7 + 10 + 10 = 66 pre-empting
exitstatements removedacross the six repaired scripts, verified directly against
origin/main(
git diff origin/main..HEAD -- <script> | grep -c '^-.*exit [0-9]'perfile); the four apparent "added
exit N" diff lines are 4 of 4 commenttext explaining the change, not code -- 0 new pre-empting exits were
introduced.
Two repair shapes. Where the trap was already installed before the
pre-empting exit, the bare
exit Nbecomes a barefalsein place --set -efires the already-armed trap, andreport_gate_failure's ownexit "$exit_code"re-raise is the oneexitstatement left. Where thepre-empting exit ran before the trap existed, the check itself moved
downward to just after the already-installed trap (in
run-coreproof-gate.sh, which had noBREENIX_GATE_TMPcheck to relocate,the trap install itself moved earlier instead). A third shape,
redden() { return "$1"; }, called as a plain statement (redden 2),preserves a script's own non-1 exit code (
run-ext2-lock-race-gate.sh's--park-only0/1/2 outcomes,run-coreproof-gate.sh'sexit 2usageerrors,
run-fs-fault-gate.sh's ownexit 2usage-error contract) throughthe trap without a bare
exitstatement at the call site -- verifieddirectly:
set -eE; trap 'echo TRAP_FIRED status=$?' ERR; f() { return 2; }; ffires the trap with$?= 2, while a bareexit 1under the same trapdoes not fire it at all (the entire premise #802 rests on).
The widened ratchet
tests/teardown_structure.rsgains a generalized version of the originalscan, derived by content rather than a hardcoded file list:
has_report_gate_failure_verdict_trap()(does the script define AND armthe trap),
report_gate_failure_status_variable()(reads each script's ownre-raise variable name rather than hardcoding one), and
verdict_trap_has_no_preempting_exit()-- the rule itself, nowstatement-aware: it splits each non-comment line on
;,&&,||(quote-aware, so an embedded
awk '... { print $2; exit }'isn'tmistaken for a statement boundary) and checks each statement's leading
token, not just the line's, so a case-arm
exit 1or an||-guarded group'sexit 1reddens the rule exactly like a standaloneexit 1line.Two legs:
gate_scripts_with_verdict_trap_have_no_preempting_exits(theratchet -- census the two directories, filter to the verdict-trap shape,
assert the rule on each,
>= 7anti-vacuity floor, free to grow) andverdict_trap_no_preempting_exit_rule_is_not_vacuous(mutation proof --planting a standalone
exit 1preflight, mirroring #802's own shape, on ascratch copy reddens the rule and names the planted line; deleting the
local exit_code=$?opener also reddens rather than silently passing).verdict_trap_no_preempting_exit_rule_catches_inline_exit_shapesextendsthe mutation proof to the two inline shapes the statement-splitting fix
added: reverting two real repaired sites to their pre-repair bare
exit 1(one in a case arm, one in an
||guard) confirms the rule reddens both,by name.
Run proofs, with provenance
Each of the 6 repaired scripts got one default-env run and one simulated
preflight failure at the repair commit (
5a5c1ce4); aarch64 on this Mac,x86 on beast (
breenix-x86Incus container, clone/root/breenix-verdict). 12 of 12 raw outputs are saved underdocs/planning/green-program/gates/serials/verdict-widened-2026-09-05/.A review round (r157) found and this branch fixed: a stale-serial
concern that turned out to be a genuine
bashversion difference (macOSsystem
/bin/bashvs. a newer$PATH-resolvedbashreport differentBASH_LINENO[0]for acaseinside a loop -- reproduced directly, notdismissed), a
run-fs-fault-gate.shusage-error regression where theinitial widening silently collapsed
exit 2onto the genericexit 1gate-FAIL code (fixed with its own
redden()), and several count/linecorrections to the doc's own prose, each disclosed with a strike-through
and a correction paragraph rather than silently edited.
Landing re-smoke, at the merged head (
git merge --no-ff origin/main,merge commit
8c87639a7069300c6498931d325a3cf0dad96f5b;git diff --stat origin/main..HEADlists only this branch's own files -- the 7 gatescripts, the doc, its serials, and
tests/teardown_structure.rs-- 0conflicts):
tests/*_structure.rssweep: 30 of 30 suites green, 565 cases, 0failed.
scripts/test_claim_lint.py: 72 tests, OK, exit 0.0 warnings),
scripts/check-kernel-no-neon.shPASS,run-aarch64-tty-oracle-gate.shPASS on a default-env run and exit-1FAIL on a simulated bad-argument preflight.
/root/breenix-verdictat8c87639a): clean build first(
cargo build --release --features boot_tests,testing,external_test_bins --bin qemu-uefi, 0 of 3 output lines matched^(warning|error)), thenrun-x86-boot-tests.sh 1PASS on a default-env run and FAIL (exit 1) ona simulated relative-path
BREENIX_GATE_TMPpreflight.pgrep -f qemu-system-<arch><= 2, one boot at a time)checked before each of the 4 gate invocations across both arches.
4 of 4 landing-round serials are saved under
docs/planning/green-program/gates/serials/verdict-widened-landing-2026-09-05/.What is NOT claimed
under
kernel/,userspace/, orlibs/changed on this branch. Theaarch64 default-env runs (both rounds) used a prebuilt ext2 disk and
userspace ELF set copied in from the main checkout rather than rebuilt in
the worktree (both gitignored build products, not repository content, and
no userspace/kernel source changed on this branch); the x86 runs on beast
built the kernel, userspace, and ext2 disk from source both times.
or free of their own defects. They were read only far enough to
classify them out of scope for this repair; 0 of the 30 were modified.
redden()'s exit-code preservation is exercised bythe widened Rust ratchet.
verdict_trap_has_no_preempting_exitchecksthe absence of a pre-empting
exitstatement; it does not itself executeany script or assert what code a
redden Ncall produces at runtime.That is checked separately, at runtime, by the
run-coreproof-gate.sh --component Zsimulated-preflight run (exit 2,not the
false-only fallback ofexit 1) and by the direct bashreproduction of the
redden N/TRAP status=2behavior.GitHub Actions CI;
scripts/run-structure-tests.shis the only way theseRust tests run today, same as the other 29 of 30
tests/*_structure.rsfiles.Plain references, not closing keywords: #802, #797, #805.