Repository navigation
Require an AI cross-review before merge - #229
lwwmanning wants to merge 10 commits into
Conversation
Every pull request needs a Codex review of its head commit. A pull request whose footer or author names Codex also needs a Claude review. The gate sets the commit status "AI cross-review" for the main ruleset to require. Signed-off-by: Will Manning <will@willmanning.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
To use Codex here, create an environment for this repo. |
…view-f2ab62 Signed-off-by: Will Manning <will@willmanning.io> # Conflicts: # CLAUDE.md
CodeQL flagged the explicit checkout of the head commit as an untrusted checkout, because the workflow also runs on issue_comment. Signed-off-by: Will Manning <will@willmanning.io>
Codex Review Summary: 🔄 RunningThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
CodeQL flags any job that runs the pull request's code in a workflow that also runs on issue_comment. ai-review.yml now runs on pull_request only, and ai-review-recheck.yml reruns main's copy of the gate on comments and reviews. The gate's token also gets pull-requests: write, which a comment on a pull request needs. Signed-off-by: Will Manning <will@willmanning.io>
|
@codex review |
🔦 Lighthouse audit
Run |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e51dd80774
ℹ️ 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".
Codex's review found that the gate ran in the pull request's context: forks and Dependabot PRs got a read-only token, a PR could change the script that judged it, and fork PRs could never get a Claude review. The workflow now runs on pull_request_target, comments and reviews, and every job checks out main. Claude reads the PR through the API. The gate also asks Codex again after 20 minutes without a start (three times at most), retries a Claude review that ended without a verdict, and ignores dismissed Codex reviews. ci.yml runs the gate's tests. Signed-off-by: Will Manning <will@willmanning.io>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25fbcceb11
ℹ️ 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".
The gate sets itself to pending before it reads the reviews, so a failed run cannot leave an old success in place. It fails when another open PR has the same head commit, because a commit status counts for every PR on that commit. A submitted Codex review of the head now counts even while the summary comment still says the review is running. Signed-off-by: Will Manning <will@willmanning.io>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20e6373921
ℹ️ 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".
The Claude status name now holds the PR number, so a review of one PR does not count for another PR on the same commit. The gate counts Claude's blocking findings from its unresolved P0 and P1 threads, as it does for Codex, so resolving a thread and commenting clears it without a new push. Signed-off-by: Will Manning <will@willmanning.io>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5093392b2
ℹ️ 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".
A PR that moves to another base branch keeps its head commit, but its diff can change, so the gate posts a marker and fails until a new commit arrives. Only P0 and P1 threads count as evidence for Claude's counted findings. The gate reads every page of the commit's statuses, and counts only marker comments from github-actions[bot]. Signed-off-by: Will Manning <will@willmanning.io>
…view-f2ab62 Signed-off-by: Will Manning <will@willmanning.io> # Conflicts: # CLAUDE.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3516cffac1
ℹ️ 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".
Drop the pull_request_review trigger, which runs the PR's copy of the workflow. Claude reviews only PRs by authors with write access; an outside PR that Codex helped write needs a maintainer's approval of the head commit. Record a base change as a commit status before the notice comment. Mark a Claude review as started only after setup, and retry a review that stays pending for 45 minutes. Check at verdict time that each blocker Claude counts has an open thread. Signed-off-by: Will Manning <will@willmanning.io>
What changes
This adds a merge gate for AI review to both sites' pull requests, in a new workflow,
ai-review.yml. The other checks stay as they are.Before, Codex reviewed some pull requests on its own, and Claude reviewed only when someone tagged
@claude. Neither review blocked a merge. After, the gate sets the commit statusAI cross-reviewon the head commit. Every pull request needs a clean Codex review of that commit. If the footer or the author names Codex, the pull request also needs a clean Claude review, which the workflow runs.A P0 or P1 finding fails the gate, so auto-fix can act on it. When Codex has not reviewed the head commit, the gate posts
@codex review. Renovate and Dependabot pull requests pass without review.After merge, the
mainruleset must requireAI cross-reviewbefore the gate blocks anything.How it was checked
bun test scripts/ai-review-gate.test.ts, the typecheck andbun run check:cipass. Dry runs against #216, #220, #225, #206 and #227 gave the expected status for each.git commit -s), for the DCO check.bun run check:cipasses.REUSE.toml.🤖 Generated with Claude Code