Skip to content

feat(pr-review): self-host pin via trigger stub — reusable-only (#497/#506) - #523

Merged
don-petry merged 2 commits into
mainfrom
feat/issue-497-self-host-stub
Jun 9, 2026
Merged

don-petry merged 2 commits into
mainfrom
feat/issue-497-self-host-stub

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

The ring-0 self-host pin. Flips .github-private's own pr-review to run the pinned pr-review/stable version, breaking the self-hosting circular dependency.

Squash-merge flips both atomically (no review-coverage gap). Mention flow preserved (repository_dispatch). After merge I'll validate the stub fires + reviews at @stable, and revert if not. Part of #497 · epic #495.

…#506)

Flip .github-private's own pr-review to run the pinned known-good version,
breaking the self-hosting circular dependency for ring 0.

- pr-review.yml: now reusable-only (event triggers removed). Its job is
  unchanged and still reads github.event.* (inherited) + inputs.* (forwarded).
- pr-review-trigger.yml (new): thin stub carrying the review event triggers
  (check_suite, pull_request_review, pull_request, workflow_dispatch,
  repository_dispatch=pr-review-mention) that calls
  pr-review.yml@pr-review/stable with agent_ref=pr-review/stable, so BOTH the
  workflow and the agent scripts run at the pinned channel (#506) regardless of
  what is on the branch under review.

Squash-merge flips both atomically (no review-coverage gap). Promotion is a
pr-review/stable tag move; this stub never changes. Mention flow preserved via
the repository_dispatch trigger. Part of #497 · epic #495.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner June 9, 2026 21:15
@don-petry don-petry added the initiative Epic / initiative tracking issue label Jun 9, 2026
Copilot AI review requested due to automatic review settings June 9, 2026 21:15
@don-petry don-petry added the initiative Epic / initiative tracking issue label Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes and 49 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a76fe9e2-311c-4f8e-a182-387a45fe48e2

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd8975 and 33eb64a.

📒 Files selected for processing (3)
  • .github/workflows/pr-review-trigger.yml
  • .github/workflows/pr-review.yml
  • scripts/pr_review_health.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-497-self-host-stub

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 and usage tips.

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

https://github.com/petry-projects/.github-private/blob/017721cb8069d31096c0238d7e041f62b9b66d01/.github/workflows/pr-review.yml#L3-L4
P2 Badge Keep deployed PR-review workflow runnable

In this repo I checked .github/workflows/deploy-pr-review.yml:46 and .github/workflows/force-deploy-pr-review.yml:37; both still copy .github/workflows/pr-review.yml into target repos as their PR-review workflow. After this change that file only exposes workflow_call, so the next deploy would overwrite those repos' event/manual triggers with a reusable-only workflow and PR review would stop running there. Please either update the deploy jobs to ship a trigger stub or keep the deployed workflow triggerable.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +54 to +56
jobs:
review:
uses: petry-projects/.github-private/.github/workflows/pr-review.yml@pr-review/stable

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Point health checks at the trigger workflow

The daily health script still hard-codes WORKFLOW_FILE="pr-review.yml" and queries actions/workflows/${WORKFLOW_FILE}/runs in scripts/pr_review_health.sh, but these events now create runs for the caller workflow (pr-review-trigger.yml) while the reusable workflow's jobs are nested inside that run. Once this lands, failed PR-review executions will be recorded under the trigger workflow, so the health check can report success after inspecting zero/stale pr-review.yml runs. Please update the health check to query the new trigger workflow (or both files).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in scripts/pr_review_health.sh: changed WORKFLOW_FILE from pr-review.yml to pr-review-trigger.yml. Now that pr-review.yml is reusable-only, all event-triggered runs are recorded under the trigger stub, so the health check queries the right workflow and will no longer inspect a stale/empty run list.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 9, 2026 21:21
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@don-petry
don-petry disabled auto-merge June 9, 2026 21:21
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR breaks the self-hosting circular dependency for .github-private’s PR review automation by moving event triggers into a thin “trigger stub” workflow that calls the actual review workflow pinned to the pr-review/stable channel tag, ensuring both the workflow logic and the checked-out agent scripts run from the same pinned ref.

Changes:

  • Converted .github/workflows/pr-review.yml to reusable-only (workflow_call only) by removing its direct event triggers.
  • Added .github/workflows/pr-review-trigger.yml, which owns the event triggers and calls pr-review.yml@pr-review/stable with agent_ref: pr-review/stable.
  • Preserved manual and mention-triggered entrypoints (workflow_dispatch, repository_dispatch) via the new stub.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/pr-review.yml Removes event triggers to make the workflow reusable-only and callable from a pinned ref.
.github/workflows/pr-review-trigger.yml New trigger stub that carries event triggers and invokes the reusable workflow pinned to pr-review/stable, forwarding key inputs.

@don-petry
don-petry merged commit 819d1a2 into main Jun 9, 2026
26 of 27 checks passed
@don-petry
don-petry deleted the feat/issue-497-self-host-stub branch June 9, 2026 21:23
don-petry added a commit that referenced this pull request Jun 12, 2026
…506) (#523)

* feat(pr-review): self-host pin via trigger stub (reusable-only) (#497, #506)

Flip .github-private's own pr-review to run the pinned known-good version,
breaking the self-hosting circular dependency for ring 0.

- pr-review.yml: now reusable-only (event triggers removed). Its job is
  unchanged and still reads github.event.* (inherited) + inputs.* (forwarded).
- pr-review-trigger.yml (new): thin stub carrying the review event triggers
  (check_suite, pull_request_review, pull_request, workflow_dispatch,
  repository_dispatch=pr-review-mention) that calls
  pr-review.yml@pr-review/stable with agent_ref=pr-review/stable, so BOTH the
  workflow and the agent scripts run at the pinned channel (#506) regardless of
  what is on the branch under review.

Squash-merge flips both atomically (no review-coverage gap). Promotion is a
pr-review/stable tag move; this stub never changes. Mention flow preserved via
the repository_dispatch trigger. Part of #497 · epic #495.

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

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 14, 2026
…506) (#523)

* feat(pr-review): self-host pin via trigger stub (reusable-only) (#497, #506)

Flip .github-private's own pr-review to run the pinned known-good version,
breaking the self-hosting circular dependency for ring 0.

- pr-review.yml: now reusable-only (event triggers removed). Its job is
  unchanged and still reads github.event.* (inherited) + inputs.* (forwarded).
- pr-review-trigger.yml (new): thin stub carrying the review event triggers
  (check_suite, pull_request_review, pull_request, workflow_dispatch,
  repository_dispatch=pr-review-mention) that calls
  pr-review.yml@pr-review/stable with agent_ref=pr-review/stable, so BOTH the
  workflow and the agent scripts run at the pinned channel (#506) regardless of
  what is on the branch under review.

Squash-merge flips both atomically (no review-coverage gap). Promotion is a
pr-review/stable tag move; this stub never changes. Mention flow preserved via
the repository_dispatch trigger. Part of #497 · epic #495.

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

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 18, 2026
…506) (#523)

* feat(pr-review): self-host pin via trigger stub (reusable-only) (#497, #506)

Flip .github-private's own pr-review to run the pinned known-good version,
breaking the self-hosting circular dependency for ring 0.

- pr-review.yml: now reusable-only (event triggers removed). Its job is
  unchanged and still reads github.event.* (inherited) + inputs.* (forwarded).
- pr-review-trigger.yml (new): thin stub carrying the review event triggers
  (check_suite, pull_request_review, pull_request, workflow_dispatch,
  repository_dispatch=pr-review-mention) that calls
  pr-review.yml@pr-review/stable with agent_ref=pr-review/stable, so BOTH the
  workflow and the agent scripts run at the pinned channel (#506) regardless of
  what is on the branch under review.

Squash-merge flips both atomically (no review-coverage gap). Promotion is a
pr-review/stable tag move; this stub never changes. Mention flow preserved via
the repository_dispatch trigger. Part of #497 · epic #495.

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

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…506) (#523)

* feat(pr-review): self-host pin via trigger stub (reusable-only) (#497, #506)

Flip .github-private's own pr-review to run the pinned known-good version,
breaking the self-hosting circular dependency for ring 0.

- pr-review.yml: now reusable-only (event triggers removed). Its job is
  unchanged and still reads github.event.* (inherited) + inputs.* (forwarded).
- pr-review-trigger.yml (new): thin stub carrying the review event triggers
  (check_suite, pull_request_review, pull_request, workflow_dispatch,
  repository_dispatch=pr-review-mention) that calls
  pr-review.yml@pr-review/stable with agent_ref=pr-review/stable, so BOTH the
  workflow and the agent scripts run at the pinned channel (#506) regardless of
  what is on the branch under review.

Squash-merge flips both atomically (no review-coverage gap). Promotion is a
pr-review/stable tag move; this stub never changes. Mention flow preserved via
the repository_dispatch trigger. Part of #497 · epic #495.

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

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…506) (#523)

* feat(pr-review): self-host pin via trigger stub (reusable-only) (#497, #506)

Flip .github-private's own pr-review to run the pinned known-good version,
breaking the self-hosting circular dependency for ring 0.

- pr-review.yml: now reusable-only (event triggers removed). Its job is
  unchanged and still reads github.event.* (inherited) + inputs.* (forwarded).
- pr-review-trigger.yml (new): thin stub carrying the review event triggers
  (check_suite, pull_request_review, pull_request, workflow_dispatch,
  repository_dispatch=pr-review-mention) that calls
  pr-review.yml@pr-review/stable with agent_ref=pr-review/stable, so BOTH the
  workflow and the agent scripts run at the pinned channel (#506) regardless of
  what is on the branch under review.

Squash-merge flips both atomically (no review-coverage gap). Promotion is a
pr-review/stable tag move; this stub never changes. Mention flow preserved via
the repository_dispatch trigger. Part of #497 · epic #495.

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

* chore: apply manual instructions [skip ci-relay]

---------

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

initiative Epic / initiative tracking issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants