Skip to content

Have a different provider review new PRs, with findings sent to the author - #1632

Merged
currentbits merged 2 commits into
mainfrom
coder/cross-model-review-agent-prs-reviewed-by-81221f
Oct 13, 2026
Merged

currentbits merged 2 commits into
mainfrom
coder/cross-model-review-agent-prs-reviewed-by-81221f

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #259.

Adds an opt-in setting, prCrossReview, which is off by default. When it's on, a PR that the app has just opened gets one automatic review from a different provider than the one whose thread wrote it. Models tend to catch more bugs in another model's code than in their own.

How it works

  • Trigger: git:createPr (in ipc-git.js) and the orchestrator's PR tool (in orchServer.js) now call startPrReview after createPr returns. This call isn't awaited, so the PR result comes back as before. It only does something when the setting is on and pr.created === true. It also skips remote-host projects.
  • Reviewer: a new electron/prReview.js forks an ordinary worker from the author thread on the first other installed provider, in registry order. A plain fork copies no transcript, so the reviewer starts with no context and works in its own worktree at the PR head. If a provider fails permission narrowing (runtime_mode_escalation_denied, P1: Bind the caller's thread id at the MCP transport (closes thread_stop/thread_archive approval bypass) #1425), it moves on to the next one. The reviewer thread is tagged with prReviewOf: { pr, url }. startPrReview never throws, so a review that can't start never fails a PR that already exists.
  • Prompt: the reviewer reads git diff <base>...HEAD. It must not edit, commit, push or comment, and it follows a strict rubric: report only compile errors, definite logic errors, security issues and obvious bugs, never style, formatting, pre-existing issues or anything a linter would catch. It replies with one file:line — defect — trigger per line, or exactly No findings.
  • Findings: in runner-orch-notices.js, a worker tagged prReviewOf no longer gets the usual merge-prompt finish notice. Its full last reply, capped at 6000 chars, goes to the author thread, framed as another model's claims to check and filter rather than instructions. The author is told to fix the real ones and not to ask for a re-review, which avoids review/fix loops. If the author is an archived worker, the notice goes to its live lead instead and tells the lead to send fixes to the worker with thread_send. This is the same relay as prWatch.wakeTarget (P2: PR refresher can't see archived worker PRs (34 of 35 stuck OPEN); merged-worktree cleanup ignores running threads #1431).

Settings plumbing

  • prCrossReview is added to AppSettings and to normalization, where it's true only when it's exactly true. setSettings rejects values that aren't booleans. It's also added to the dev settings shim and fakeCoder.
  • Settings → Git has a new checkbox: "Review new PRs with a different provider".

Tests

  • New electron/test/pr-review.test.js covers:
    • the prompt rubric
    • provider selection
    • staying off when the setting is off, the PR isn't new, or no other provider is installed
    • forking a reviewer with no context on another provider
    • delivering the findings to the author
    • relaying to the lead when the author is an archived worker
  • Existing settings snapshot tests are updated for the new field.

🤖 Generated with Claude Code

Solenta-Message-Id: cee76390-d8c1-4b11-b0e8-5524ddb5d7a3

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d3800cc07

ℹ️ 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".

Comment thread electron/prReview.js
Comment on lines +93 to +97
reviewer = forkWorkerThread(
store,
{ threadId, provider, title: `Review PR #${pr.number}` },
forkThread,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Suppress author context when forking the reviewer

When the author thread contains an assistant reply, this ordinary forkWorkerThread call stamps the reviewer with handoffFrom: author.id; on its first run, runner.js calls buildHandoffPrefix, which reads that source thread and prepends its transcript tail and recap to the review prompt (services-notes.js:401-465). Consequently, the supposedly clean-context review sends prior conversation content to the other provider, potentially exposing unrelated data and biasing the independent review. Add a way for this reviewer fork to retain its notice target without receiving hand-off context.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T14:38:43.224988Z 4d3800c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@currentbits
currentbits merged commit 6844f54 into main Oct 13, 2026
6 checks passed
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.

Cross-model review: agent PRs reviewed by a different provider than the author

1 participant