ci: add AI PR review workflow (Codex spike) - #11
Merged
Merged
Conversation
Smoke-test workflow that runs OpenAI Codex CLI against every PR using a ChatGPT subscription auth (no API key). First step toward a YAML-driven, per-area PR review that gates merges via REQUEST_CHANGES. Auth flow: ~/.codex/auth.json is seeded from the CODEX_AUTH_JSON repo secret on cache miss, then persisted between runs via actions/cache so Codex's auto-refreshed token survives. Setup instructions in .github/AI_PR_REVIEW_SETUP.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 PR checksType: ⏭️ Merging will not trigger a release
Auto-generated by |
🤖 AI PR review
CI / GitHub Actions —
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee11c2d316
ℹ️ 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".
Replaces the single smoke-test prompt with a YAML-driven, per-area review: - pr-review.yml defines areas (rust, frontend, ci, docs) with a path glob and a rubric derived from CLAUDE.md. - pr_review.py parses the YAML, computes which areas the PR touches, and runs one `codex exec` invocation per area with a scoped diff and the area's rubric. Each area returns a VERDICT (PASS/CONCERNS) plus findings. - Workflow drops the auth.json cache (Codex itself flagged the leak risk on PR #11) and re-seeds from the secret on every run; the refresh_token in CODEX_AUTH_JSON is stable so token refresh still works. - Comment now shows a verdict table + per-area sections instead of a single freeform paragraph. - Reasoning effort bumped to high; depth matters more than speed for reviewer role. REQUEST_CHANGES gating + branch protection still on the roadmap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
.github/workflows/ai-pr-review.yml— runs OpenAI Codex CLI against every PR using a ChatGPT subscription (no API key spend).REQUEST_CHANGES..github/AI_PR_REVIEW_SETUP.md.How auth works
~/.codex/auth.jsonis seeded from theCODEX_AUTH_JSONrepo secret on cache miss, then persisted between runs viaactions/cache@v4so Codex's auto-refreshed token survives.Roadmap (next PRs)
pr-review.ymlconfig (different rubrics forsrc-tauri/,src/,docs/).--output-schema, severity-based findings.REQUEST_CHANGESto block merges; add branch protection.IsraelAraujo70/ai-pr-review@v1) for reuse across other projects.Test plan
CODEX_AUTH_JSONsecret successfully seeds~/.codex/auth.jsoncodex --versionandcodex auth statussucceedcodex execruns and returns a final message🤖 Generated with Claude Code