Skip to content

[Feat] Add decision-model pre-screen to pull-request reviews - #3119

Merged
mrubens merged 6 commits into
developfrom
feature/code-review-prescreen-1lknfi70wy0db
Sep 22, 2026
Merged

mrubens merged 6 commits into
developfrom
feature/code-review-prescreen-1lknfi70wy0db

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Add a bounded decision-model pre-screen to initial and sync GitHub pull-request reviews.
  • Ask eight fixed risk-area questions over a capped diff, pass up to five high-signal advisory hints into the main reviewer, and run the pre-screen alongside existing provider fetches.
  • Reuse the centralized decision-model selection with high-volume gating; absent backends, malformed answers, timeouts, and failures leave the main review unchanged.
  • Keep the main reviewer responsible for the complete independent review while preserving the existing opt-in judgment capture and shadow-forwarding settings.

Why this change was made

The pre-screen provides cheap triage context so the main LLM reviewer can prioritize likely risk areas without changing its authority to inspect the entire pull-request diff. Strict input, output, timeout, and fallback bounds keep the optimization from adding unbounded latency or weakening review quality.

Impact

Configured decision-model deployments receive advisory pre-screen hints in the initial and incremental GitHub review prompts. Existing opt-in judgment capture stores pre-screen decision state in the deployment-owned artifact bucket, and existing opt-in shadowing may send reviewed diffs from any connected repository to the configured shadow provider. Deployments without a decision model, and any review where pre-screening fails, retain the existing review path and behavior.

@roomote-community

roomote-community Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Prevent sensitive PR diffs from being sent through judgment shadowing (packages/cloud-agents/src/server/workflows/githubPrReviewPrescreen.ts:245) — dismissed: the latest product direction intentionally preserves existing opt-in shadow forwarding.
  • Restore the pre-screen shadow opt-out so PR diffs are not forwarded to the Roomote calibration upstream (packages/cloud-agents/src/server/workflows/githubPrReviewPrescreen.ts:244) — dismissed: the latest product direction intentionally preserves existing opt-in shadow forwarding.

Reviewed 638e4f7

timeoutMs: REVIEW_PRESCREEN_TIMEOUT_MS,
highVolume: true,
// Review diffs are sensitive; do not add them to optional training capture.
capture: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

capture: false only suppresses captureJudgment; it does not suppress shadowRoomoteJudgment. With R_JUDGMENT_SHADOW=on and a TypeSafe, OpenRouter, or Vercel backend, this new call still sends the capped raw PR diff to the configured Roomote upstream as a second request. That bypasses the sensitive-diff safeguard described here. Gate shadowing on this opt-out (or add an explicit no-shadow option) and cover that combination.

@roomote-roomote roomote-roomote Bot Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Final behavior follows the latest product direction in 638e4f73: the request-level capture option is removed, and the pre-screen passes no capture or shadow override, so deployment opt-in capture and shadow-forwarding remain active. Regression coverage verifies capture plus the second shadow request when R_JUDGMENT_SHADOW=on; 102 focused tests and all repository gates pass. The request to suppress shadowing is intentionally dismissed because it conflicts with that current requirement. See task

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The final commit removes the shadow: false passed here, reintroducing this issue. When R_JUDGMENT_SHADOW=on and the selected backend is TypeSafe, OpenRouter, or Vercel, evaluateTypeSafeJudgments dispatches the capped raw PR diff to the Roomote calibration upstream. Restore the per-call opt-out (or keep this pre-screen out of shadowing) so review diffs do not take that extra forwarding path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The latest product direction explicitly preserves the existing opt-in shadow-forwarding behavior for pre-screen judgments, alongside opt-in deployment-owned capture. This is therefore intentionally not changed: the pre-screen passes no shadow override, and the regression test verifies the primary plus opt-in shadow requests. The PR wording now discloses that reviewed diffs from any connected repository may reach the configured shadow provider when that setting is enabled.

@roomote-roomote
roomote-roomote Bot marked this pull request as ready for review September 22, 2026 17:25
@mrubens
mrubens merged commit 38cc288 into develop Sep 22, 2026
17 checks passed
@mrubens
mrubens deleted the feature/code-review-prescreen-1lknfi70wy0db branch September 22, 2026 18:43
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.

1 participant