Skip to content

Switch overnight PR reviews to Codex - #203

Merged
haacked merged 2 commits into
mainfrom
haacked/codex-pr-review-harness
Sep 1, 2026
Merged

Switch overnight PR reviews to Codex#203
haacked merged 2 commits into
mainfrom
haacked/codex-pr-review-harness

Conversation

@haacked

@haacked haacked commented Sep 1, 2026

Copy link
Copy Markdown
Owner
  • Run scheduled PR reviews through Codex while retaining Claude for manual runs, and save Codex review text and token usage from streamed JSONL.
  • Restrict unattended candidates to current team-feature-flags authors, start one PR per hourly tick, and allow two attempts per calendar day, including failures.
  • Give Codex write access only to review state and artifacts, and classify authentication or usage-limit failures separately from PR failures.

Test plan

  • bin/lib/test-review-search-queries.sh (29 passed)
  • bin/lib/test-run-pr-reviews.sh (39 passed)

Restrict unattended Codex writes to review artifacts, preserve engine-specific failure classification, and cover persisted caps and author filtering.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Claude rate-limit detection is not gated on a failing exit code, which can misclassify successful reviews if output contains matching phrases.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the dotfiles’ automated PR-review automation to support running unattended overnight reviews via the Codex CLI (while keeping Claude as the default for manual runs), including new safety limits and better classification of engine-level failures.

Changes:

  • Add --engine, --author-team, and --daily-max-prs support so scheduled runs can use Codex, restrict candidate authors, and cap daily attempts (including failures).
  • Update the review-all-prs LaunchAgent/service wrapper to run Codex, review one PR per hourly tick, and limit to two attempts per calendar day.
  • Add offline test coverage for Codex JSONL extraction, token usage capture, author-team filtering, and daily attempt limits.
File summaries
File Description
README.md Documents Codex/Claude engine selection, unattended LaunchAgent behavior, and prerequisites.
macos/LaunchAgents/com.haacked.review-all-prs.plist Switches scheduled job arguments to run Codex with author filtering and safety limits.
bin/run-pr-reviews.sh Implements engine boundary (Claude vs Codex), daily attempt cap, Codex JSONL parsing, and engine auth/quota handling.
bin/review-all-prs.sh Adds --author-team as a strict post-merge filter and refactors team member retrieval.
bin/review-all-prs-service.sh Keeps service wrapper args aligned with LaunchAgent: Codex + filters + caps.
bin/lib/test-run-pr-reviews.sh New offline test suite covering Codex execution sandboxing, artifacts, usage capture, and daily limits.
bin/lib/test-review-search-queries.sh Extends query tests for --author-team behavior and repeatability.
Review details
  • Files reviewed: 2/7 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@haacked
haacked marked this pull request as ready for review September 1, 2026 17:27
@haacked
haacked merged commit 6ae58d2 into main Sep 1, 2026
2 checks passed
@haacked
haacked deleted the haacked/codex-pr-review-harness branch September 1, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants