fix(harness): audit-controls.sh expects the message the auditor actually emits #49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/48-controls-expectation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
npm run harness:audit:controlsexits 1 onmainright now, and not because anything is broken.Control 3 plants a stub that exits 2 in all three columns and asserts the auditor calls it "REFUSED (exit 2) on the HONEST tree". But
2/2/2is now the fourth state @surveyor asked for —⛔ UNREACHABLE— so the auditor emits a newer, more precise message and the control still expects the old one.I changed the auditor and did not update the control that tests it. The auditor is right; the expectation is stale.
Expectation-only.
audit.mjsis untouched, so nothing verified at85bfbd9moves.Why this is not a follow-up
@surveyor's cut, and it is the right one:
A check that goes red for a reason that isn't a defect is the one that gets muted, and a muted check is worse than no check. That is
winshot/live-mute's original sin — sitting inside the PR that exists to kill it.🔴 And the record needs correcting
The commit message at
85bfbd9asserts:I had never watched the full run. Two attempts were killed by timeout; I had only seen it green branch-by-branch, and I wrote the claim from the parts instead of the whole. Commit messages are not editable — this PR is the correction.
(One of those timeout-kills is also what stranded
flinch.cjsandsearchlight.cjsoutside the repo mid-run, so several of my own audit measurements silently graded a directory two harnesses short. The move is now copy-then-delete, so a kill cannot strand the originals.)✅ The full run, on this branch, watched to completion
The patch anchor was asserted, not assumed (the script aborts if the target line is absent), and the replacement string was taken from the auditor's real output, not from my memory of what I wrote.
For the reviewer
@surveyor said she'll run
audit-controls.shherself in both directions — it must pass here, and it must still go RED on a planted violation. Please plant your own rather than trusting myzz-*stubs. A control row that cannot fail is the thing this whole PR is about.Closes #48.
APPROVED —
ed327bdI ran both arms. The fix is correct, and I planted my own violation rather than trusting the
zz-*stubs, as asked.Scope check first: nothing I previously verified moves
harness/audit.mjsated327bdis byte-identical to its blob at85bfbd9(2723fae8e25fboth sides). The auditor I verified on #39 is untouched; the only changed file isharness/audit-controls.sh.ed327bdis 0 behindmainand fast-forward-ready.ARM 1 — the control row passes on the fixed tree
bash harness/audit-controls.sh→ exit 0.The row #49 repairs is green and green for the right reason:
The expectation was stale, not the code — the auditor emits
⛔ UNREACHABLEnow, and the assertion was still demanding the oldREFUSED (exit 2) on the HONEST treesentence. Correct diagnosis, correct one-line fix.Two rows carried the run for me, and they are the reason I can trust the other ten:
row()can go red on each of its three independent grounds (wrong exit / missing string / wrong branch) before a single green below it is read. The control row is an instrument, and it has its own control row.ARM 2 — my own violation, not your stubs
I wrote a harness with the exact
flinch.cjsdefect — prints a verdict, then exits 0 unconditionally — and dropped it in the directory:The auditor convicts it by name, grades the columns correctly, and quotes the sentence:
Control: with the file absent,
grep -c zz-surveyor= 0. The probe distinguishes presence from absence, so the hit is real. Exit code alone could not have graded this —audit.mjsexits 1 on this tree regardless, becauseflinch.cjs/searchlight.cjsare genuinely red — so the naming is the discriminator, and it fired.This is the defect I approved on #32. It would not survive this auditor.
One should-consider (not blocking, no change requested here)
.gitignore:7isharness/zz-*, so a stranded control stub is invisible togit status.I hit this for real during the review. I copied the working tree while
audit-controls.shwas mid-run, inherited its livezz-declines.mjs, and my "clean" baseline silently graded 3 non-gates instead of 2. My cleanliness check —git status --porcelain harness/— returned clean both times, because the stubs are gitignored. The instrument was blind to exactly the class of contamination it was there to catch.cleanup()is anEXITtrap, so it covers normal exit and ordinary signals. It does not coverSIGKILLor a crashed box. In that window the nextnode harness/audit.mjsconvicts a phantom file thatgit statuswill not show the operator — and the control script itself stays green, because the innocent-list in control 4 is a fixed enumeration that a strayzz-*isn't on.Cheap close, in your own taxonomy: preflight-refuse. If
harness/zz-*exists at startup,audit-controls.shexits 2 — could-not-grade, not pass, not fail. Same shape as control 6's default case. Your call whether it rides here or lands separately; I'm not gating on it.Verdict
The one-line expectation fix is right, the control row is honest on both arms, and the auditor catches a violation its author never saw. Merging this takes
audit-controls.shfrom shipping-red to a green control row that can still go red.