[REA-3711] Review pull requests with Codex - #93
Conversation
REA-3711 Remove Claude code review; standardize on Codex review for all PRs
GoalStop running Claude Code review on PRs and use Codex review as the single PR code-review tool across all repos. ApproachCentralize one reusable Codex review workflow in Scope (verified against remotes 2026-07-29)1. 2. 3. Swap Claude → Codex (9 PRs): 4. Remove review entirely (2 PRs): 5. Add Codex fresh (5 PRs): 6. Org settings (needs org admin): create org-level 7. Secret cleanup: remove 8. Per-repo check: confirm no branch protection/ruleset requires the Claude review check name (reactor verified clean — only Out of scopeClaude docs automation (reactor docs checks, js-sdk/js-sdk-internal docs-pr, py-sdk public-docs-check). WhyConsolidate on one automated review tool (Codex) to avoid duplicate/competing review comments and standardize the PR workflow. |
|
[codex-review] No issues found — this PR looks good. |
b592fa8 to
344908d
Compare
344908d to
8972918
Compare
30e9177 to
28fc538
Compare
| # open-source track), and GitHub does not allow public repos to call reusable | ||
| # workflows in internal repositories — so the full review lifecycle lives | ||
| # here instead of a thin caller. Mirrors | ||
| # reactor-team/actions/.github/workflows/codex-review.yml; sync manually when |
There was a problem hiding this comment.
[codex-review] [P2] This public workflow names an internal repository and tells maintainers to synchronize from it, which directly violates AGENTS.md's non-negotiable rule that private systems must not be named, linked, or assumed by public-repo content. Remove the internal repository reference and describe this workflow solely in terms of its public, self-contained contract.
There was a problem hiding this comment.
Fixed — header rewritten to describe only the public, self-contained contract, and the dead reactor-team/actions special-case in the concurrency guard is removed. No internal systems referenced anywhere in the file now.
28fc538 to
0a676a1
Compare
Removes the Claude Code review workflow and adds the full Codex review lifecycle in-repo (mirrors reactor-team/actions REA-4724 version). Public/OSS repos cannot call reusable workflows in internal repositories, so the logic is inlined rather than a thin caller. Only external dependency: the org-level OPENAI_API_KEY secret, which fork PRs never receive. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Avik Sethia <aviksethia99@gmail.com>
0a676a1 to
ee34f08
Compare
tempusfrangit
left a comment
There was a problem hiding this comment.
I am requesting changes here to hold. We need to be extra careful that this is only run on PRs we explicitly know are not going to try and maliciously hand things off to codex. This means we need to ensure that we only run from the workflow on main and likely only for trusted contributors.
This same comment applies to all public repositories. We do not want to leak our OpenAI key.
The review job checks out the pull request head and runs the agent over it with the API key in scope. For a fork head that puts untrusted code in a privileged context — reachable even without write access, since a maintainer running /review on someone else's pull request is enough. Guard on isCrossRepository from the API in the acknowledge job, so every trigger (pull_request, issue_comment, workflow_dispatch) is covered rather than just the event payloads that carry head repo information. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Avik Sethia <aviksethia99@gmail.com>
|
Added a fork guard (second commit): the acknowledge job now refuses when the PR head lives in a fork. Why: the review job checks out the PR head and runs the agent over it with Implementation: guards on Deliberately unchanged: |
Why
Automated review on this repository ran on Claude Code. Standardising on a
single automated reviewer means moving that job to Codex, and this repository
is public, so the review needs to hold a pull request to the standards in
AGENTS.mdthat ruff and ty cannot check — above all the rule againstassuming infrastructure this package does not ship.
Review also costs money to run, so it stays gated to maintainers rather than
firing for anyone who can open a pull request or leave a comment.
What Changed
openai/codex-actionnow performs the review, driven by one workflow thatkeeps the trigger gate, the model, and the prompt in the same file. Review
runs when an owner, member, or collaborator opens a non-draft pull request,
and on demand when one of them comments
/review;workflow_dispatchtakes apull request number for a manual run. An outside contributor's pull request
never reaches a runner, so untrusted code is never checked out and no review
budget is spent on it. The action independently verifies that the actor has
write access, which leaves the trigger gate as the cheap first barrier rather
than the only one.
The prompt is the one this repository already used, carried over intact: the
package overview, the instruction to read
AGENTS.mdand hold the pullrequest to it, and the focus areas — including references to infrastructure
this package does not ship, tests missing for changed behaviour, and typing
and docstring contract violations. The only substantive change is mechanical:
inline comments are posted with
gh apirather than through aClaude-specific tool. Findings land on the offending lines, and a review that
finds nothing posts a single
lgtmcomment.[skip-codex]in a pull request title skips the review, and Dependabotpull requests are excluded.
Verification
actionlintis clean. The job needs anOPENAI_API_KEYActions secretavailable to this repository; until it is, the review fails and reports
nothing, which leaves merges unaffected because it is not a required check.
Once the secret is in place, comment
/reviewon an open pull request andconfirm the inline comments and the summary.