Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/check_ledger.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,7 @@ harness_selftest 410-a-check-must-have-been-red a real refusal is a different st
harness_selftest 410-a-check-must-have-been-red a ref that does not resolve is an integrity failure, not a bootstrap 15;16;17;18;19 never -
harness_selftest 410-a-check-must-have-been-red a ref that exists with the budget still compares 15;16;17;18;19 never -
harness_selftest 410-a-check-must-have-been-red a ref that exists without the budget is still the bootstrap case 15;16;17;18;19 never -
harness_selftest 410-a-check-must-have-been-red a refusal does not name one cause for all of them 15;16;17;18;19 never -
harness_selftest 410-a-check-must-have-been-red a refusal keeps the regenerate-the-ledger wording 15;16;17;18;19 never -
harness_selftest 410-a-check-must-have-been-red a rename in one part survives an addition in another 15;16;17;18;19 never -
harness_selftest 410-a-check-must-have-been-red a row claiming 15;18 is an orphan on a PG18 run that did not emit it 15;16;17;18;19 never -
Expand Down
14 changes: 13 additions & 1 deletion test/check_ledger_budget.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3766,4 +3766,16 @@ suites_not_covered 181
# never 3087 + 4 = 3091
# dated 1405 + 3 = 1408
# 3091 + 1408 == 4499
checks_never_observed_red 3091
#
# #1341, the runner's ledger-gate sentence (OffgridwithJD): 3091 -> 3092. rc=1 has
# several causes, and the runner named one for all of them: #1537's CI refused a
# ceiling rise and printed "has a check the ledger has never seen" under the gate's
# own "new this run=0". The sentence now points at the gate's line instead. One
# check enters harness_selftest part 410, red on the old runner and green on the new
# (measured; the runner is the harness, so it dates nothing), so it arrives never.
#
# ledger rows 4499 + 1 = 4500
# never 3091 + 1 = 3092
# dated 1408 + 0 = 1408
# 3092 + 1408 == 4500
checks_never_observed_red 3092
7 changes: 6 additions & 1 deletion test/pytest/test_mutation_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,13 @@ def test_the_runner_invokes_the_gate_before_it_removes_the_logs(expect):
block = "\n".join(l for l in block.splitlines() if not l.strip().startswith("#"))
expect.num(block.count("verfail=1"), 2,
"both failure arms fail the major")
expect.num(block.count("has a check the ledger has never seen"), 1,
expect.num(block.count("regenerate the"), 1,
"a refusal keeps the regenerate-the-ledger wording")
# rc=1 is an unseen check, a census mismatch, coverage over the ceiling or a ceiling
# raised against the prior; naming the first for all of them sent #1537's reader
# after an unseen check under the gate's own "new this run=0".
expect.num(block.count("has a check the ledger has never seen"), 0,
"a refusal does not name one cause for all of them")
expect.num(block.count("could not run the ledger gate at all"), 1,
"and an integrity failure gets its own sentence, since regenerating "
"the ledger would not help")
Expand Down
9 changes: 7 additions & 2 deletions test/run_all_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1750,10 +1750,15 @@ pgc_tally_suite() { # pgc_tally_suite NAME VERDICT LOGFILE
# the gate unable to do its job at all, where regenerating helps nothing.
# Collapsing them printed "has a check the ledger has never seen" three
# lines below the gate's own "new this run=0", which contradicts it and
# sends the reader at the wrong repair. Reported by OffgridwithJD.
# sends the reader at the wrong repair. Reported by OffgridwithJD. rc=1
# itself has several causes (an unseen check, a census that disagrees,
# coverage over the ceiling, a ceiling raised against the prior), so its
# sentence points at the gate's own line rather than naming one (#1537).
case "$_led_rc" in
0) ;;
1) echo " PG$major has a check the ledger has never seen, which is not a pass"
1) echo " PG$major: the ledger gate refused, which is not a pass. Its reason is the"
echo " gate's own line above: for a check the ledger has never seen, regenerate the"
echo " ledger; for a census, coverage or ceiling line, restate the budget."
verfail=1 ;;
*) echo " PG$major could not run the ledger gate at all, which is not a pass:"
echo " the input or the prior ceiling was unusable, and regenerating the"
Expand Down
8 changes: 7 additions & 1 deletion test/selftest/410-a-check-must-have-been-red.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,13 @@ check "premise: the gate's status block was found in the runner" \
check "the runner captures the gate's status rather than only its success" \
"$(grep -c '_led_rc=\$?' "$_rv")" "1"
check "a refusal keeps the regenerate-the-ledger wording" \
"$(printf '%s' "$_ledcase" | grep -c 'has a check the ledger has never seen')" "1"
"$(printf '%s' "$_ledcase" | grep -c 'regenerate the')" "1"
# A REFUSAL HAS MORE THAN ONE CAUSE. rc=1 is an unseen check, a census that disagrees,
# coverage over the ceiling, or a ceiling raised against the prior. The runner named
# the first for all of them: #1537's CI refused a ceiling rise and printed "has a
# check the ledger has never seen" under the gate's own "new this run=0".
check "a refusal does not name one cause for all of them" \
"$(printf '%s' "$_ledcase" | grep -c 'has a check the ledger has never seen')" "0"
check "an integrity failure says regenerating will not help" \
"$(printf '%s' "$_ledcase" | grep -c 'will not help')" "1"
check "and it is a different sentence from the refusal, not the same one twice" \
Expand Down
Loading