Skip to content

Fix claude-review's trust gate: allow same-repo PRs, not just the old fork#16

Draft
jnasbyupgrade wants to merge 2 commits into
masterfrom
fix-claude-review-gate
Draft

Fix claude-review's trust gate: allow same-repo PRs, not just the old fork#16
jnasbyupgrade wants to merge 2 commits into
masterfrom
fix-claude-review-gate

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

The gate checked github.event.pull_request.head.repo.owner.login == 'jnasbyupgrade', written back when PRs came from that personal fork. Now that the convention is to push branches directly to this repo instead (never the fork), every PR's head repo owner is Postgres-Extensions, not jnasbyupgrade - so the condition never matched and claude-review silently skipped on every single PR this session (#12, #13, #14 all show it as skipped). Replaced with head.repo.full_name == github.repository, which is actually a tighter trust boundary than the old check: it only allows PRs whose head branch lives in this exact repo, requiring push access here, rather than naming one specific external fork as trusted.

Also adds a pg-tle-test CI job, porting the smoke-test portion of cat_tools' pg-tle-test job (Postgres-Extensions/cat_tools PR #47): build pg_tle 1.5.2 from source, register count_nulls against template1 purely through pg_tle (never make install'ed), and verify via bin/assert_fs_clean (copied over unchanged, already extension-agnostic) that nothing lands on disk while a fresh CREATE EXTENSION count_nulls in a smoke-test db resolves and null_count() actually works. Matrix is [17, 16, 15, 14, 13, 12] for this job - count_nulls supports 10-17 but pg_tle 1.5.2 only supports 12+ (pgxntool/pgtle_versions.md), so 10 and 11 are dropped here. Not porting cat_tools' update-path portion (TEST_EXISTING_DEPLOY=pgtle bin/test_existing update-scenario ...): count_nulls' master has no bin/test_existing at all - that only exists on the still-unmerged extension-update-test/pgxntool-update branches. Once that lands, the update-path half can be added the same way.

Known blocker on the new job, tracked separately: pgtle.sh's extract_version_from_filename() rejects count_nulls' stable pseudo-version files (sql/count_nulls--stable.sql, sql/count_nulls--1.0.0--stable.sql) with "Cannot parse version from filename" - a pre-existing bug in vendored pgxntool, not something introduced here. Filed as Postgres-Extensions/pgxntool#57. The pg-tle-test job will stay red until that's fixed upstream and synced down; the claude-review gate fix and the rest of the job are unaffected and independently correct.

… fork

The gate checked github.event.pull_request.head.repo.owner.login == 'jnasbyupgrade',
written back when PRs came from that personal fork. Now that the convention is to
push branches directly to this repo instead (never the fork), every PR's head repo
owner is Postgres-Extensions, not jnasbyupgrade - so the condition never matched and
claude-review silently skipped on every single PR this session (#12, #13, #14 all
show it as skipped). Replaced with head.repo.full_name == github.repository, which
is actually a tighter trust boundary than the old check: it only allows PRs whose
head branch lives in this exact repo, requiring push access here, rather than
naming one specific external fork as trusted.
@coderabbitai

coderabbitai Bot commented Jul 25, 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: 675395f1-6be1-427f-8161-e47ae3a5294d

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
  • Commit unit tests in branch fix-claude-review-gate

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.

…h pg_tle

Ports the smoke-test portion of cat_tools' pg-tle-test job (Postgres-Extensions/cat_tools PR #47) so count_nulls gets the same coverage: build pg_tle 1.5.2 from source, register the extension against template1 via pg_tle instead of a filesystem .control file, and verify with bin/assert_fs_clean (copied over unchanged - it's already extension-agnostic) that nothing ever lands on disk while a fresh CREATE EXTENSION count_nulls in a smoke-test db resolves and null_count() actually works.

Matrix is [17, 16, 15, 14, 13, 12] for this job specifically: count_nulls' own supported range is 10-17, but pg_tle 1.5.2 only supports 12+ (pgxntool/pgtle_versions.md), so 10 and 11 are dropped here.

Deliberately NOT porting cat_tools' update-path portion (TEST_EXISTING_DEPLOY=pgtle bin/test_existing update-scenario ...): count_nulls' master has no bin/test_existing at all - that infrastructure only exists on the still-unmerged extension-update-test/pgxntool-update branches. Once that lands, the update-path half of this job can be added the same way cat_tools did it.
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