Skip to content

test: native_chunk_length_bound's fetch check is an arm, and names its own failure (#1339) - #1470

Merged
jdatcmd merged 1 commit into
mainfrom
test/1339-chunk-length-fetch-arm
Oct 16, 2026
Merged

jdatcmd merged 1 commit into
mainfrom
test/1339-chunk-length-fetch-arm

Conversation

@jdatcmd

@jdatcmd jdatcmd commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #1339's test_native_chunk_length_bound.py:57 entry (mislabelled).

The two premises, decided one by one

check a repository change reddens it? now
"premise: that fetch returns the row" yes: with the index fetch treating a flushed row as not live (if (false && PgColumnarRowIsLive(…))), both twins go red, got [] want [v1] an arm (#1236); its ledger row is renamed with its history and dated by that mutation
"premise: a point lookup uses the index …" no: with seqscan, bitmapscan and the custom scan off, PostgreSQL's planner chooses the index stays a premise, with a comment saying why

A diagnostic fix found by the mutant

Under that mutant, pytest raised TypeError on fetchone()[0], so the run never named the check. It now reads a missing row as <no row> and fails by name: that fetch returns the row: got '<no row>' want 'v1'.

Runs and ledger

🤖 Generated with Claude Code

…s own failure (#1339)

#1339 flagged test_native_chunk_length_bound.py:57 as mislabelled. "premise:
that fetch returns the row" read the columnar index fetch's own answer: with
the fetch treating a flushed row as not live, it goes red in both twins
("got [] want [v1]"). A check a repository change can redden is an arm
(#1236), so it loses the prefix, and its ledger row is renamed with its
history and dated by that mutation. The plan premise beside it stays: with the
scans off, PostgreSQL's planner chooses the index, which nothing here changes.

Under that mutant the pytest twin raised TypeError on fetchone()[0], so the run
never named the check. It now reads a missing row as "<no row>" and fails by
name. Green on PG15 to 19 (6/6 and 6 checks); harness_selftest 1245/1245.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@OffgridwithJD OffgridwithJD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdatcmd Approve. I reproduced it on my own PG18 build (~/pg/18-r) at e61bc780, with columnar_tableam.c:1991 mutated to if (false && PgColumnarRowIsLive(rel, snapshot, rowNumber)):

  • shell: FAIL that fetch returns the row: got [] want [v1];
  • pytest: AssertionError: that fetch returns the row: got '<no row>' want 'v1'. That's the named failure your fetchone() fix was for, instead of a TypeError.

So it's product-reddened, and by #1236 it's an arm. Keeping "a point lookup uses the index" as a premise reads right to me too: with the three scans disabled, the planner picks the index.

One observation, not blocking. Under the same mutant the shell also reddens an index fetch of a chunk whose page_length is 2^32 too large is refused (XX001): got [] want [XX001]: a fetch that never reads the chunk can't refuse it. The ledger diff leaves that row as it was, so it keeps whatever date it already had. If it's still never on your side, this mutation is real evidence for it as well, with --target on both names.

🤖 Generated with Claude Code

@jdatcmd
jdatcmd merged commit db56168 into main Oct 16, 2026
15 checks passed
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.

pytest audit: 260 confirmed checks that cannot fail, prove something else, or carry the wrong label

2 participants