Enhance the Codex review workflow to support incremental reviews on every
push while maintaining full PR reviews on open/reopen events.
Changes:
- Add `synchronize` and `reopened` triggers for continuous review
- Add concurrency control to cancel in-progress reviews on new pushes
- Pre-compute diffs and intelligently choose review scope:
- Full PR review on `opened`/`reopened` (base..head)
- Incremental review on `synchronize` (before..after)
- Skip reviews if diff exceeds size limits (>100KB or >10k lines)
- Inject full diff into Codex prompt (following OpenAI's recommended pattern)
- Detect force pushes and flag them in the review context
- Add unified diff format with commit logs and changed file lists
Benefits:
- Faster feedback on incremental changes
- Reduces noise by reviewing only what changed in each push
- Prevents token limit issues with size checks
- More efficient use of Codex API costs
Based on OpenAI's recommended patterns from:
https://cookbook.openai.com/examples/codex/build_code_review_with_codex_sdk
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Enhance the Codex review workflow to support incremental reviews on every push while maintaining full PR reviews on open/reopen events.
Changes:
Based on OpenAI's recommended patterns from the Codex SDK documentation.