Fix results ordering, control file whitespace, ENABLE_* override, debug levels#31
Open
jnasbyupgrade wants to merge 4 commits into
Open
Fix results ordering, control file whitespace, ENABLE_* override, debug levels#31jnasbyupgrade wants to merge 4 commits into
jnasbyupgrade wants to merge 4 commits into
Conversation
…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>
2 tasks
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>
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-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: single-digit values (1–4) replaced with range-based values (30, 40, 50) perlib.shconventionlib.shdebug comment to describe range-based scheme (1–9, 10–19, 20–29...) rather than vague "multiples"CLAUDE.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