Repository navigation
[AI-3313] Let a Pi reviewer borrow the requester's checkout as a snapshot - #1225
Conversation
…shot Pi has no process sandbox, so it borrows the way Cursor does: a daemon-owned copy of the working tree, rebuilt every round, with the reviewer's tools rooted at the copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoEnable Pi reviewers to review borrowed checkout snapshots
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ative PATH A written prompt now counts as busy until its turn starts, so a round's refresh cannot rewrite files under it; the reviewer child keeps only absolute PATH entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-3313 (no GitHub issue — filed in Linear only)
What & why
Every Pi review flow fell back to an owned worktree at HEAD (
borrow_capability_missing), so the requester's uncommitted and untracked work never reached the reviewer. The Pi factory now advertises the existingindependent-snapshotborrow — the one Cursor uses without a process sandbox: the daemon copies the requester's tracked, modified and untracked files into its own git clone, rebuilds it before every round, and the reviewer runs in that copy, never the live checkout. The reviewer's tools are rooted at the snapshot root (the working directory can be a subdirectory of it), the snapshot'skcap-review-contextserver gets its one read-only tool on Pi's surface, and the system prompt and README describe the borrowed case.Where to look
PiRpcHostedAgentRuntimeFactory: advertisement followsSupportsUnattended,ReviewRootpicks the snapshot root, and a snapshot launch without a snapshot root or for an interactive agent is refused (borrowed_snapshot_containment_mismatch). The live-checkout (BorrowedCwd) refusal is unchanged. The server needs no change —independent-snapshotis already a recognized containment.Verification
A_borrowed_snapshot_review_roots_the_reviewer_at_the_snapshot_and_offers_the_review_contextdrives the real reviewer launch with a snapshot context and reads the manifest it wrote: root is the snapshot root, and the review-context server is bridged. Rooting at the working directory instead fails it.Pi*daemon tests: 237 passed, 21 gated skips.🤖 Generated with Claude Code