Fix results ordering, control file whitespace, ENABLE_* override, debug levels#31
Conversation
|
@claude please review this PR. |
|
Claude finished @jnasbyupgrade's task in 3m 44s —— View job Review of PR #31
SummaryOverall this is a solid, well-documented set of fixes. The two functional/user-visible fixes ( Finding: pgtle.sh debug levels don't actually follow the new lib.sh scheme
But the values this PR assigns in
Pre-existing usage in
Other things checked, no issues found
I did not run |
0cadc26 to
a92e135
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 |
…ug levels
- Fix `results:` ordering: `verify-results` ran before `make test`, so it
checked stale `regression.diffs`; reordered to `results: test verify-results`
- Fix `parse_control_file` trailing whitespace: `${value%% }` only removed one
space; now uses regex to strip all trailing spaces and tabs
- 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: single-digit values (1–4) replaced with
standard multiples-of-10 (30, 40, 50) per documented convention
- Add Makefile variable assignment and debug level rules to `CLAUDE.md`
Related changes in pgxntool-test:
- New test in `04-pgtle.bats`: verify `pgtle.sh` handles multiple spaces and
tab before trailing comment in control files
- Updated `make-results.bats`: new test verifying `verify-results` blocks
`make results` after a failing test run
- Updated `test-verify-results.bats`: reflect that `make results` now runs
`make test` first
Co-Authored-By: Claude <noreply@anthropic.com>
Update the `debug()` comment in `lib.sh` to document the intended range-based scheme: 1-9 for high-level script context, 10-19 for per-loop-iteration detail, 20-29 for nesting inside that — with room within each decade to fine-tune without renumbering. The old comment described "multiples of 10" which was inaccurate and misleading. Related changes in pgxntool-test: - `helpers.bash`: test `debug()` now uses `$TESTDEBUG` instead of `$DEBUG` - `SKILL.md`: added advisory debug level distribution check to commit workflow Co-Authored-By: Claude <noreply@anthropic.com>
CLAUDE.md is for users of pgxntool. Developer-focused guidelines (Makefile variable assignment rules, debug level scheme) belong in .claude/ where they are visible to contributors but not surfaced to extension developers reading the user docs. Also updates the debug level rules to the range-based scheme documented in lib.sh (1-9, 10-19, 20-29...) rather than the old multiples-of-10 description. Co-Authored-By: Claude <noreply@anthropic.com>
CLAUDE.md is loaded by anyone who has pgxntool embedded in their project. .claude/ is only relevant to people making changes to pgxntool itself. - CLAUDE.md: rewrite "Scope" section to make clear it is for extension developers consuming pgxntool, not for pgxntool contributors - .claude/development.md: add prominent "developers only" header and a "Work from pgxntool-test, Not Here" section explaining why changes must be made from a pgxntool-test checkout (full test infrastructure lives there) - Fix test helper path reference: tests/lib/helpers.bash in pgxntool-test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
`results: test verify-results` lists both as independent prerequisites, so `make -j` can run them concurrently. verify-results may finish before test produces regression.diffs, find no failures, and allow the copy to proceed — defeating the safeguard entirely. Fix: add `verify-results: test` so the dependency chain is explicit. Make guarantees prerequisite ordering only when there is an actual dependency, not when targets are listed as siblings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Level encodes how noisy/esoteric a message is (how far you'd crank DEBUG), not code nesting depth: a top-level line can be high if esoteric, and loop-body detail is usually high because it's noisy. Restores the verbosity tiers the code already follows, keeping the "anchors, not strict multiples" flexibility. Mirrored in .claude/development.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3845a17 to
23a008d
Compare
Related pgxntool PR: Postgres-Extensions/pgxntool#31 ## Summary Tests and template updates for pgxntool PR #31: - `make-results.bats`: new test verifying `verify-results` blocks `make results` when tests are failing (exercises the fixed `results: test verify-results` ordering) - `test-verify-results.bats`: realigned to the new `results: test` ordering — `verify-results` now runs the suite, so tests that assumed otherwise were updated/renamed, with clarifying comments - New `04-pgtle.bats` test: `pgtle.sh` correctly handles multiple spaces and a tab before a 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 - Template test SQL: add `\set ECHO none` to `base.sql`/`pgxntool-test.sql` so pg_regress output is stable across psql versions, and regenerate the matching expected output — fixes a latent template mismatch that #31's `verify-results: test` change surfaced - `test.md` agent: fix debug level description (the BATS `$TESTDEBUG` 1–5 scale is separate from `lib.sh`'s verbosity scale) --------- Co-authored-by: Claude <noreply@anthropic.com>
Related pgxntool-test PR: Postgres-Extensions/pgxntool-test#19
Summary
results:prerequisite ordering:verify-resultsran beforemake test, checking staleregression.diffsfrom a prior run; reordered toresults: test verify-resultsparse_control_filetrailing 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)overridetoPGXNTOOL_ENABLE_TEST_BUILD/PGXNTOOL_ENABLE_TEST_INSTALLso command-line values are normalized bypgxntool_validate_yesnorather than silently ignoredpgtle.shdebug levels: stray single-digit values (1–4) replaced with verbosity tiers (30/40/50) consistent with thelib.shschemedebug()level docs inlib.shand.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). The10/20/30/40/50tiers are anchors, not strict multiples of 10 — any in-range value is fine, so fine-tuning needs no renumberingCLAUDE.mdaudience: for extension developers using pgxntool, not contributors; redirect contributors to.claude/:=rules, debug level rules) fromCLAUDE.mdinto.claude/development.md, which also now prominently states that pgxntool changes must be made from a pgxntool-test checkoutHISTORY.ascwith entries for the two user-visible fixes