From d1d614421a8a2a3b1647366dc187ae6ca591e233 Mon Sep 17 00:00:00 2001 From: pb <5535435+pekth@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:37:31 -0500 Subject: [PATCH 1/5] ci: PR-Agent review on Claude through the org workflow, no stored key Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr-agent.yml | 31 +++++++++++++++++++++++++++++++ CHANGELOG.md | 4 ++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/pr-agent.yml diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml new file mode 100644 index 0000000..b73eb68 --- /dev/null +++ b/.github/workflows/pr-agent.yml @@ -0,0 +1,31 @@ +# AI code review with PR-Agent (open source, MIT) on Claude, from the org's shared +# workflow (tilorahdotco/.github, docs/USAGE.md#pr-agent-review). No model key is +# stored: each run exchanges GitHub's identity token for a 15-minute Anthropic token. +# - Reviews a PR when it opens, reopens or leaves draft. +# - Comment `/review` to run it again, `/improve` for code suggestions, or +# `/ask `. Comment commands use this workflow from main. +# Keep this file's name: the federation rule accepts only `.github/workflows/pr-agent.yml`. +name: PR-Agent review + +on: + pull_request: + types: [opened, reopened, ready_for_review] + issue_comment: + types: [created] + +permissions: + contents: read + pull-requests: write + issues: write + id-token: write # GitHub's identity token, exchanged for the Anthropic token + +concurrency: + group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }} + cancel-in-progress: false + +jobs: + review: + name: PR-Agent review + uses: tilorahdotco/.github/.github/workflows/pr-agent.yml@e4a9dab101d96a582cedaba894a70aced464d2a4 + with: + runner: ubuntu-latest # public repository: GitHub-hosted only diff --git a/CHANGELOG.md b/CHANGELOG.md index d474716..afdbe08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project follows [Semantic Versioning](https://semver.org/). +## 2026-11-19 + +- PR-Agent reviews PRs on Claude Opus 5.5 through the org's shared workflow, with no stored model key: each run exchanges GitHub's identity token for a 15-minute Anthropic token in the `pr-cicd` workspace. Comment `/review`, `/improve` or `/ask` on a PR. + ## 2026-11-18 - Antigravity CLI allowance no longer stops refreshing when MeterUsage was From 27f2b0be74a040f39a3315600a8b445084fb4cf5 Mon Sep 17 00:00:00 2001 From: pb <5535435+pekth@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:40:07 -0500 Subject: [PATCH 2/5] ci(pr-agent): keep queued commands when ordinary comments arrive Ordinary comments get their own concurrency group and never start a run, so a queued /improve or /ask is no longer replaced by a no-op run (PR-Agent finding). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr-agent.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index b73eb68..9e95929 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -20,12 +20,16 @@ permissions: id-token: write # GitHub's identity token, exchanged for the Anthropic token concurrency: - group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }} + # An ordinary comment gets its own group, so it never replaces a queued command. + group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name == 'issue_comment' && !startsWith(github.event.comment.body, '/') && github.event.comment.id || 'review' }} cancel-in-progress: false jobs: review: name: PR-Agent review + # Only PR events and `/` commands on a PR start a run. The shared workflow + # re-checks drafts, fork PRs and the comment author's write access. + if: github.event_name == 'pull_request' || (github.event.issue.pull_request && startsWith(github.event.comment.body, '/')) uses: tilorahdotco/.github/.github/workflows/pr-agent.yml@e4a9dab101d96a582cedaba894a70aced464d2a4 with: runner: ubuntu-latest # public repository: GitHub-hosted only From c7cc8f01e80b61249a3212c18dfad4e12bfd6871 Mon Sep 17 00:00:00 2001 From: pb <5535435+pekth@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:44:03 -0500 Subject: [PATCH 3/5] ci(pr-agent): pin the shared workflow with Haiku 5.5 for /ask and /improve Reviews stay on Opus 5.5; /ask and /improve answer with Haiku 5.5 (PB). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr-agent.yml | 2 +- CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index 9e95929..5a39437 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -30,6 +30,6 @@ jobs: # Only PR events and `/` commands on a PR start a run. The shared workflow # re-checks drafts, fork PRs and the comment author's write access. if: github.event_name == 'pull_request' || (github.event.issue.pull_request && startsWith(github.event.comment.body, '/')) - uses: tilorahdotco/.github/.github/workflows/pr-agent.yml@e4a9dab101d96a582cedaba894a70aced464d2a4 + uses: tilorahdotco/.github/.github/workflows/pr-agent.yml@cb672ee45c74b2a1a53a4a2ed43b84c89bff0974 with: runner: ubuntu-latest # public repository: GitHub-hosted only diff --git a/CHANGELOG.md b/CHANGELOG.md index afdbe08..e8b9afb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ follows [Semantic Versioning](https://semver.org/). ## 2026-11-19 -- PR-Agent reviews PRs on Claude Opus 5.5 through the org's shared workflow, with no stored model key: each run exchanges GitHub's identity token for a 15-minute Anthropic token in the `pr-cicd` workspace. Comment `/review`, `/improve` or `/ask` on a PR. +- PR-Agent reviews PRs on Claude Opus 5.5 (and answers `/ask` and `/improve` with Claude Haiku 5.5) through the org's shared workflow, with no stored model key: each run exchanges GitHub's identity token for a 15-minute Anthropic token in the `pr-cicd` workspace. Comment `/review`, `/improve` or `/ask` on a PR. ## 2026-11-18 From 1d3822dea5aa05a9ab6a3bb079c0221baa777d4a Mon Sep 17 00:00:00 2001 From: pb <5535435+pekth@users.noreply.github.com> Date: Wed, 18 Nov 2026 23:00:01 -0500 Subject: [PATCH 4/5] ci(pr-agent): call the shared workflow at main; queue only real commands The federation rule now gives a token only to the shared workflow at its main, so a commit pin is refused. Only /review, /ask and /improve from people with write access share the PR's queue (Fable review findings). Co-Authored-By: Claude Fable 5.2 --- .github/workflows/pr-agent.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index 5a39437..755e78f 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -4,7 +4,8 @@ # - Reviews a PR when it opens, reopens or leaves draft. # - Comment `/review` to run it again, `/improve` for code suggestions, or # `/ask `. Comment commands use this workflow from main. -# Keep this file's name: the federation rule accepts only `.github/workflows/pr-agent.yml`. +# Keep this file's name and the `@main` reference: the federation rule gives a token only +# to the shared workflow at its `main`, called from `.github/workflows/pr-agent.yml`. name: PR-Agent review on: @@ -20,16 +21,17 @@ permissions: id-token: write # GitHub's identity token, exchanged for the Anthropic token concurrency: - # An ordinary comment gets its own group, so it never replaces a queued command. - group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name == 'issue_comment' && !startsWith(github.event.comment.body, '/') && github.event.comment.id || 'review' }} + # Commands from people with write access share one queue per PR. Any other comment + # gets its own group, so it never replaces a queued command. + group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name == 'issue_comment' && !(github.event.issue.pull_request && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) && (startsWith(github.event.comment.body, '/review') || startsWith(github.event.comment.body, '/ask') || startsWith(github.event.comment.body, '/improve'))) && github.event.comment.id || 'review' }} cancel-in-progress: false jobs: review: name: PR-Agent review - # Only PR events and `/` commands on a PR start a run. The shared workflow - # re-checks drafts, fork PRs and the comment author's write access. - if: github.event_name == 'pull_request' || (github.event.issue.pull_request && startsWith(github.event.comment.body, '/')) - uses: tilorahdotco/.github/.github/workflows/pr-agent.yml@cb672ee45c74b2a1a53a4a2ed43b84c89bff0974 + # Only PR events and the three commands start a run. The shared workflow checks + # again: drafts, fork PRs, the author's write access and `--config.` arguments. + if: github.event_name == 'pull_request' || (github.event.issue.pull_request && (startsWith(github.event.comment.body, '/review') || startsWith(github.event.comment.body, '/ask') || startsWith(github.event.comment.body, '/improve'))) + uses: tilorahdotco/.github/.github/workflows/pr-agent.yml@main with: runner: ubuntu-latest # public repository: GitHub-hosted only From 4c12b9c720693eb425d517ff06a89649e5a29504 Mon Sep 17 00:00:00 2001 From: pb <5535435+pekth@users.noreply.github.com> Date: Wed, 18 Nov 2026 23:09:38 -0500 Subject: [PATCH 5/5] ci(pr-agent): give each comment its own run group Reviews stay one at a time per PR. A command is no longer replaced by a later comment or event (PR-Agent finding, third variant: simpler design). Co-Authored-By: Claude Fable 5.2 --- .github/workflows/pr-agent.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-agent.yml b/.github/workflows/pr-agent.yml index 755e78f..dc427de 100644 --- a/.github/workflows/pr-agent.yml +++ b/.github/workflows/pr-agent.yml @@ -21,9 +21,9 @@ permissions: id-token: write # GitHub's identity token, exchanged for the Anthropic token concurrency: - # Commands from people with write access share one queue per PR. Any other comment - # gets its own group, so it never replaces a queued command. - group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event_name == 'issue_comment' && !(github.event.issue.pull_request && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) && (startsWith(github.event.comment.body, '/review') || startsWith(github.event.comment.body, '/ask') || startsWith(github.event.comment.body, '/improve'))) && github.event.comment.id || 'review' }} + # One review at a time per PR. Every comment gets its own group, so a command is + # never replaced by a later comment or event; a command can run beside a review. + group: pr-agent-${{ github.event.pull_request.number || github.event.issue.number }}-${{ github.event.comment.id || 'review' }} cancel-in-progress: false jobs: