Skip to content

test_dead_block_refs: the live-ref check asserts that stderr is empty - #114

Merged
muellerei merged 1 commit into
mainfrom
test/dead-refs-live-ref-check
Oct 3, 2026
Merged

muellerei merged 1 commit into
mainfrom
test/dead-refs-live-ref-check

Conversation

@muellerei

Copy link
Copy Markdown
Owner

test_page_without_dead_refs_says_nothing searched stderr for "dead", but the notice reads "points at a block that no longer exists", so the check could never fail. The JSON check beside it does not cover the notice either: a live ref reported as dead is inlined before the payload is built, so the payload stays clean while stderr carries the claim.

The test now asserts that stderr is empty, which is what its name claims. Checking for the notice's wording would go blind the same way the day the message is reworded, and no other test in the file pins that wording.

Checked: with a live ref added to the dead list, the empty-page guard removed and the message reworded, the old assertion, a wording check and the JSON check all pass; the new assertion fails. 3265 tests, ruff check ..

test_without_resolve_refs_nothing_is_claimed keeps its wording check: its get_block.assert_not_called() already fails for every regression I could construct there, so no mutation separates a rewritten check from it.

test_page_without_dead_refs_says_nothing searched stderr for "dead", but
the notice reads "points at a block that no longer exists", so the check
could never fail. The JSON check beside it does not cover the notice
either: a live ref reported as dead is inlined before the payload is built,
so the payload stays clean while stderr carries the claim.

Checking for the notice's wording would go blind the same way the day the
message is reworded, and no other test in the file pins that wording; they
look for the uuid. The test now asserts that stderr is empty, which is what
its name claims.

With a live ref added to the dead list, the empty-page guard removed and the
message reworded, the old assertion, a wording check and the JSON check all
pass; the new assertion fails.

test_without_resolve_refs_nothing_is_claimed keeps its wording check: its
get_block.assert_not_called() already fails for every regression I could
construct there, so no mutation separates a rewritten check from it.
@muellerei
muellerei merged commit 43da8dd into main Oct 3, 2026
6 checks passed
@muellerei
muellerei deleted the test/dead-refs-live-ref-check branch October 3, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant