Repository navigation
Have a different provider review new PRs, with findings sent to the author - #1632
Conversation
Solenta-Message-Id: cee76390-d8c1-4b11-b0e8-5524ddb5d7a3
There was a problem hiding this comment.
💡 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".
| reviewer = forkWorkerThread( | ||
| store, | ||
| { threadId, provider, title: `Review PR #${pr.number}` }, | ||
| forkThread, | ||
| ); |
There was a problem hiding this comment.
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 👍 / 👎.
Codex Review SummaryThis 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. |
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
git:createPr(inipc-git.js) and the orchestrator's PR tool (inorchServer.js) now callstartPrReviewaftercreatePrreturns. This call isn't awaited, so the PR result comes back as before. It only does something when the setting is on andpr.created === true. It also skips remote-host projects.electron/prReview.jsforks 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 withprReviewOf: { pr, url }.startPrReviewnever throws, so a review that can't start never fails a PR that already exists.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 onefile:line — defect — triggerper line, or exactlyNo findings.runner-orch-notices.js, a worker taggedprReviewOfno 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 withthread_send. This is the same relay asprWatch.wakeTarget(P2: PR refresher can't see archived worker PRs (34 of 35 stuck OPEN); merged-worktree cleanup ignores running threads #1431).Settings plumbing
prCrossReviewis added toAppSettingsand to normalization, where it's true only when it's exactlytrue.setSettingsrejects values that aren't booleans. It's also added to the dev settings shim andfakeCoder.Tests
electron/test/pr-review.test.jscovers:🤖 Generated with Claude Code