test(readme): the selftest numbers rot loudly, against the suites' own summaries
Order 20260905T053602Z-6743615726-from-.claude (.claude, 2026-09-05), asking for the check this repo recommended when it re-measured the README a run earlier. The badge and the five `## Development` comments rotted twice in a row - 529 carried from 0.25.0, then a badge saying 868 beside comments summing to 792, two different wrong sums of the same fact on the same screen - because nothing compared them to anything. It lives in tests/selftest.test.mjs, not in a bash suite, and the choice was measured rather than assumed. The order's parenthetical pointed at whichever suite already pins README/catalog invariants; no such suite exists - `grep -ln README scripts/*selftest*.sh` returns board-selftest.sh alone, on two incidental hits (a prose comment and a research/README.md fixture). This wrapper is the only place where all five numbers exist at once in a run that already happens. runSuite() captures each suite's own summary line, so the truth source is the line the suite prints. A check inside one suite could see its own total but would have to RE-RUN the other four - 212s sequentially, measured 2026-09-05 under /bin/bash 3.2 (coord 16, board 169, route 12, orders 5, guard 10) - and grepping `check` calls out of the scripts is both the second copy of the counting the order warned against and a wrong one, since those calls sit inside loops. Three properties are deliberate. The badge is compared against the MEASURED sum, never against the five README comments: a badge agreeing with five stale comments is the 868-beside-792 shape one layer down. A suite that stops printing a recognisable summary FAILS the check rather than being skipped - an absent measurement must not read as a matching one. And the check adds no bash check anywhere, so the five counts and the 893 badge are unchanged by its arrival, exactly as the order expects; a counted self-check would have had to compare against PASS+FAIL+1 and would break for whoever adds a check after it. Ground truth on this HEAD, run before anything was written: coord 257, board 393, route 73, orders 116, guard 54 = 893, 0 failed in all five - the README was already correct, so the red step is the mutation. Mutation-verified in both directions: 73 -> 74 on the route comment gives "README says route-selftest has 74 checks; it reported 73"; 893 -> 894 on the badge gives "README's badge says 894 selftest checks; the five suites reported 893"; restored, npm test is 12/12 green. Bounded gap, stated rather than closed: CLAUDE.md's own copies of the five counts are a second surface carrying the same numbers and are NOT checked. Measured and left alone - widening the check to it was not ordered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
9a154950eb
commit
a1ef1fb555
3 changed files with 127 additions and 8 deletions
|
|
@ -200,7 +200,7 @@ Note that raising the inbox's priority (Rule 7) deliberately does **not** widen
|
|||
bash scripts/route-selftest.sh # 73 checks, incl. the route->board round trip
|
||||
bash scripts/orders-selftest.sh # 116 checks, incl. the 20-way barriered claim race
|
||||
bash scripts/state-line-guard-selftest.sh # 54 checks, incl. the Edit replace_all projection and the ratchet
|
||||
npm test # all five selftests plus the hook tests, via node --test
|
||||
npm test # all five selftests, the hook tests, and the README-number check
|
||||
|
||||
TDD is the house rule: every behavior change lands with a failing selftest check first.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue