You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model review for PRs to .github itself (second federation rule) #36
PRs to .github itself get no model review. The review file runs there as a normal pull_request_target workflow from main, so its OIDC job_workflow_ref ends in @refs/heads/main. Production rule R1 binds @<release SHA>, so every pass fails auth and the gate fails with pass-records. This has been true for every .github PR since 2026-10-31 (see #33).
Proposal
Add a second federation rule, R-self, used only for .github PRs:
.github PR --pull_request_target--> claude-review.yml @ main (merged code only)
| |
| OIDC: repo=.github, job_workflow_ref=@refs/heads/main,
| event_name=pull_request_target
v v
PR content read via REST only R-self --> self-review workspace (own low spend limit)
pull_request_target runs the workflow file from main, never the PR's copy, so the code that holds the token is merged code. That is the same trust as a push to main.
Exact claims in pattern mode: .github repository ID, job_workflow_ref of claude-review.yml@refs/heads/main, event_namepull_request_target. A workflow_dispatch of the same file does not match.
Own workspace with a low spend limit, so it cannot drain the production budget.
analyze picks R-self only when the run's repository is .github and the event is pull_request_target. Everything else keeps R1.
The .github result still does not gate merges through the ruleset (no ruleset targets .github), but it gives a real model review and a real summary comment.
Residual
The run uses main HEAD, which can be ahead of the released SHA (merged but unreleased code). That is acceptable: only maintainers can push to main.
A change to the reviewer itself is reviewed by the code it replaces. A second human review on .github still matters.
Owner steps (Console, web UI)
Create the self-review workspace and set its spend limit.
Create rule R-self with the claims above, bound to that workspace and the service account.
Activity
Model review for PRs to .github: self-review rule R-self and scripted…
Set the self-review federation rule ID (R-self, #36) (#38)