release: add behavioral feature-gate coverage - #192
Conversation
26acfb0 to
2b02a08
Compare
Fixes NikolayS#191. Unblocks NikolayS#192.
Fixes NikolayS#191. Unblocks NikolayS#192.
2b02a08 to
f7fae0e
Compare
Fixes NikolayS#191. Unblocks NikolayS#192.
f7fae0e to
041a450
Compare
NikolayS
left a comment
There was a problem hiding this comment.
Codex review standing in for REV — audit verdict: PASS on exact head 041a450. Hand rebase onto main 2ccdf65 correctly dropped the two stacked #194 commits; the only stopped conflict was their obsolete migration-header wording, for which current main is the corrected superset. Range-diff preserves the other 12 commits. Ordinal RED/GREEN reproduced (main attnum 11 and assertion exit 3; head canonical 1–22 with preservation/reapply PASS). Both schema-equivalence paths are byte-identical. The mandated #191 feature gate is 8/8 PASS across four surfaces on PG14 and PG17. All 42 #188-owned shared assertions remain; source-site inventory is 858 before and 993 after (848 inline + 145 shared), with none lost. Old CI's pgss-marker failure was independently reproduced under saturated shared state and fixed narrowly by reset-after-create; enrichment assertions are byte-identical and pass. Codex static review found no blocker. APPROVED.
Keep the Docker tag independent from the numeric package major so the same image definition supports PostgreSQL 14 through 19beta2. Relates to NikolayS#160
Source cron, degraded-mode, and schema snapshots from shared SQL while preserving all 594 workflow assertions. Include attnum in schema snapshots so column-order divergence is visible. Relates to NikolayS#160
Run every gate surface across bounded parallel PostgreSQL workers, reuse exact CI step bodies, emit validated TSV and human summaries, and guarantee ID-scoped container and volume teardown. Relates to NikolayS#160
Rebuild the v1.5 upgrade table in canonical fresh-install order while preserving the singleton row, defaults, constraints, indexes, ownership, ACLs, and comments. Reject unsupported custom dependencies and catalog properties transactionally instead of dropping them. Add an upgrade regression that seeds non-default values and custom catalog objects, verifies preservation, and proves migration reapplication keeps the replacement table OID.
The shared feature step runs after the full workflow has accumulated hundreds of pg_stat_statements entries. Dropping and recreating the extension does not clear the preloaded shared state, so the exact marker query can be missing even though the reader code is correct. Reset pg_stat_statements immediately after recreating it. This preserves the exact ash.top()/ash.samples() enrichment assertions while making their fixture independent of prior workflow activity.
Tag H-CI-3's three synthetic pg_sleep clients, terminate only those tagged backends on every exit, and wait for their client processes. The prior step left all three sessions live for later workflow steps, so features_lifecycle.sql correctly observed four active sleepers instead of its single owned fixture. Keep the exact active_count = 1 and decoded-row assertions unchanged; restore the quiescent precondition they test.
PostgreSQL 19 beta 2 resolves text || jsonb as JSON concatenation, so both B5 ASSERT message expressions raise on the JSON token before reporting the contract. Cast the coverage object explicitly to text. The asserted bounds and minutes-with-data predicates are unchanged; this is a diagnostic typing fix, not a behavior change. The old exact head fails on PG19beta2, while the canonical fresh-install surface passes with these casts.
Combining NikolayS#192 with NikolayS#198 and NikolayS#199 makes test.yml 513,005 bytes, above GitHub Actions' 512,000-byte workflow limit. Move NikolayS#199's exact 110-line transaction fixture to devel/tests and invoke it with the same psql connection and ON_ERROR_STOP behavior. The payload is byte-identical after removing YAML indentation; all nine assertions remain. The combined inventory is 848 inline plus 184 shared, 1,032 total.
ash.ts_from_timestamptz() rounds fractional seconds while casting to int4. report() previously converted first and divided by 60 afterward, so an endpoint at :59.5 or later crossed into the next minute before the documented minute floor. Floor v_from/v_to in timestamp space first. Add a deterministic +59.9-second feature assertion: the old code shifts both bounds and reports three of four data-bearing minutes; the corrected code preserves the exact four-minute coverage. Record the public behavior change in RELEASE_NOTES.md. No assertion is weakened.
After NikolayS#198, grant_reader() correctly discovers 44 non-admin reader functions rather than the pre-NikolayS#198 count of 43. Update both the explicit-role and default pg_monitor feature contracts, and name _exact_query_uses_coarser(integer,integer,name) in a direct EXECUTE assertion so an unrelated 44th grant cannot mask a missing helper. The initial exact PG14/PG17 feature run failed 44-versus-43; all four feature-bearing surfaces now pass on both majors.
08b5f6b to
fcd37d7
Compare
NikolayS
left a comment
There was a problem hiding this comment.
Final exact-head verification on fcd37d71efbe5c2b86b2374b52a07d42194db4b8: APPROVE.
- Hand-rebased onto exact current base
9efad9c. Range-diff maps all 15 original #192 commits patch-identically; only the documented selector extraction, report-boundary fix, and helper-grant assertions follow. - Exact-head CI is green across PG14–PG19beta2, docs, and cron-off: https://github.com/NikolayS/pg_ash/actions/runs/30315785772
- Required hard gate is 8/8 PASS: PG14+PG17 × features/no-cron/no-pgss/neither, with zero
Expected FAIL: #191. - Parent RED proves convert-before-floor shifted both
:59.9report bounds +1 minute and returned 3/4 covered minutes. Final GREEN floors before conversion, preserves all four minutes, and release-notes the behavior change; no assertion was weakened. - The #198 dynamic reader helper made the correct direct function-grant count 44. The final gate asserts both that exact count and named EXECUTE on
_exact_query_uses_coarser(integer,integer,name)for the explicit reader andpg_monitor, while admin negative controls remain. - Assertion inventory is 848 inline + 187 shared = 1,035. All 42/42 original #188-owned shared sites execute on passing paths; those files now contain 44 sites.
- #198 is preserved (30 query-attribution assertions); #199 is preserved byte-for-byte after extraction (9 source-discriminating assertions and the exact
least(until, date_trunc(minute, now()))clamp). - Fresh/dev-upgrade/actual-v1.5 schemas are byte-identical; ordinal, reapply, and OID-stability checks pass.
- Workflow size is 508,364 bytes, below GitHub Actions’ 512,000-byte limit. Shell/YAML/Python syntax, helper unit tests, conflict-marker scan, and diff check pass.
No merge blocker found.
Summary
Fills the per-feature behavioral release-gate gap documented in #160 and absorbs the complete release-gate foundation developed in #188.
pg_monitor, documented reader edges, and pgss text enrichment/degradationattnum-ordered schema snapshot, andash.configordinal normalizationRefs #160, #188, #191, and #194.
Final integration
Hand-rebased onto current main
2ccdf65after #194. The two stacked #194 commits were dropped: the test patch was recognized as upstream, and the implementation duplicate differed only at the migration header where main carries the corrected, non-contradictory wording. Range-diff preserves every other PR commit.Three full-workflow findings were fixed without changing product behavior or weakening an assertion:
DROP/CREATE EXTENSION pg_stat_statementsdoes not clear its preloaded shared state. After thousands of earlier workflow statements, the exact marker could be evicted. The feature driver now callspg_stat_statements_reset()immediately after recreating the extension.pg_sleep(120)clients but retained neither backend identities nor client PIDs. The later lifecycle fixture correctly observed those three plus its own sleeper. H-CI-3 now tags only its workload, terminates those tagged backends, and reaps all three clients on success and failure. The exactactive_count = 1and decoded-row assertions are unchanged.text || jsonbin two ASSERT diagnostic expressions as JSON concatenation. Both coverage objects are now explicitly cast to text. The asserted bounds andminutes_with_datapredicates are unchanged.#188 absorption and assertion conservation
All original 42 #188-owned shared assertion sites remain and are reachable through the canonical runner. Their files now contain 44 sites after adding the current-main failure-counter and trigger-preservation checks.
Using the established
^\s*assert\bsource-site convention across the workflow anddevel/tests/*.sql:No assertion was lost. At #188's original extraction point, its own before/after inventory was 594/594 workflow assertions.
RED/GREEN evidence
ash.config.num_partitionsatattnum=11; the new assertion exits 3. This head normalizes canonical attnums 1–22 (num_partitions=3) and passes preservation plus idempotent reapply checks.08b5f6b, the four feature-bearing surfaces (features,degraded-no-cron,degraded-no-pgss,degraded-neither) all PASS on PG14 and PG17: 8/8, with noExpected FAIL: #191remaining.features_readers.sql:1400; the reset passes the unchanged enrichment assertions.041a450fails every cron-on matrix job with four live sleepers. An isolated PG17 check of the fix removes all three tagged backends and tracked clients while leaving a differently tagged control active.61a7547fails on PG19beta2 withinvalid input syntax for type jsonat the unchanged B5 assertion; exact explicit casts make the canonical PG19beta2 fresh-install surface PASS.Validation
On exact head
08b5f6b:Expected FAIL: #191bash -n devel/scripts/release_gate.sh: PASSgit diff --check: PASSFinal landing rebase
The merge candidate is hand-rebased onto current
mainat9efad9c(after #198 and #199). Exact head:fcd37d7.devel/tests/stale_rollup_source.sql; the workflow is now 508,364 bytes and invokes it in the same psql session.features,degraded-no-cron,degraded-no-pgss, anddegraded-neither: 8/8 PASS, with noExpected FAIL: #191in source or output.ash._exact_query_uses_coarser(integer,integer,name), taking the direct reader-function count from 43 to 44. The final gate expects 44 and also names that helper explicitly for both the feature reader andpg_monitor, so an unrelated 44th grant cannot mask its loss.ash.reportbug: convert-then-floor rounded:59.9endpoints into the following minute. The implementation now floors each bound before epoch conversion. Parent RED shifted both bounds by one minute and reported 4 expected/3 with data; final GREEN covers the exact four-minute range. This user-visible fix is recorded inRELEASE_NOTES.md; no assertion was weakened.git diff --checkpass.This section supersedes the historical base/head and assertion totals above; those remain as the audit trail for the earlier review point.