Repository navigation
test: the runner's ledger-gate refusal points at the gate's reason instead of naming one (#1341) - #1541
Conversation
…stead of naming one (#1341) The gate's rc=1 has several causes: a check the ledger has never seen, a census that disagrees, coverage over the ceiling, or a ceiling raised against the prior. run_all_versions.sh printed "has a check the ledger has never seen" for all of them. On #1537's CI that sentence sat under a ceiling rise and the gate's own "new this run=0", which sends the reader after an unseen check that does not exist. The rc=1 sentence now says the gate refused, points at the gate's own line, and gives the repair for each kind: regenerate the ledger for an unseen check, restate the budget for a census, coverage or ceiling line. The rc=2 sentence is unchanged. Selftest part 410 and test_mutation_ledger.py both gain "a refusal does not name one cause for all of them". On the old runner it is red in both (got 1 want 0); with the new sentence it is green. The existing "a refusal keeps the regenerate-the-ledger wording" now counts "regenerate the". harness_selftest passes 1248 on each of 15-19. Ledger: one row, never (the runner is the harness, so the red dates nothing); census 3091 -> 3092. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdatcmd
left a comment
There was a problem hiding this comment.
Approved at 055f001e. Measured on PG17:
- Green:
harness_selftestrc=0, 1248 passed;test_mutation_ledger.py44 passed. - The new check fails on its own. With your new rc=1 lines kept and the old sentence added back beside them,
regenerate thestill matches. Both twins then fail exactlya refusal does not name one cause for all of them(self-test 1247 + 1, pytestgot 1 want 0) and nothing else. - Ledger: 4500 rows, 3092 never and 1408 dated, matching the budget (3092, ceiling 181);
LC_ALL=Csorted.
One correction to the description (non-blocking): with the runner fully reverted to main, I get two self-test failures, not one:
FAIL a refusal keeps the regenerate-the-ledger wording: got [0] want [1]
FAIL a refusal does not name one cause for all of them: got [1] want [0]
Main's runner has no regenerate the: its rc=2 arm says "regenerating the". In pytest, only a refusal keeps the regenerate-the-ledger wording fails, because it comes first in the test and stops it. The run above is the one that shows the new check alone.
And a correction of my own. On #1537 I read the runner's "PG17 has a check the ledger has never seen" as a second, real cause, and explained it as the 7 missing hardening rows. The gate's own line said new this run=0. The ceiling rise was the only cause, and that sentence is exactly what this PR removes.
I'll merge once CI is green.
🤖 Generated with Claude Code
|
@OffgridwithJD Merging now: approved at 🤖 Generated with Claude Code |
For #1341: the follow-up from #1537. When the ledger gate returns rc=1,
run_all_versions.shprinted "has a check the ledger has never seen", but rc=1 has four causes:On #1537's CI the gate refused a ceiling rise, and the runner's sentence sat under the gate's own
new this run=0, which sends the reader after an unseen check that doesn't exist.What changes
test/run_all_versions.sh) now reads:test_mutation_ledger.pyboth gain a refusal does not name one cause for all of them. Both extract the runner's status block (comments stripped) and count the old sentence. The existing a refusal keeps the regenerate-the-ledger wording now countsregenerate the, which can't match the rc=2 arm's "regenerating the".Measured
harness_selftestPG17 gives rc=1 with one failure,FAIL a refusal does not name one cause for all of them: got [1] want [0], andtest_mutation_ledger.pygivesAssertionError: a refusal does not name one cause for all of them: got 1 want 0.harness_selftestgives rc=0 with 1248 PASS (one more than main's 1247) on each of PG15, 16, 17, 18 and 19.test_mutation_ledger.py: 44 passed.pgc_ledger.py mergefrom those five logs adds exactly one row:harness_selftest / 410 / a refusal does not name one cause for all of them / 15;16;17;18;19 / never. The runner is the harness, so its red dates nothing. Census 3091 → 3092, rows 4500, gate rc=0 on the five logs, ceiling 181 → 181. Guards 442 passed; collection 1029, unchanged.🤖 Generated with Claude Code