From 626373b522aec5cc10ae0a1797d02ee53d36e647 Mon Sep 17 00:00:00 2001 From: OffgridwithJD Date: Fri, 11 Sep 2026 15:42:59 +0000 Subject: [PATCH 1/4] test: smoke.sh records its checks, so the ledger can see them (#965) Ten registered suites emit no `RESULT` lines and no `checks run:` total. They print their own `PASS : ` lines and their own verdict, and pass. Counted across the ten, **293 checks** are invisible to every mechanism built on the record vocabulary: the ledger, the census, `checks_never_observed_red`, the red-observation record, and duplicate-name detection. This is the first of the ten, sent on its own so the shape is reviewed before it is repeated nine times. Measured on PG18, before and after: RESULT lines 0 -> 9 checks run: absent -> 9 human PASS lines 9 -> 9, byte-for-byte identical ledger merge nothing -> 9 rows recorded THE HUMAN OUTPUT IS UNCHANGED, and that is why the local helper records through `pgc_record` rather than delegating to lib.sh's own `check`. These lines carry the measured value -- `PASS count(*): 100000` -- which is the comparison rather than a label, and lib.sh's `check` composes its own display and would drop it. `pgc_record` takes the display whole, which is the property that makes a lossless conversion possible. THE SUITE'S OWN VERDICT LINE STAYS, and so does its exit logic. `smoke.sh` runs under `set -euo pipefail`, so a failing command aborts it, and the verdict line is what distinguishes a suite that finished from one that stopped -- lib.sh's own comment names this suite among those that do. Removing it in the same change as the conversion would make the suite briefly report less than it did before. Sourcing `lib.sh` instead of `portlib.sh` loses nothing: lib.sh sources portlib itself at lib.sh:110, and its top level is assignments and function definitions only, so it starts nothing. NO LEDGER OR BUDGET CHANGE. Making a suite coverable and covering it are separate decisions, and the second is blocked on a measurement: check NAMES differ between majors in at least one suite (`fk_referencing`, 25 on PG16 against 26 on PG17, in both directions), the ledger has no major dimension, and a gate seeded from one major would refuse runs on another. So `suites_not_covered` is unchanged at 250 -- this suite is now coverable, not covered. Gated: docs_style 9/0, harness_selftest unchanged, shellcheck -S error -s bash clean, and the converted suite itself 9 checks with 0 FAIL. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Uf6UoeBRZYLQZa4KxNiw8a --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ test/smoke.sh | 24 +++++++++++++++++++++--- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3b8a7b3..c6bb43cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1445,6 +1445,35 @@ true until the next version shipped. The refusal on a changed source had never been exercised by anyone before this change, only read. It is now driven end to end, along with the three other states. +- `smoke.sh` records its checks, so the ledger can see them (#965). + + Ten registered suites print their own `PASS : ` lines and their own + verdict and emit no machine-readable records at all. Counted across the ten, 293 + checks were invisible to every mechanism built on that vocabulary: the ledger, the + census, the count of checks never observed red, the red-observation record, and the + duplicate-name detection. They pass, and nothing that reads records can see them. + + This converts the first of the ten. Its nine checks now emit a record each and a + total, measured on PG18: nine records where there were none, and `checks run: 9` + where there was no total. + + The human output is unchanged, byte for byte. `pgc_record` takes the display whole, + so each line still reads `PASS count(*): 100000` with the measured value rather + than a label. That value is the comparison, not a message, which is why the local + helper records through `pgc_record` rather than delegating to `lib.sh`'s own + `check` -- the latter composes its own display and would drop the value. + + The suite's own verdict line stays, and so does its exit logic. That line is + load-bearing until a reconciliation replaces it: `smoke.sh` runs under + `set -euo pipefail`, so a failing command aborts it, and the verdict is what + distinguishes a suite that finished from one that stopped. Removing it in the same + change would make the suite report less than it did before. + + It does not add the suite to the ledger. Making a suite coverable and covering it + are separate decisions, and the second one is blocked on a measurement: check NAMES + differ between majors in at least one suite, the ledger has no major dimension, and + a gate seeded from one major would refuse runs on another. + ## [1.0-alpha3] - 2026-09-02 ### Added diff --git a/test/smoke.sh b/test/smoke.sh index f50bc1a1..d7e7d164 100755 --- a/test/smoke.sh +++ b/test/smoke.sh @@ -15,7 +15,10 @@ set -euo pipefail -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here. Its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" PG_CONFIG="${1:-/usr/local/pg17/bin/pg_config}" BINDIR="$("$PG_CONFIG" --bindir)" @@ -99,12 +102,25 @@ ORPHANS="$(run_pg "$PSQL -c \"SELECT count(*) FROM pgcolumnar.row_group;\"")" # ---- check ----------------------------------------------------------------- fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted nine human PASS +# lines and no RESULT records, so every mechanism built on the record vocabulary -- +# the ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all nine. Measured: 0 RESULT lines. +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. `fail` is still set, so this suite's own exit logic is untouched -- +# the verdict line it prints is load-bearing until `checks run:` reconciles, and +# removing it in the same step would make the suite report less than it did before. +# +# NOT lib.sh's own `check`: that composes its own display and would drop the +# `: $got` suffix these lines carry, which is the measured value rather than a +# label. The name and the value are both wanted. check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -125,8 +141,10 @@ check "native catalog tables" "$NATIVE_TABLES" "4" echo if [ "$fail" = "0" ]; then + echo "checks run: $PGC_CHECKS" echo "SMOKE TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "SMOKE TEST FAILED" echo "---- server log tail ----" run_pg "tail -30 '$LOGFILE'" || true From 3bd66aaf28b6603017f5f2916b9a574e57640914 Mon Sep 17 00:00:00 2001 From: OffgridwithJD Date: Fri, 11 Sep 2026 15:49:21 +0000 Subject: [PATCH 2/4] test: say that checks run: is not read yet (#969 review) @jdatcmd drove the reconciler and found the line I added is correct and INERT. The matrix gates reconciliation on the ACCOUNTING line -- run_all_versions.sh calls pgc_log_shows_accounting, which greps for `accounting: N passed + ... = N` -- and this suite emits none, because it does not call pgc_summary. Measured: 0 accounting lines here, 1 in any suite that calls it. Not a defect and the line stays: it is the total the records reconcile against, and pgc_reconcile_records returns 0 on this log when driven directly. What was wrong was the silence -- the change read as though it wired the suite into reconciliation, and nine more conversions would have added nine more inert lines by someone believing they had. So the remaining step is a gate flip rather than new work: once whatever replaces the verdict line emits the accounting line, reconciliation starts working for all ten with no further change to them. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Uf6UoeBRZYLQZa4KxNiw8a --- test/smoke.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/smoke.sh b/test/smoke.sh index d7e7d164..8207215e 100755 --- a/test/smoke.sh +++ b/test/smoke.sh @@ -115,6 +115,21 @@ fail=0 # NOT lib.sh's own `check`: that composes its own display and would drop the # `: $got` suffix these lines carry, which is the measured value rather than a # label. The name and the value are both wanted. +# +# AND THE `checks run:` LINE BELOW IS READ BY NOTHING YET, which is worth saying +# so the next conversion does not add it believing it wired something up +# (@jdatcmd, #969 review). The matrix decides whether to reconcile a suite by +# looking for the ACCOUNTING line -- `run_all_versions.sh` calls +# `pgc_log_shows_accounting`, which greps for +# `accounting: N passed + N failed + N unrunnable + N skipped = N` -- and this +# suite emits none, because it does not call `pgc_summary`. Measured: 0 accounting +# lines here against 1 in any suite that does. +# +# The line is still correct and still wanted: it is the total the records +# reconcile against, and `pgc_reconcile_records` returns 0 on this log when driven +# directly. So the remaining step is a gate flip rather than new work -- once +# whatever replaces the verdict line emits the accounting line, reconciliation +# starts working for all ten of these suites with no further change to them. check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then From 66507a9290217b3f45810116eaa198e683732f7a Mon Sep 17 00:00:00 2001 From: OffgridwithJD Date: Fri, 11 Sep 2026 15:56:04 +0000 Subject: [PATCH 3/4] test: the other nine suites record their checks too (#965, 10 of 10) The shape was reviewed on smoke.sh first. This applies it to the other nine. Measured on PG18, every suite: suite rc records checks run: human output ledger audit 0 26 26 identical 26 rows concurrency 0 7 7 identical 7 rows phase2 0 42 42 identical 42 rows phase3 0 32 32 identical 32 rows phase4 0 29 29 identical 29 rows phase5 0 31 31 identical 31 rows phase6 0 4 4 identical 4 rows unique_conc 0 31 31 identical 31 rows update_conc 0 25 25 identical 25 rows 227 records where there were none, and the human output byte-for-byte unchanged in all nine -- diffed against the pre-conversion logs, not asserted. Two shapes, both asserted unique before being replaced: seven files use `local name="$1" got="$2" want="$3"`, two use positional `$1/$2/$3`. A file whose helper matched neither would have been reported and left untouched rather than half-edited. AND IT FIXES A CALL THAT WAS FAILING SILENTLY. `unique_conc.sh` calls `check_skip` for the case where the citext extension is absent. That function is defined in `lib.sh:1386`, which the suite did not source, so the baseline log carries test/unique_conc.sh: line 392: check_skip: command not found and the suite continued -- it runs under `set -uo pipefail`, not `-e` -- with the case reported nowhere at all. It now emits `SKIP 2c citext case test (citext extension not available)` and a SKIP record carrying the reason. This was the only one of the ten with a command-not-found in its baseline, checked rather than assumed. FIFTY-SEVEN CHECKS ARE STILL NOT RECORDED, and the number in #965 should be read as a count of checks rather than of helpers. Four of these suites have further check-like helpers of their own: phase6 eq_on_off 39 phase4 assert_plan, assert_plan_seq, expect_fail 9 audit expect_error 5 phase5 assert_plan 5 Each prints its own display -- `PASS $name: $on` for a vectorized-versus-scalar comparison is not the same line as `check`'s -- so they need a second pass rather than the same substitution. Their human lines are why `phase6` shows 43 PASS lines against 4 records while its output is unchanged. NO LEDGER OR BUDGET CHANGE, for the same reason as before: making a suite coverable and covering it are separate decisions, and the second is blocked on check names differing between majors while the ledger has no major dimension. Gated: docs_style 9/0, harness_selftest unchanged, shellcheck -S error -s bash clean, and each of the nine suites green on its own. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Uf6UoeBRZYLQZa4KxNiw8a --- CHANGELOG.md | 19 ++++++++++++++++++- test/audit.sh | 31 ++++++++++++++++++++++++++++--- test/concurrency.sh | 31 ++++++++++++++++++++++++++++--- test/phase2.sh | 31 ++++++++++++++++++++++++++++--- test/phase3.sh | 31 ++++++++++++++++++++++++++++--- test/phase4.sh | 31 ++++++++++++++++++++++++++++--- test/phase5.sh | 31 ++++++++++++++++++++++++++++--- test/phase6.sh | 31 ++++++++++++++++++++++++++++--- test/smoke.sh | 2 +- test/unique_conc.sh | 31 ++++++++++++++++++++++++++++--- test/update_conc.sh | 31 ++++++++++++++++++++++++++++--- 11 files changed, 271 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6bb43cc..9fba281d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1445,7 +1445,7 @@ true until the next version shipped. The refusal on a changed source had never been exercised by anyone before this change, only read. It is now driven end to end, along with the three other states. -- `smoke.sh` records its checks, so the ledger can see them (#965). +- The ten suites that recorded nothing now record their checks (#965). Ten registered suites print their own `PASS : ` lines and their own verdict and emit no machine-readable records at all. Counted across the ten, 293 @@ -1469,6 +1469,23 @@ true until the next version shipped. distinguishes a suite that finished from one that stopped. Removing it in the same change would make the suite report less than it did before. + This converts nine more of the ten, the same way, after the shape was reviewed on + the first. Measured on PG18: 227 records where there were none, and every suite's + human output byte-for-byte unchanged. + + It also fixes a call that was failing silently. `unique_conc.sh` calls `check_skip` + for the case where the citext extension is absent, and that function lives in + `lib.sh`, which the suite did not source -- so the baseline log carries + `line 392: check_skip: command not found`, the suite continued under + `set -uo pipefail`, and the case was reported nowhere at all. It now emits a SKIP + record with its reason. + + Fifty-seven checks across four of the suites are still not recorded, because those + suites have further check-like helpers of their own -- `eq_on_off` in `phase6` + alone accounts for thirty-nine -- each printing its own display. Those need a + second pass rather than the same substitution, and the count in #965 should be read + as the number of checks rather than the number of helpers. + It does not add the suite to the ledger. Making a suite coverable and covering it are separate decisions, and the second one is blocked on a measurement: check NAMES differ between majors in at least one suite, the ledger has no major dimension, and diff --git a/test/audit.sh b/test/audit.sh index 9879af12..01fae2d9 100755 --- a/test/audit.sh +++ b/test/audit.sh @@ -67,7 +67,10 @@ trap 'rc=$?; if [ "$AUDIT_REACHED_END" = 0 ]; then echo "The checks after the failing command did not run."; fi' EXIT -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" PG_CONFIG="${1:-/usr/local/pg17/bin/pg_config}" BINDIR="$("$PG_CONFIG" --bindir)" @@ -119,12 +122,32 @@ PSQL="psql -p $PORT -d audit -qAtX -v ON_ERROR_STOP=1" q() { run_pg "$PSQL -c \"$1\""; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -389,8 +412,10 @@ q "DROP TABLE ss_dup;" >/dev/null echo AUDIT_REACHED_END=1 if [ "$fail" = "0" ]; then + echo "checks run: $PGC_CHECKS" echo "AUDIT TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "AUDIT TEST FAILED" echo "---- server log tail ----" run_pg "tail -30 '$LOGFILE'" || true diff --git a/test/concurrency.sh b/test/concurrency.sh index 74561727..51f79cd6 100755 --- a/test/concurrency.sh +++ b/test/concurrency.sh @@ -47,7 +47,10 @@ # portlib.sh alone, not lib.sh: this suite carries its own harness, and the port # band is needed before any of it runs. Sourcing portlib twice is harmless. -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" set -uo pipefail @@ -168,12 +171,32 @@ SPSQL="psql -h '$WORKDIR' -p $PORT -d conc -qAtX" ctl_q() { run_pg "$PSQL -c \"$1\""; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -369,8 +392,10 @@ send s2 "\\q" echo if [ "$fail" = 0 ]; then + echo "checks run: $PGC_CHECKS" echo "CONCURRENCY TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "CONCURRENCY TEST FAILED" fi exit "$fail" diff --git a/test/phase2.sh b/test/phase2.sh index 3a8e4e5d..78c05797 100755 --- a/test/phase2.sh +++ b/test/phase2.sh @@ -15,7 +15,10 @@ set -euo pipefail -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" PG_CONFIG="${1:-/usr/local/pg17/bin/pg_config}" BINDIR="$("$PG_CONFIG" --bindir)" @@ -68,12 +71,32 @@ q() { run_pg "$PSQL -c \"$1\""; } qq() { run_pg "$PSQL -c \"$1\"" | tr '\n' ',' ; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -193,8 +216,10 @@ check "orphan chunks" "$(q 'SELECT count(*) FROM pgcolumnar.column_chunk;')" echo if [ "$fail" = "0" ]; then + echo "checks run: $PGC_CHECKS" echo "PHASE 2 TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "PHASE 2 TEST FAILED" echo "---- server log tail ----" run_pg "tail -40 '$LOGFILE'" || true diff --git a/test/phase3.sh b/test/phase3.sh index a0e02c4b..034e223a 100755 --- a/test/phase3.sh +++ b/test/phase3.sh @@ -17,7 +17,10 @@ set -euo pipefail -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" PG_CONFIG="${1:-/usr/local/pg17/bin/pg_config}" BINDIR="$("$PG_CONFIG" --bindir)" @@ -77,12 +80,32 @@ q() { run_pg "$PSQL" <<<"$1"; } qq() { run_pg "$PSQL" <<<"$1" | tr '\n' ',' ; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -217,8 +240,10 @@ check "row group cleaned" "$(q 'SELECT count(*) FROM pgcolumnar.row_group;')" "0 echo if [ "$fail" = "0" ]; then + echo "checks run: $PGC_CHECKS" echo "PHASE 3 TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "PHASE 3 TEST FAILED" echo "---- server log tail ----" run_pg "tail -40 '$LOGFILE'" || true diff --git a/test/phase4.sh b/test/phase4.sh index 83222d74..70ddbbb8 100755 --- a/test/phase4.sh +++ b/test/phase4.sh @@ -20,7 +20,10 @@ set -euo pipefail -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" PG_CONFIG="${1:-/usr/local/pg17/bin/pg_config}" BINDIR="$("$PG_CONFIG" --bindir)" @@ -74,12 +77,32 @@ q() { run_pg "$PSQL -c \"$1\""; } qq() { run_pg "$PSQL -c \"$1\"" | tr '\n' ',' ; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -244,8 +267,10 @@ assert_plan_seq echo if [ "$fail" = "0" ]; then + echo "checks run: $PGC_CHECKS" echo "PHASE 4 TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "PHASE 4 TEST FAILED" echo "---- server log tail ----" run_pg "tail -60 '$LOGFILE'" || true diff --git a/test/phase5.sh b/test/phase5.sh index 99b11b4b..25575ee6 100755 --- a/test/phase5.sh +++ b/test/phase5.sh @@ -23,7 +23,10 @@ set -euo pipefail -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" PG_CONFIG="${1:-/usr/local/pg17/bin/pg_config}" BINDIR="$("$PG_CONFIG" --bindir)" @@ -76,12 +79,32 @@ PSQL="psql -p $PORT -d p5 -qAtX -v ON_ERROR_STOP=1" q() { run_pg "$PSQL -c \"$1\""; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -277,8 +300,10 @@ check "seq-scan fallback returns correct rows" \ echo if [ "$fail" = "0" ]; then + echo "checks run: $PGC_CHECKS" echo "PHASE 5 TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "PHASE 5 TEST FAILED" echo "---- server log tail ----" run_pg "tail -60 '$LOGFILE'" || true diff --git a/test/phase6.sh b/test/phase6.sh index 915d23cb..b1bc8399 100755 --- a/test/phase6.sh +++ b/test/phase6.sh @@ -27,7 +27,10 @@ set -euo pipefail -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" PG_CONFIG="${1:-/usr/local/pg17/bin/pg_config}" BINDIR="$("$PG_CONFIG" --bindir)" @@ -80,12 +83,32 @@ PSQL="psql -p $PORT -d p6 -qAtX -v ON_ERROR_STOP=1" q() { run_pg "$PSQL -c \"$1\""; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { local name="$1" got="$2" want="$3" if [ "$got" = "$want" ]; then - echo "PASS $name: $got" + pgc_record PASS "$name" "PASS $name: $got" else - echo "FAIL $name: got [$got] want [$want]" + pgc_record FAIL "$name" "FAIL $name: got [$got] want [$want]" fail=1 fi } @@ -252,8 +275,10 @@ fi echo if [ "$fail" = "0" ]; then + echo "checks run: $PGC_CHECKS" echo "PHASE 6 TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "PHASE 6 TEST FAILED" echo "---- server log tail ----" run_pg "tail -60 '$LOGFILE'" || true diff --git a/test/smoke.sh b/test/smoke.sh index 8207215e..49b43809 100755 --- a/test/smoke.sh +++ b/test/smoke.sh @@ -122,7 +122,7 @@ fail=0 # looking for the ACCOUNTING line -- `run_all_versions.sh` calls # `pgc_log_shows_accounting`, which greps for # `accounting: N passed + N failed + N unrunnable + N skipped = N` -- and this -# suite emits none, because it does not call `pgc_summary`. Measured: 0 accounting +# suite emits none, because it emits no accounting line. Measured: 0 accounting # lines here against 1 in any suite that does. # # The line is still correct and still wanted: it is the total the records diff --git a/test/unique_conc.sh b/test/unique_conc.sh index 304119d8..af93dc5a 100755 --- a/test/unique_conc.sh +++ b/test/unique_conc.sh @@ -54,7 +54,10 @@ # Own harness rather than lib.sh; portlib carries the port band. -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" set -uo pipefail @@ -158,11 +161,31 @@ ctl_q() { run_pg "$PSQL -c \"$1\""; } ctl_qe() { run_pg "$SPSQL -c \"$1\" 2>&1"; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { # name got want if [ "$2" = "$3" ]; then - echo "PASS $1: $2" + pgc_record PASS "$1" "PASS $1: $2" else - echo "FAIL $1: got [$2] want [$3]" + pgc_record FAIL "$1" "FAIL $1: got [$2] want [$3]" fail=1 fi } @@ -563,8 +586,10 @@ send sh "\\q" echo if [ "$fail" = 0 ]; then + echo "checks run: $PGC_CHECKS" echo "UNIQUE_CONC TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "UNIQUE_CONC TEST FAILED" fi exit "$fail" diff --git a/test/update_conc.sh b/test/update_conc.sh index 592d2494..201bd05a 100755 --- a/test/update_conc.sh +++ b/test/update_conc.sh @@ -63,7 +63,10 @@ # Own harness rather than lib.sh; portlib carries the port band. -. "$(dirname "${BASH_SOURCE[0]}")/portlib.sh" +# lib.sh for the check vocabulary (#965). It sources portlib.sh itself +# (lib.sh:110), so this is a superset of what was here, and its top level is +# assignments and function definitions only, so sourcing it starts nothing. +. "$(dirname "${BASH_SOURCE[0]}")/lib.sh" set -uo pipefail @@ -156,11 +159,31 @@ SPSQL="psql -h '$WORKDIR' -p $PORT -d upconc -qAtX" ctl_q() { run_pg "$PSQL -c \"$1\""; } fail=0 +# RECORDS RATHER THAN ONLY PRINTING (#965). This suite emitted human PASS lines +# and no RESULT records, so every mechanism built on the record vocabulary -- the +# ledger, the census, checks_never_observed_red, the red-observation record, +# duplicate-name detection -- was blind to all of them. The ledger did not merely +# return nothing on this log, it REFUSED it: "no RESULT records, so there is +# nothing to reconcile". +# +# `pgc_record` takes the DISPLAY whole, so the human output below is byte-for-byte +# what it was. NOT lib.sh's own `check`: that composes its own display and would +# drop the `: $got` suffix, which is the measured value rather than a label. +# +# `fail` is still set, so this suite's exit logic is untouched. Its verdict line +# stays for the same reason: under `set -euo pipefail` a failing command aborts the +# suite, and the verdict is what distinguishes finished from stopped. +# +# The `checks run:` line is READ BY NOTHING YET. The matrix gates reconciliation on +# the ACCOUNTING line via `pgc_log_shows_accounting`, and this suite emits none +# because it emits no accounting line. The line is still correct and wanted -- +# it is the total the records reconcile against -- so the remaining step is a gate +# flip rather than new work (@jdatcmd, #969 review). check() { # name got want if [ "$2" = "$3" ]; then - echo "PASS $1: $2" + pgc_record PASS "$1" "PASS $1: $2" else - echo "FAIL $1: got [$2] want [$3]" + pgc_record FAIL "$1" "FAIL $1: got [$2] want [$3]" fail=1 fi } @@ -453,8 +476,10 @@ send s2 "\\q" echo if [ "$fail" = 0 ]; then + echo "checks run: $PGC_CHECKS" echo "UPDATE CONCURRENCY TEST PASSED" else + echo "checks run: $PGC_CHECKS" echo "UPDATE CONCURRENCY TEST FAILED" fi exit "$fail" From 19ddb4a33a122ab8c7c368d1d2c545964a5a0fe9 Mon Sep 17 00:00:00 2001 From: OffgridwithJD Date: Fri, 11 Sep 2026 16:37:21 +0000 Subject: [PATCH 4/4] test: the remainder is fifty-eight on PG18, not fifty-seven (#965) The previous paragraph quoted fifty-seven, which is the PG16 figure. The difference is audit.sh:293: the partitioned-parent arm is gated on server_version_num >= 170000, and its expect_error runs on PG18 and not on PG16. Measured on both majors, each in its own build tree. CHANGELOG prose only; no code, no test, and no behaviour changes. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Uf6UoeBRZYLQZa4KxNiw8a --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fba281d..d78160d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1480,9 +1480,10 @@ true until the next version shipped. `set -uo pipefail`, and the case was reported nowhere at all. It now emits a SKIP record with its reason. - Fifty-seven checks across four of the suites are still not recorded, because those - suites have further check-like helpers of their own -- `eq_on_off` in `phase6` - alone accounts for thirty-nine -- each printing its own display. Those need a + Fifty-eight checks across four of the suites are still not recorded -- fifty-eight + on PG18 and fifty-seven on PG16, because one of them sits behind a version gate -- + since those suites have further check-like helpers of their own, `eq_on_off` in + `phase6` alone accounting for thirty-nine, each printing its own display. Those need a second pass rather than the same substitution, and the count in #965 should be read as the number of checks rather than the number of helpers.