Skip to content

Canary verification PR for the shared claude-code-review.yml workflow - #90

Open
jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:claude-review-canary-check
Open

jnasbyupgrade wants to merge 2 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:claude-review-canary-check

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Deliberate canary-verification PR for #89's migration to Postgres-Extensions/ai's shared, reusable claude-code-review.yml — not real feature work. That migration's own CI couldn't exercise the new pull_request_target workflow (GitHub reads that trigger's workflow file from the base branch as it stood before the triggering PR), so this PR is the actual end-to-end proof.

The change itself (bin/create-worktree.sh) is small and genuinely useful — it prints the created worktree's absolute path, since the layout printed above it is relative to bin/ and not safe to paste into a cd from an arbitrary shell — but it also contains one deliberately findable minor issue (an inconsistent variable-naming convention) to confirm the review posts a real inline comment, not just that the job ran.

Safe to close without merging once verified.

jnasbyupgrade and others added 2 commits September 17, 2026 15:33
Replaces the hand-maintained review workflow with a thin caller into Postgres-Extensions/ai's reusable `workflow_call` version, so a future fix lands here without a manual copy. pgxntool-test is the permanent canary for that shared workflow, pinned to `@main` rather than `@v1`, so a change runs here for real before the `v1` tag protecting the other consuming repos is ever moved to include it. This also picks up the `--comment` fix for the silent-review-failure bug that the old per-repo copy still carried.

**This PR cannot be fully validated by its own CI.** A `pull_request_target` workflow change only takes effect after merging to the base branch, and even then it's only exercised by a *subsequent* PR event against this repo — this PR's own CI run still uses the old workflow file. What's verified here is structural correctness only: the YAML parses, `Postgres-Extensions/ai/.github/workflows/claude-code-review.yml@main` resolves (`gh api repos/Postgres-Extensions/ai/contents/.github/workflows/claude-code-review.yml?ref=main` returns the file), the repo's default workflow permissions (`read`) and secret availability match what every other caller relies on via `secrets: inherit`, and `git merge-tree` against `upstream/master` is clean.

Once merged, the real proof is the next PR opened against this repo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The printed layout is relative to bin/, not safe to paste into a `cd`
from an arbitrary shell.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 17, 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: Advanced

Run ID: 9c0ababb-a2bd-4596-b619-a739f3e54848

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

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.

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 3m 24s —— View job


Code Review — PR #90 (canary verification)

  • Gather context (PR diff, description, CLAUDE.md conventions)
  • Run /code-review on the diff
  • Post inline comments to the PR
  • Update this summary comment

Scope: 6-line diff in bin/create-worktree.sh — prints the created worktree's absolute path after creation. This PR is a deliberate canary to verify the new shared claude-code-review.yml reusable workflow (from #89) actually exercises pull_request_target end-to-end and posts real inline comments.

Finding (as intended by the PR description):

bin/create-worktree.sh:45 — the new absPath variable uses camelCase, while every other variable in the script (WORKTREE_NAME, SCRIPT_DIR, WORKTREES_BASE, WORKTREE_DIR) uses UPPER_SNAKE_CASE. Posted as an inline suggestion renaming it to ABS_PATH, plus a follow-up inline comment flagging that the $absPath reference on line 47 must be updated too if the suggestion is applied (otherwise set -u would fail on an unbound variable).

No other issues found (removed-behavior, cross-file breakage, reuse/simplification/efficiency, and CLAUDE.md convention checks were all clean — the added cd "$WORKTREE_DIR" && pwd mirrors the existing idiom at line 14).

Inline comments posted:

This confirms the canary's goal: the shared workflow ran via pull_request_target, produced a real inline finding (not just a green CI run), matching the deliberately-introduced naming issue described in the PR body. Per the PR description, this is safe to close without merging once verified.

Comment thread bin/create-worktree.sh

# Resolve to an absolute path since WORKTREE_DIR above is relative to
# SCRIPT_DIR and not safe to paste into a `cd` from an arbitrary shell.
absPath="$(cd "$WORKTREE_DIR" && pwd)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absPath breaks the naming convention used everywhere else in this script — WORKTREE_NAME, SCRIPT_DIR, WORKTREES_BASE, and WORKTREE_DIR are all UPPER_SNAKE_CASE. For consistency this should be ABS_PATH (or reuse/extend WORKTREE_DIR directly rather than introducing a new variable with a different case style).

Suggested change
absPath="$(cd "$WORKTREE_DIR" && pwd)"
ABS_PATH="$(cd "$WORKTREE_DIR" && pwd)"

Comment thread bin/create-worktree.sh
# SCRIPT_DIR and not safe to paste into a `cd` from an arbitrary shell.
absPath="$(cd "$WORKTREE_DIR" && pwd)"
echo
echo "Absolute path: $absPath"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: if you rename the variable on line 45 to ABS_PATH per the previous comment's suggestion, this reference needs to change too ($absPath$ABS_PATH), otherwise this becomes an unbound-variable error under set -u.

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