fix(codex-review): let maintainer-authorized fork PRs re-review on push - #636
Merged
jeff-r2026 merged 1 commit intoSep 18, 2026
Merged
Conversation
The auto re-review added in Tencent#631 never worked for fork PRs. Our gate job correctly authorizes a re-review when the PR carries a maintainer assignee, but codex-action then runs its OWN write-access check against the triggering actor — which on a fork PR's `synchronize` is the PR author (read access). So every fork auto re-review failed with: Actor '<author>' is not permitted to run this action ... Detected 'read'. Pass `allow-users: "*"` to disable codex-action's actor check. This does NOT widen who can trigger a review: our `gate` job is the real, stricter authorization door (an un-authorized PR never reaches this job at all), and codex-action's check is redundant with it while being wrong for the fork push case. All secret-protecting layers are unchanged: gate authorization, trusted base checkout, PR code read as diff data only (never built/installed/ run), persist-credentials: false, and Codex staying :read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes the fork-PR auto re-review added in #631, which never actually worked.
The bug
#631 lets a maintainer "assign once" and then have later pushes re-review automatically. Our
gatejob correctly authorizes a re-review when the PR carries a maintainer as an assignee. Butopenai/codex-actionthen runs its OWN write-access check against the triggering actor — and on a fork PR'ssynchronizeevent, the actor is the PR author (read access). So every fork auto re-review failed at the Codex step:Observed on real runs: PR #625 (author SaulMoro push) and PR #614 (author jiajia919 push) — gate said
authorized, codex-action then rejected the author.The fix
Pass
allow-users: "*"to codex-action, disabling its actor check.This does not widen who can trigger a review. Our
gatejob is the real, stricter authorization door — an un-authorized PR getsauthorized=falseand the review job never runs (if: needs.gate.outputs.authorized == 'true'). codex-action's check is redundant with the gate, and simply wrong for the fork-push case (it looks at the author, not at who authorized the PR).Security — no key exposure
All secret-protecting layers are unchanged; the removed check was never one of them:
git diff; nothing is built,npm install-ed, or run.pull_request_targetuses the base branch's workflow and the baseAGENTS.md; a PR can't rewrite its own criteria.persist-credentials: false.permission-profile: :read-only.Test plan
actionlint(rhysd/actionlint docker) — PASS (only the known stale-metadata false positives forpermission-profile/allow-users, both verified present on the authoritative@v1action.yml).allow-usersconfirmed a valid@v1input.