Fix results ordering, control file whitespace, ENABLE_* overrides#19
Merged
jnasbyupgrade merged 4 commits intoJul 14, 2026
Merged
Conversation
1 task
Contributor
Author
|
@claude please review this PR. |
2292b3f to
5fa8993
Compare
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2ef76e6 to
44c65bc
Compare
…ce, overrides) Add tests/updates for pgxntool commit 20c2552: - Fix `results:` ordering: `verify-results` now runs after `test` (not before) - Fix `parse_control_file` trailing whitespace stripping (multiple spaces/tabs) - Add `override` to `PGXNTOOL_ENABLE_*` so command-line values are normalized - `make-results.bats`: new test verifying `verify-results` blocks `make results` when tests are failing; updated comments - `test-verify-results.bats`: remove `make results` assertion (now requires PostgreSQL since `make results` runs `make test` first); add clarifying comments - New `04-pgtle.bats` test: `pgtle.sh` handles multiple spaces and tab before trailing comment in control files - `template-multi-extension/ext_beta.control`: use multiple spaces before trailing comment to exercise whitespace trimming - `multi-extension.bats`: update comments for multiple-spaces testing - `test.md` agent: fix debug level description (BATS 1–5 scale vs `lib.sh` 10–50) - `gather-repo-info.sh`: add sanity check for invalid debug levels Co-Authored-By: Claude <noreply@anthropic.com>
Updates for pgxntool commit 6e707bb (clarify debug() level scheme): - `lib.sh` comment updated to range-based scheme (1-9, 10-19, 20-29...) `test/lib/helpers.bash`: `debug()` now checks `$TESTDEBUG` instead of `$DEBUG`, so test infrastructure verbosity and pgxntool script verbosity are independently controlled. Use `TESTDEBUG=N` for test runs, `DEBUG=N` for pgxntool scripts. `.claude/skills/commit/SKILL.md`: Added Step 2b — advisory scan of debug level distribution in changed pgxntool `.sh` files at commit time. Flags scripts with loops but only single-digit levels, or 5+ calls all at the same level. `.claude/agents/test.md`, `.claude/settings.json`: Updated all `DEBUG=` references to `TESTDEBUG=`; corrected stale debug level descriptions to match helpers.bash. `.claude/skills/test/scripts/run-tests.sh`: Derive `PGPORT` from `PGCLUSTER` at startup so pg_regress and raw PostgreSQL binaries use the correct cluster port. Co-Authored-By: Claude <noreply@anthropic.com>
The commit-time check flagged any two-digit level not divisible by 10, contradicting the debug() scheme (levels are anchors, not strict multiples -- 11/15/25 are fine). Overkill; removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The template's base.sql/pgxntool-test.sql lacked \set ECHO none, so pg_regress echoed SQL input into results and the expected files didn't match. Dormant until pgxntool's verify-results began re-running the suite (the ordering fix in the paired pgxntool PR), which surfaced it. Add \set ECHO none and regenerate expected output. Also update test-verify-results.bats to assert the new "verify-results depends on test" behavior instead of the old ordering. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
e2a135b to
86b3a87
Compare
jnasbyupgrade
added a commit
to Postgres-Extensions/pgxntool
that referenced
this pull request
Jul 14, 2026
…ug levels (#31) Related pgxntool-test PR: Postgres-Extensions/pgxntool-test#19 ## Summary - Fix `results:` prerequisite ordering: `verify-results` ran before `make test`, checking stale `regression.diffs` from a prior run; reordered to `results: test verify-results` - Fix `parse_control_file` trailing whitespace: `${value%% }` only stripped one trailing space; now uses a regex to strip all trailing spaces and tabs (e.g. `default_version = '1.0.0' # comment`) - Add `override` to `PGXNTOOL_ENABLE_TEST_BUILD`/`PGXNTOOL_ENABLE_TEST_INSTALL` so command-line values are normalized by `pgxntool_validate_yesno` rather than silently ignored - Fix `pgtle.sh` debug levels: stray single-digit values (1–4) replaced with verbosity tiers (30/40/50) consistent with the `lib.sh` scheme - Rework the `debug()` level docs in `lib.sh` and `.claude/development.md`: levels encode **verbosity/esotericness, not code nesting depth** (a top-level line can be high if it's esoteric; loop-body detail is high because it's noisy). The `10/20/30/40/50` tiers are anchors, not strict multiples of 10 — any in-range value is fine, so fine-tuning needs no renumbering - Clarify `CLAUDE.md` audience: for extension developers using pgxntool, not contributors; redirect contributors to `.claude/` - Move developer guidelines (Makefile `:=` rules, debug level rules) from `CLAUDE.md` into `.claude/development.md`, which also now prominently states that pgxntool changes must be made from a pgxntool-test checkout - Update `HISTORY.asc` with entries for the two user-visible fixes --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related pgxntool PR: Postgres-Extensions/pgxntool#31
Summary
Tests and template updates for pgxntool PR #31:
make-results.bats: new test verifyingverify-resultsblocksmake resultswhen tests are failing (exercises the fixedresults: test verify-resultsordering)test-verify-results.bats: realigned to the newresults: testordering —verify-resultsnow runs the suite, so tests that assumed otherwise were updated/renamed, with clarifying comments04-pgtle.batstest:pgtle.shcorrectly handles multiple spaces and a tab before a trailing comment in control filestemplate-multi-extension/ext_beta.control: use multiple spaces before trailing comment to exercise whitespace trimmingmulti-extension.bats: update comments for multiple-spaces testing\set ECHO nonetobase.sql/pgxntool-test.sqlso pg_regress output is stable across psql versions, and regenerate the matching expected output — fixes a latent template mismatch that #31'sverify-results: testchange surfacedtest.mdagent: fix debug level description (the BATS$TESTDEBUG1–5 scale is separate fromlib.sh's verbosity scale)