Skip to content

test: tier_partition's injected-fault checks are arms, not premises (#1339) - #1486

Merged
jdatcmd merged 3 commits into
mainfrom
test/1339-tier-fault-arms
Oct 16, 2026
Merged

jdatcmd merged 3 commits into
mainfrom
test/1339-tier-fault-arms

Conversation

@jdatcmd

@jdatcmd jdatcmd commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes the #1339 entry test_tier_partition.py:213 [mislabelled], and one more check with the same problem.

What was wrong

"premise: the call fails with the fault injected after " reads the injected faults in tier_partition's own SQL (pgcolumnar--1.0-alpha5.sql). That is product code, so a repository change can redden the check: it's an arm (#1236).

Measured, PG17: I removed the five RAISE EXCEPTION 'injected fault after …' lines. All five step checks go red in the shell (got [ok] want [injected fault after <step>]), as does "premise: the first attempt failed after export and left its file", which reads the same fault.

The fix

  • Both twins: the six checks lose the premise: prefix. There is no other change.
  • Ledger: the six rows are renamed with their history. The same mutation reddens 17 checks in all, and all 17 are named as --target, because the merge refuses an unnamed red:
    • 16 rows that had never been seen red are now dated;
    • the already-dated retry arm gets the mutation appended to its history (;-separated, and its earlier entries are kept).
  • Census: 2942 → 2926 never, 1160 → 1176 dated. No row is added or removed, and no key or major changes.

Measured

  • Mutant, PG17: shell 17 red; pytest red on the first two (the rest masked, because expect raises on the first red).
  • Matrix:
    • both twins 80/80 on PG15–19;
    • harness_selftest 1245/1245;
    • collection 710;
    • guards 438/438;
    • ledger gate rc 0, census agrees.
  • The one skip: PG15–17 skip one check that PG18–19 run (79 + 1 skipped). Main's suite does the same; this PR doesn't change it.

🤖 Generated with Claude Code

@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, at edd94b8.

  • Head is green: both twins pass on PG17 and PG18 (shell 80/80, pytest 4/4).
  • Your mutant matches the ledger: with the five injected-fault RAISEs removed, the shell reddens 17 checks on PG17 and on PG18. Taken from the RESULT lines, they're exactly the 17 rows this PR dates or appends. pytest reddens the first two, as you said.
  • History is kept: the six renamed rows keep their key and majors (15;16;17;18;19) and change only in name. The retry arm keeps its three 2026-10-13 entries and appends the new one. No mutation text contains a ;, and nothing in the tree still uses the old premise: names.
  • Census and gate: the tsv gives 4102 / 2926 / 1176, equal to your paragraph, which is anchored on main's 2942. The ledger gate against origin/main gives rc 0. Parity is 57 literal + 6 template with 0 missing, the grader 40/40 and the guards 438/438.

"left its file" is an arm, not a premise. I moved the export fault to before export_parquet, so the call still fails with the same message but writes no file. Only "the first attempt failed after export and left its file" reddens (got [injected fault after export|nofile]), on PG17 and PG18 and in both twins. The retry arm stays green under that mutant, so this check is what keeps "a retry over the failed attempt's file" meaningful. You could add this mutation to that row's history, but it isn't needed here.

🤖 Generated with Claude Code

jdatcmd and others added 3 commits October 16, 2026 16:22
… that one did (#1339)

Both arms in test_the_guards_the_elision_added_refuse_a_lying_catalog
asserted only SQLSTATE XX001. Sixteen guards in the reader raise XX001.
With the no-nulls guard ("claims no nulls but does not account for every
row") disabled, both twins stayed green (25/25 each):
- "a chunk claiming no bitmap while it holds fewer values than rows is
  refused" got XX001 from "native chunk length does not match
  descriptor";
- "an implausible row count on an elided chunk is refused before
  anything is allocated" got XX001 from "fixed-length value runs past the
  value stream end", AFTER the 500 MB bitmap was allocated. The source
  says the value-count guard is the one that refuses before allocation;
  the MaxAllocSize check after it is only a backstop.

Each twin now requires the SQLSTATE AND the no-nulls guard's message
("XX001|the no-nulls guard"), and on a red names the guard that fired.

Measured, PG17:
- guard disabled: the shell reddens both arms, naming the other guards;
  pytest reddens the first, which hides the second (expect raises);
- guard disabled only at a billion rows or more: both twins redden the
  second arm alone, with the same message;
- unmutated: 25/25 in both twins.

The two ledger rows are dated by the first mutation; census 2941 -> 2939
never, 1160 -> 1162 dated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is allocated" is measured (#1339)

Review of #1484: the second arm checked WHICH guard refused, not WHEN. At
row_count = 4000000000 the bitmap is 500 MB, under MaxAllocSize, so with
the no-nulls guard moved below the allocation both twins stayed 25/25
(reproduced, PG17).

Both twins now poison with 9000000000. 1.125 GB of bits is over
MaxAllocSize, so the "implausible row count" backstop sits between the
no-nulls guard and the allocation. Measured, PG17:
- clean: 25/25 in both twins;
- guard moved below the allocation: arm 2 red in both twins, "XX001|another
  guard: columnar row group 1 declares an implausible row count";
- guard disabled: the shell reddens both arms; pytest the first (the
  second is masked);
- guard disabled at a billion rows or more: arm 2 red in both twins.

The comments say what this still cannot see (a guard placed between the
backstop and the allocation) and that a reworded guard message must be
updated in both twins. No ledger change: both rows stay dated by a
mutation that still reddens them.

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

"premise: the call fails with the fault injected after <step>" and
"premise: the first attempt failed after export and left its file" read
the injected faults in tier_partition's own SQL. Removing those five
RAISEs reddens all six (PG17, shell), so a repository change reddens
them and they are arms (#1236). They lose the prefix in both twins, and
their ledger rows are renamed with their history.

The same mutation reddens 17 checks in all. All are named as targets,
which dates sixteen rows that were never seen red, and appends the
mutation to the already-dated retry arm's history. Census 2941 -> 2925
never, 1160 -> 1176 dated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdatcmd
jdatcmd force-pushed the test/1339-tier-fault-arms branch from edd94b8 to f88c588 Compare October 16, 2026 16:44
@jdatcmd

jdatcmd commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

@OffgridwithJD, restated onto #1484 (now f88c588). Details are on #1484. Bookkeeping only: the twin patches and the ledger rows are identical to edd94b8, and the budget paragraph is re-anchored to 2988 -> 2972.

@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 Re-approving at f88c588, on #1484. Against edd94b8, the twin files' patch is byte-identical and the 17 changed ledger rows are identical (sorted). The tsv gives 4189 / 2972 / 1217, which equals checks_never_observed_red 2972. Only the budget anchors moved.

🤖 Generated with Claude Code

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