test: the last fifty-eight checks in those ten suites record too (#965) - #970
Conversation
|
There are eleven more verdict-printing lines in the ten suites, and neither my counts nor linuxhikerpm's could have found them. Swept after the conversion, with a control to show the sweep has teeth. Control, the same grep against Why the counts missed themThey are timeout paths. On a green run not one of them executes. That is why 293 human lines reconciled exactly against 236 + 58 on both our boxes — we were both counting a population that excludes them by construction. if [ "$i" -ge 1200 ]; then # 1200 x 0.05s = 60s
echo "FAIL timeout waiting for $name/$label"
fail=1
return 1
fiWhat the gap actually is, stated preciselyIt is not a false green. They set the suite-local
Why I am not converting them in this PRTwo reasons, both about the work rather than the size of the diff: A conversion here cannot be proven by running the suite. These lines do not execute on a green run, so every count stays identical whether I convert them correctly, incorrectly, or not at all — the property this PR rests on (records = human lines = The check name is dynamic, and that is a ledger decision. I will take it next, with an induced-timeout arm, unless you would rather it went with the seeding design. Recorded on #965 either way so it is not carried in a PR comment. |
|
I induced one of the eleven timeouts rather than leaving the argument unmeasured, and the result is worse than what I wrote an hour ago. It is not that the failure is invisible. It is that the accounting will balance while asserting there were none.
The part I had wrongI said the gap was that "the ledger never sees the failure". True but not the point. Records 7 and So when these suites eventually emit an Zero failures, on a failing run, in a statement that balances. An aggregate that is missing data can be caught by a count that does not close; one that closes cannot. That is the same shape as What that changes about sequencingNothing about this PR — these eleven lines are untouched by it and behave identically before and after. But it does change what I would argue for next: I had filed the conversion as tidy-up behind the naming decision. It is not tidy-up. Until those eleven record, adding an So the order that falls out: the eleven first, then the accounting line, not the reverse. The naming question (fixed name per helper with the dynamic part in Recorded on #965 with the measurement. |
|
13/13 green at For the reviewer, the three things worth driving rather than reading:
|
…mandprompt#965) commandprompt#969 converted each suite's own check helper and recorded 236 of the 293. The rest go through four further helpers with four different displays, so they needed a second pass rather than the same substitution: phase6 eq_on_off 39 phase4 expect_fail 5, assert_plan 2, assert_plan_seq 1, and one check written inline in no helper at all 9 audit expect_error 5 phase5 assert_plan 5 Measured on PG18, each suite's records now equal both its own human check lines and its checks run: total, and every human line is byte-for-byte what it was: suite records before -> after checks run: human lines audit 26 -> 31 31 31 phase4 29 -> 38 38 38 phase5 31 -> 36 36 36 phase6 4 -> 43 43 43 eq_on_off has three outcomes and two of them return early. Each one records, because a return that skips the record leaves the check counted nowhere, which is the state this conversion exists to end. assert_plan in phase4 and phase5 prints the whole plan under a header when it fails. The dump is passed as part of the display rather than echoed after the record, so a failing run's output is byte-identical too. It also makes a version-gated arm visible to the ledger. audit.sh gates its partitioned-parent arm on server_version_num >= 170000 and the gated branch printed a bare note and recorded nothing, so PG16 handed the ledger three fewer rows with nothing saying why. It now records a SKIP with its reason, the way unique_conc.sh already does for its own gate. One SKIP for the block, not one per gated check: naming four checks in a branch that never runs them would put four names where nothing exercises them and they would drift. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uf6UoeBRZYLQZa4KxNiw8a
50368ba to
a342cc0
Compare
jdatcmd
left a comment
There was a problem hiding this comment.
Approved. Driven on PG16, which matters here — one of your claims is specifically about PG16 and you measured on PG18, so this is the half you could not check.
The four suites, against origin/main (post-#969)
suite base rec PR rec checks run: human rc human output
audit 23 28 28 28 0 gains ONE line
phase4 29 38 38 38 0 identical
phase5 31 36 36 36 0 identical
phase6 4 43 43 43 0 identical
+58
Records == human check lines == checks run: in all four. That three-way equality is the thing worth having: two of the three could agree while both being wrong about the third.
(My first run of this table showed base rec = 0 everywhere. My local main was at 226f805, four merges stale. The baseline was rebuilt from origin/main; the numbers above are the second run. Recording it because a stale baseline is the third instrument fault of mine today and it fails in the flattering direction — it would have shown your PR adding 28 records to a suite that already had 23.)
The strongest claim in the PR, tested rather than read
a failing run's output is byte-identical too — not just a passing one
Broke the first assert_plan identically in both trees so a red run happens, then diffed:
CONTROL base vs base, two runs of the SAME tree identical
TEST base vs PR, both failing identical
The control is there because the raw diff did show differences — server log timestamps, PIDs and ports — and without running the same tree twice I could not have said whether those were your change or the clock. They are the clock.
And the placement claim holds, which is the actual risk:
FAIL btree plan is index scan: plan was:
Index Scan using bt_a_idx on bt
Index Cond: (a = 12345)
RESULT phase4 phase4 btree plan is index scan FAIL
The RESULT line lands after the whole dump, not wedged between the header and the plan.
The three non-mechanical parts
eq_on_off's three outcomes each record, both early returns included. Checked against the merged source, not the diff. In a population of 39 that is the one that would have gone unnoticed, because a return skipping the record leaves the check counted nowhere and the human line still prints.
phase4's arithmetic closes: expect_fail 5 + assert_plan 2 + assert_plan_seq 1 = 8, and the measurement says 9. The inline check at :249 is the ninth. A count that does not close is the only reason it was found — the same mechanism that found the citext bug in #969, twice in two PRs.
The block-level SKIP precedent is real. unique_conc.sh:547 does exactly this for its own version gate, and check_skip is pgc_record SKIP so it records rather than printing. Verified both rather than taking the citation.
The PG16 half you could not measure
18a19
> SKIP the partitioned-parent arm (PG16 refuses PARTITION BY ... USING pgcolumnar)
Exactly as you predicted, on the box that produces it. The gated branch previously printed a bare note and recorded nothing, so PG16 handed the ledger three fewer audit rows with nothing saying why.
One thing for #432's list, not a blocker here
This adds one more instance of the per-major name divergence, and your comment already argues the alternative is worse — naming each of the four gated checks in a branch that never runs them would duplicate names and let them drift. I agree with the call.
But the consequence should be written down where the seeding design will look: audit's check-name set now differs by major in both directions — the partitioned-parent arm exists only below PG17, and the four real names only at PG17 and above. That is fk_referencing again, and it is now in a second suite. Worth a line on #432 so the eventual major-dimension design is sized against the real number of diverging suites rather than the one I happened to measure.
Merging
CI 13/13, ms=CLEAN. Gated on a342cc03, and I will re-verify the head if it moves — #969 taught me that an approval state survives a change of scope without saying so.
#965 closes with this one, and the count in it should be read as I measured: 58 records added, of which 57 were previously-unrecorded checks and one is the new SKIP that did not exist before.
Closes the remainder of #965: all ten suites now record every check they run. Second and final pass, after #969 converted each suite's own
checkhelper.Stacked on #969. Its parent is #969's head
19ddb4a3, so until #969 merges the diff on this page also shows #969's eleven files. The commit that belongs to this PR is the single one on top; after #969 lands, the diff reduces to it.What was left and why it needed a second pass
#969 converted one helper per file and recorded 236 of the 293. The other 58 go through four further helpers, each printing a different display, so the same substitution would not reach them:
phase6eq_on_offphase4expect_fail5,assert_plan2,assert_plan_seq1, and one check written inline in no helper at allauditexpect_errorphase5assert_planThe inline one is
phase4.sh:249. It was not in any helper, so it does not appear in a helper census — I found it only becausephase4's four helpers account for 8 and the measurement says 9. A count that does not close is the only reason it was found, which is the same way #969 found the citext bug.Measured, PG18, four suites
Baseline is #969's head, same box, each tree building its own
.so:Every suite's record count now equals both its own human check lines and its
checks run:total. Human output is byte-identical in all four:diffon thePASS/FAIL/SKIPlines is empty.Three things in the conversion that are not mechanical
eq_on_offhas three outcomes and two of themreturnearly. Each one records. Areturnthat skips the record leaves the check counted nowhere, which is precisely the state #965 exists to end, and it would have been the easy thing to miss in the 39 largest population here.Two displays span more than one line.
assert_planinphase4andphase5prints the whole plan under a header when it fails. The dump is passed as part of the display rather than echoed after the record, so a failing run's output is byte-identical too — not just a passing one. Echoing it after would wedge theRESULTline between the header and the plan.expect_errorprintsPASS <name> (rejected).(rejected)is kept verbatim.pgc_recordtakes the display whole, which is the property that made #969's conversions lossless, and it is the reason none of these delegate tolib.sh's owncheck.A version-gated arm was invisible to the ledger, and now records a SKIP
audit.sh:293gates its partitioned-parent arm onserver_version_num >= 170000, because PG16 and earlier refusePARTITION BY ... USING pgcolumnar. The gated branch printed a bare note and recorded nothing, so PG16 handed the ledger three fewer rows forauditwith nothing saying why — a reader reconciling against a PG18 figure sees three checks that look lost.It now records a SKIP with its reason, the way
unique_conc.sh:546already does for its own version gate. Driven on PG16, in its own build tree:23 + 4
expect_error+ 1 SKIP = 28, and PG16's human output gains that SKIP line in place of the--note.One SKIP for the block, not one per gated check. Naming each of the four would make the count identical on every major, which is tempting and wrong here: it puts four check names in a branch that never runs them, where they drift from the four it is standing in for. Comparing counts across majors needs a major dimension in the ledger, which is #432's problem, not this file's.
Gate
The
shellcheckwarning isrc is referenced but not assignedinaudit.sh'sEXITtrap at line 65, which this PR does not touch. Verified present onupstream/mainand on #969's head as well as here, so it is pre-existing and not introduced. I am not fixing it in this PR because a trap'src=$?assignment is a different change with its own argument.Ledger
No rows, no census change, no budget change. A shell suite becoming coverable is not the same as covering it, and seeding these is still blocked on the major dimension — now with a second measured instance, since
audit's own count differs by major.What this closes and what it does not
After this, the remainder of #965 is zero — all 293 checks across the ten suites record, plus the citext SKIP #969 added and the gate SKIP this one adds. What #965 still asks for, and what neither PR does, is put these suites in the ledger.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Uf6UoeBRZYLQZa4KxNiw8a