Skip to content

Add coverage for pgtle.sh 'stable' pseudo-version support (issue #57) - #30

Merged
jnasbyupgrade merged 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-57-pgtle-version-regex
Jul 26, 2026
Merged

Add coverage for pgtle.sh 'stable' pseudo-version support (issue #57)#30
jnasbyupgrade merged 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-57-pgtle-version-regex

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Summary

Paired with pgxntool PR Postgres-Extensions/pgxntool#63, which fixes pgtle.sh's extract_version_from_filename() rejecting non-numeric version aliases like stable (issue #57).

  • Adds one test, pgtle: stable pseudo-version alias is not rejected (issue #57), right after the existing whitespace-parsing regression test in test/sequential/04-pgtle.bats.
  • It creates a temp control file plus a base numeric version file (stable_test--1.0.0.sql), a base stable version file (stable_test--stable.sql), and a numeric-to-stable upgrade path (stable_test--1.0.0--stable.sql), then runs pgtle.sh --extension stable_test --pgtle-version 1.5.0+ and checks the generated SQL registers both versions, the upgrade path, and set_default_version.
  • Kept to a single consolidated @test (multiple related assertions) rather than splitting into several, per this repo's guidance on BATS per-test overhead.

Test plan

  • Full suite passes: 216/216, 0 failures, 0 skips (run against the tletest PG cluster, PGCLUSTER=17/tletest PGPORT=5418, so pg_tle coverage was fully exercised).
  • New test confirmed passing end-to-end (ok 54 pgtle: stable pseudo-version alias is not rejected (issue #57)), driven through the full pgtle.sh CLI path.

Related pgxntool PR fixes extract_version_from_filename() rejecting
non-numeric version segments. Adds one test that exercises the full
pgtle.sh CLI path with a base numeric version file, a base 'stable'
version file, and a numeric-to-stable upgrade path, verifying the
generated SQL registers both versions and the upgrade path correctly.
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ebd3ae78-4fbf-4ad7-a2bd-99450ad9741d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jnasbyupgrade
jnasbyupgrade marked this pull request as ready for review July 26, 2026 21:43
@jnasbyupgrade
jnasbyupgrade merged commit c25033e into Postgres-Extensions:master Jul 26, 2026
10 checks passed
jnasbyupgrade added a commit to Postgres-Extensions/pgxntool that referenced this pull request Jul 26, 2026
#63)

It was being over-restrictive by mandating semantic versioning.

Related changes in pgxntool-test:
- Add coverage for the 'stable' pseudo-version alias in pgtle.sh
  (Postgres-Extensions/pgxntool-test#30, commit c25033e)
jnasbyupgrade added a commit to jnasbyupgrade/pgxntool-test that referenced this pull request Jul 26, 2026
…site merges

/commit's two-phase cross-reference process only covers composing a PR
branch's own commits before merge -- it can't help once merging happens
via the GitHub website, outside AI control, which is how PRs actually
land here now. There was no process for catching a paired commit that
merged without its cross-reference until this was caught manually on
issue #57's fix (pgxntool commit a3e4062 landed without referencing
its pgxntool-test coverage in PR Postgres-Extensions#30).

Adds a new crossref-audit skill: find the last release tag in each
repo, list commits since it, identify genuinely paired commits (a
real code+test relationship, not just similar-sounding independent
fixes), and check each side references the other. Single missing
tip-of-master commit newer than the last release can be fixed directly
(amend + force-push, verified content-identical first); more than one
missing, or anything at/before the last release, always stops and asks
rather than acting.

Also documents in CLAUDE.md that PR merges happen outside AI control
in this workflow, and points to the new skill at session startup and
before any master-rebase.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
jnasbyupgrade added a commit to jnasbyupgrade/pgxntool-test that referenced this pull request Jul 26, 2026
…site merges

/commit's two-phase cross-reference process only covers composing a PR
branch's own commits before merge -- it can't help once merging happens
via the GitHub website, outside AI control, which is how PRs actually
land here now. There was no process for catching a paired commit that
merged without its cross-reference until this was caught manually on
issue #57's fix (pgxntool commit a3e4062 landed without referencing
its pgxntool-test coverage in PR Postgres-Extensions#30).

Adds a new crossref-audit skill: find the last release tag in each
repo, list commits since it, identify genuinely paired commits (a
real code+test relationship, not just similar-sounding independent
fixes), and check each side references the other. Single missing
tip-of-master commit newer than the last release can be fixed directly
(amend + force-push, verified content-identical first); more than one
missing, or anything at/before the last release, always stops and asks
rather than acting.

Also documents in CLAUDE.md that PR merges happen outside AI control
in this workflow, and points to the new skill at session startup and
before any master-rebase.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant