From 86da88f297f68c4ae9abc8d7ec185d9e52b812bf Mon Sep 17 00:00:00 2001 From: fujibee Date: Tue, 18 Aug 2026 21:09:47 -0700 Subject: [PATCH] ci: say what the offender listing is, and how to find the new one Four people read this checker's output on one red tonight and each drew a different wrong conclusion: the first file in the list taken as the cause; a hundred-line difference between two heads read as a hundred new offenders; and from that, a guess that the listing must be truncated. It is not truncated. Measured with the baseline forced low: 638 reported, 638 printed. The list is complete, unordered by novelty, and unlabelled -- so on a `+1` it is 639 lines with nothing marking the one that matters. The hundred-line diff was line numbers shifting below an insertion. Now the header carries the delta, and four lines say what the list is and what does work: bisect on the count. Comparing listings does not, and that is stated rather than left to be rediscovered. No state is added. Storing the previous offender set beside the count would let this name the new entries outright, but it is a second thing to keep in sync with the first, and a listing that disagrees with its count is the same confusion in different clothes. The count stays the only authority; the output stops implying otherwise. Verified at +1, +2, +9, at the baseline, and below it. --- .github/scripts/check-enforced-assertions.sh | 27 +++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/scripts/check-enforced-assertions.sh b/.github/scripts/check-enforced-assertions.sh index 2eda7f92b..c89177a71 100755 --- a/.github/scripts/check-enforced-assertions.sh +++ b/.github/scripts/check-enforced-assertions.sh @@ -104,7 +104,32 @@ case "$baseline" in esac if [ "$found" -gt "$baseline" ]; then - echo "check-enforced-assertions: $found unenforceable assertions, baseline is $baseline." >&2 + over=$((found - baseline)) + echo "check-enforced-assertions: $found unenforceable assertions, baseline is $baseline (+$over)." >&2 + echo >&2 + # Say what the list is before printing it. It is every offender in the tree, + # and on a typical red that is hundreds of lines around a `+1`. Four people + # read this output on one red and each drew a different wrong conclusion -- + # the first file in the list taken as the cause, a hundred-line diff between + # two heads read as a hundred new offenders (line numbers shift below any + # insertion), and from that a guess that the listing must be truncated. It is + # not truncated; it is complete, unordered by novelty, and unlabelled. + # + # No state is added here on purpose. Storing the previous offender set beside + # the count would let this name the new entries directly, but it introduces a + # second thing to keep in sync with the first, and a listing that disagrees + # with the count is the same confusion wearing different clothes. The count + # stays the only authority; what changes is that the output stops implying + # otherwise. See #892. + if [ "$over" -eq 1 ]; then + echo "One assertion pushed this over. The list below is EVERY unenforceable" >&2 + else + echo "$over assertions pushed this over. The list below is EVERY unenforceable" >&2 + fi + echo "assertion in the tree, not the new one(s) -- nothing here marks which." >&2 + echo "To find them: run this checker at the previous commit and compare the" >&2 + echo "counts, bisecting until the count changes. Comparing the listings does" >&2 + echo "not work; a line added anywhere shifts every line number below it." >&2 echo >&2 printf '%s\n' "$listing" | sed 's/^/ /' >&2 echo >&2