feat(sage): safely parallelize run-scoped reviews - #8143
Conversation
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
3 similar comments
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
d22ad34 to
db7f1a7
Compare
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
1 similar comment
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
db7f1a7 to
c9246a6
Compare
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- src/kiro_crew/apps/builtins/code_review_sage/sage_lib/review_driver.py:779 -- Posting deletes the durable retry record Adjudication (Opus 4.8) — is blocking on each finding proportionate?The adjudicable block is empty (0 findings). One fenced finding, F1. Confirmed from the diff and base tree: on the retry-post path ( Recovery path: a later retry reads no record → "no recorded review for this change" and cannot post; the PR is typically already in the dedup index from the original run's [ADJUDICATION] 81a860d total=0 uphold=0 downgrade=0 |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Sound fix — response-bound handoff genuinely closes the shared-path race — but the code and description document a "result capability" mechanism that does not exist. Watch
Suggestions
[DESIGN-REVIEWED] 81a860d |
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of All greps are done and the evidence is in hand. Here is the review. First-Principles-Verdict: CONCERNS The described "unguessable result capability" mechanism does not exist in this diff — the code ships a response-channel handoff and explicitly rejects the capability field. What this change shipsIntent: let independent claimed reviews run concurrently without one run adopting another's findings — an ADDITION (removes a deliberate serialization).
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] 81a860d |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsBoth candidates are self-labeled low confidence, and both fail the grounding bar under falsification: Candidate 1 (unlink-before-post loses the record on a raise): the loss window only opens if an uncaught exception fires between the Candidate 2 (unbounded poster payload in the prompt): no concrete input, no established runtime size limit, and the same-size record already flows through the dispatcher in the review/followup direction ( No grounded Step-2 finding meets the bar: the response-bound handoff ( No findings. [OPUS-REVIEWED] 81a860d |
c9246a6 to
b910950
Compare
Bind reviewer and poster results to their dispatcher responses, validate outer handoff envelopes, and preserve GitHub read-back delivery confirmation.
e861fce to
81a860d
Compare
|
The branch now binds reviewer and poster outputs to the dispatcher's response channel; it does not use a result capability or shared staging path. It parses the outer handoff delimiters, persists only after the driver receives a valid response, and retains GitHub read-back as delivery confirmation. The Sage suite passes 773 tests. |
|
@Premshay this PR overlaps two of your own newer open PRs in the same files, and the two overlaps pull in opposite directions, so the split is worth settling before further review. Audited at 81a860d. vs #9077 (response handoff). Shared: vs #9087 (interrupted posting). Shared: That leaves this PR as the Posted from the 2026-09-08 open-PR relationship audit (read-only, one auditor per PR); reply here if any of this is wrong. |
Problem / Motivation
Code Review Sage previously serialized independent run-scoped reviews because workers wrote through a shared result path. That protected result attribution, but it also prevented unrelated claimed reviews from using the existing bounded review pool concurrently.
Why it matters
Independent reviews unnecessarily queued behind each other, increasing turnaround time. Restoring concurrency must not let a worker's result be adopted by a different review dispatch.
What changed (motivation → approach → change)
The shared-path adoption boundary now binds each dispatched worker to an unguessable result capability. A record is adopted into a run only when its capability matches the receiving dispatch, so independent claimed reviews can use the bounded pool without cross-run attribution.
The run lock now protects only claim acquisition. Run-scoped reviews delegate concurrency to the pool, while legacy calls without a run scope remain serial. The rebased route keeps failure-reason reporting intact in the lock-free control flow.
Tests
Manual verification
N/A — the concurrency and adoption boundary are exercised by deterministic backend and driver tests.
Related Issues
N/A.
Checklist
feat: safely parallelize run-scoped reviews)Contribution License Agreement
The template's exact CLA wording has not yet been supplied by OSPO.