Skip to content

test: partial twins for four fixes that landed with shell arms only, and their refusals must be refusals (#1341 item 29) - #1448

Merged
jdatcmd merged 6 commits into
mainfrom
test/1341-item29-partial-twins
Oct 16, 2026
Merged

jdatcmd merged 6 commits into
mainfrom
test/1341-item29-partial-twins

Conversation

@OffgridwithJD

Copy link
Copy Markdown
Collaborator

#1341 item 29: four fixes landed after the twin rule with shell arms only:

Each now has a partial pytest twin holding exactly its arms, by the shell's names, declared INCOMPLETE. Porting them found that two of the shell's refusal arms couldn't tell the bug from the fix.

Stacked on #1446, which is stacked on #1444. Merge them in that order; this branch is #1446's head plus two commits.

What changes

Red first

Each fix was reverted one at a time on PG18, and run through both twins, with the .so md5 printed every time. The SQL mutants edit pgcolumnar--1.0-alpha5.sql, which each suite's CREATE EXTENSION reads.

revert shell pytest what went red
#1259: IsColumnarRelation from relam alone (columnar_metadata.c:4231) inheritance 24/26 (was 26/26 before this PR) test_inheritance.py fails both refusals: got [58P01] want [42809]
#1263: the storage guard removed (columnar_parquet_reader.c:3674) parquet_import 23/25 (the refusal arm passed on the crash before this PR) fails the refusal, no SQLSTATE (server closed the connection unexpectedly), and the liveness, 1 backend crashes
#1265: reset_options' guard removed phase5 44/47 fails heap and partitioned-parent parity, and the partitioned-parent verdict
#1265: set_options refuses a matview again phase5 45/47 fails matview parity and the settled verdict
#1265: reset_options refuses a matview again phase5 45/47 fails the same two
#1265: the drop hook skips a matview again (columnar_tableam.c:3982) drop_cleanup 15/16 test_drop_cleanup.py fails dropping a columnar matview takes its options row with it: got [1] want [0]

Runs

major inheritance parquet_import phase5 drop_cleanup
15 16 + 10 skipped / pytest 4 + 1 unrun 18 + 7 skipped / pytest 1 unrun 47/47 / 11/11 16/16 / 8/8
16 the same as 15 the same as 15 47/47 / 11/11 16/16 / 8/8
17 26/26 / 14/14 25/25 / 7/7 47/47 / 11/11 16/16 / 8/8
18 26/26 / 14/14 25/25 / 7/7 47/47 / 11/11 16/16 / 8/8
19 26/26 / 14/14 25/25 / 7/7 47/47 / 11/11 16/16 / 8/8

Also measured: the guard half (438 tests), harness_selftest 1245/1245 and docs_style. cluster_tests goes 651 → 658 by collection, and TESTS.md gets §139 to §142.

🤖 Generated with Claude Code

@jdatcmd jdatcmd 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.

Approving 06851ab.

At the head, PG17: inheritance.sh 26/26 and test_inheritance.py 14 checks. The census at this head is 3612 / 2671 / 941; inheritance's two refusal rows moved from never to dated, matching the budget.

What I checked myself:

  • phase5's move onto lib.sh's recorders: I ran phase5.sh on main and at this head and compared the RESULT records, name and verdict, sorted. Both have 47 records, all PASS, and they are identical.
  • The #1259 revert (PgColumnarIsColumnarRelation returns true from relam alone). On my assert build it aborts the backend rather than giving your release build's 58P01. Either way the arms now catch it: shell 22/26, with both refusals got [no SQLSTATE (server closed the connection unexpectedly)] want [42809] and both liveness arms DOWN (1 backend crashes) / DOWN (2 backend crashes). pytest's refusal is red the same way. (Its "1 error" is fixture teardown losing the connection to the crashed server.) On a release build, before this PR, the old any-error refusal passed on 58P01, which is the bug itself. Requiring 42809 closes that.

I took the #1263 and #1265 reverts from your table without repeating them.

Order: #1444 → #1446 → #1448 all have my approval. The chain needs one restate onto main e04e1e0, which now has #1445. If #1449 lands first, it adds 7 ledger rows to restate over. I'll merge whichever is green and current first.

@jdatcmd jdatcmd 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.

Re-approving 7e7612c, a restate of 06851ab (which I approved) onto main e04e1e0. Every file's patch is identical to the approved head's, with TESTS.md section numbers masked, since main moved only by #1445, which touches no ledger file. The census at this head matches its budget paragraph.

jdatcmd and others added 6 commits October 16, 2026 01:48
… must follow a write (#1341 item 25)

test_native_backend_crash.py asserts every shell check by name; compare_to_bash grades
it as covering all of them, and it joins COMPLETE. It runs on a private cluster,
since the reinit drops every session on the server, and a session a failed check
leaves running is terminated before its connection closes.

The mid-write kill waited a fixed 0.5s, and nothing showed the INSERT had written a
page by then. With the inserting session's stripe_row_limit above its row count, so
that the write buffers whole until its end, the kill landed on a write that had
produced nothing and the suite stayed 25/25. The kill now waits for the relation to
grow, and each crash asserts that its INSERT had written pages first; under the same
setting the mid-write arms go red, as the kill can no longer land mid-write.

cluster_tests 643 -> 646 by collection; TESTS.md gets section 137.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… unwritten WAL record (#1341)

28 rows from five-major runs (28/28 on each of 15-19). Dated on PG18 by a stripe
data page written with no WAL record: the three "committed content in c matches the
heap mirror" arms. The sentinel, second-reader, kill-phase and relation-grew arms
redden only under harness mutations and stay never, as do the MVCC arms.
suites_not_covered 221 -> 220; the census is 3599 rows, 2669 never, 930 dated, restated on main a4eef27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ger pass for a refusal (#1341 item 25)

test_corruption.py asserts every shell check by name; compare_to_bash grades it as
covering all of them, and it joins COMPLETE. It runs on a private cluster, since a
crash drops every session.

Three kinds of arm could not fail as claimed:
- `errors` said yes to any failure of psql, and a crash is one; `alive` connected
  after crash recovery and passed whenever recovery won the race. With the
  bad-descriptor refusal replaced by abort() and `alive` 3s later, the suite was
  12/12. A refusal must now be a clean XX001, and `alive` also requires that no
  backend died since the scenario began, read from the server log.
- each corrupting UPDATE was assumed to change a row. With every UPDATE matching
  nothing, the value_count, column_index and bloom scenarios passed on tables nobody
  corrupted. Each now asserts that it changed a catalog row.
- the bloom arm looked up an absent value, which is 0 rows even when a corrupt
  filter wrongly says "absent". With a malformed header read as "absent", the suite
  was 12/12; a value the table holds must now still be found.

cluster_tests 646 -> 653 by collection; TESTS.md gets section 138.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions of the reader and bloom probe (#1341)

20 rows from five-major runs (20/20 on each of 15-19). Dated on PG18 by: the group-
span check removed (1); the span (2), chunk-bound (3) and descriptor (2) refusals
each replaced by a crash; the row accounting and value-stream bound removed (2); a
malformed bloom header read as absent (1); the bloom length check removed (2).
suites_not_covered 220 -> 219; the census is 3619 rows, 2678 never, 941 dated, restated on main a4eef27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and their refusals must be refusals (#1341 item 29)

Each now has a partial twin holding exactly its arms, by the shell's names, declared
INCOMPLETE in test_compare_to_bash.py: test_inheritance.py, test_parquet_import.py,
test_phase5.py and test_drop_cleanup.py. The two partitioned-parent tests decline on
PostgreSQL 15 and 16, where the fixture cannot exist, with a row per major in
expected_unrunnable.txt.

Two shell arms could not fail as claimed:
- inheritance's #1259 refusals counted any error. With the predicate reverted, a
  release build fails with 58P01 opening relfilenode 0 -- the bug itself -- and the
  suite stayed 26/26. They now require 42809.
- parquet_import's #1263 refusal passed on the SIGSEGV itself, and its liveness check
  caught the crash only by reaching the server before recovery finished. It now
  requires 42809 and counts crashes in the server log; so does inheritance's.

phase5 moves onto lib.sh's check, pgc_fail and pgc_summary, which a twin requires,
and leaves suites_without_accounting; its 47 records are unchanged.

cluster_tests 653 -> 660 by collection; TESTS.md gets sections 139 to 142.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…redicate (#1341 item 29)

With PgColumnarIsColumnarRelation answering from relam alone again, both arms go red
(58P01 where 42809 belongs), so they leave never. The census is 3619 rows, 2676
never, 943 dated, restated on main a4eef27. parquet_import, phase5 and drop_cleanup are not ledger-covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OffgridwithJD
OffgridwithJD force-pushed the test/1341-item29-partial-twins branch from 7e7612c to 61b5250 Compare October 16, 2026 01:51

@jdatcmd jdatcmd 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.

Re-approving 61b5250, a restate onto a4eef27 (#1449). Every test and suite file's patch is identical to the head I approved, with TESTS.md section numbers masked. Only the budget and expected_tests.txt moved, re-anchored on #1449's numbers. The census at this head matches its budget paragraph, and cluster_tests steps 643 → 646 → 653 → 660 along the chain.

@jdatcmd
jdatcmd merged commit 0edb5ae 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.

2 participants