Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merge-readiness review found and fixed an authority edge case in c317f81: after its Ticket is deleted, a Ticket Session attaches with a project-shaped runtime identity. Using that identity for steering would allow project-wide sends. Steering now reads the caller’s durable Session Role, preserving own-subagent-only scope after deletion and refusing missing/out-of-project callers. No change to the orphan attachment behavior or delegation reporting. Regression-first: both unauthorized orphan-Ticket steering cases failed before the fix. Focused verification: 99 tests passed across agent-tool-door.test.ts, supervise-session.test.ts, and delegate-browser-cleanup.integration.test.ts; host-core typecheck, touched-file vp check, and git diff --check passed. The prior head’s CI gate was green; the new head needs its own CI gate. |
Problem
Ticket Sessions can delegate a helper but cannot redirect it. Merely adding
session_sendto their bundle would permit project-wide steering: the send operation previously resolved any structured Session in the project.Fix
session_sendto newly created Ticket Sessions and pin the updated birth surface baseline.session_delegateto steer drifting helpers, and document the scope insession_sendand CLI help.Decisions
role === subagentandparentSessionId === caller: a Ticket Session started via an own-ticket grant is not a delegated helper.session.sendgrant: a grant does not make a Ticket caller a Board supervisor.Tests
origin/main67d49aa:/tmp/volli-serial.sh packages/host-core pnpm exec vp test run src/agent-tool-door.test.ts --maxWorkers=1failed the 3 new unauthorized Ticket steering cases (63 passed)./tmp/volli-serial.sh packages/host-core pnpm exec vp test run src/session-runtime/delegate-browser-cleanup.integration.test.ts --maxWorkers=1: 6 passed. Both Board and Ticket parents steer an active delegated child through the real runtime/Pi adapter/stream codec; the child reads the parent marker, stays in one turn, and the parent receives exactly onedelegate-1:answerreceipt.vp checkon the 14 touched TypeScript files: formatting and lint passed.git diff --check: passed.39269662092: Check + Build, all desktop test/coverage and smoke lanes, all N-1 compatibility lanes, and host-container build passed. Test (packages) caught one stale MCP birth-surface expectation inmcp-surface.test.ts; updated it to includesession.sendin canonical order. This is a test correction, not a flake rerun./tmp/volli-serial.sh packages/shared pnpm exec vp test run src/mcp-surface.test.ts --maxWorkers=1: 9 passed. Serialvp checkon that file: passed.27b7e670a(run39271331013): CI gate green, all required lanes passed. Independent read-only review then identified legacy-backfill and old-surface wording edge cases; addressed before handoff (no change to delegation reporting)./tmp/volli-serial.sh packages/host-core pnpm exec vp test run src/session-runtime/context.test.ts --maxWorkers=1: 15 passed after the guard (both Board and Ticket backfill/reattach covered). Shared surface/registry recheck: 117 passed. Serialvp checkon all follow-up touched TypeScript files: passed.b66c492354539b9834b837ce2ddd907b73224bdb, CI run39272980424: CI gate green. Check + Build, Test (packages), all desktop test/coverage lanes, host-container build, all N-1 compatibility lanes and all smoke lanes passed. No flake reruns requested.Review
session_sendskips its automatic watch for the caller's pending delegates; the receipt names the delegation answer instead. Snapshot pending children before delivery so a delegate finishing during the send cannot accidentally arm a second report. Other targets retain their watch; no VC-809: End a completed subagent's shells and stop re-arming its delegation on host-notice turns #935 re-arm/report identifiers changed.createAgentToolDoor, wired to the real Watch registry, post-commit wake bus, runtime and Pi adapter. It drains the watch coalescing clock and delivery work, then asserts exactly one message notice in the parent's ledger (not merely one delegation-keyed receipt). Regression first: both Board and Ticket cases failed with an extrawatch:command besidedelegate-1:answer; both now pass.session_sendand the helper still working; regenerated CLI reference./tmp/volli-serial.sh, one test file per invocation,--maxWorkers=1): door 70 passed, supervision 18 passed, real-runtime integration 6 passed, frozen assembly cases 2 passed / 14 unrelated skipped, registry 78 passed, CLI reference 2 passed. Touched-file formatting/lint andgit diff --checkpassed. No local coverage or build for this review follow-up.39276465356caught TS2352 on the deliberately partial test double; corrected its explicit test-only assertion. As allowed after a CI type error, one/tmp/volli-serial.sh packages/host-core pnpm exec tsc --noEmit -p tsconfig.jsoncompleted successfully; serial formatting/lint on the corrected file passed. The same run's package lane timed out in the unrelatedworktree/watch.test.tsfive-second retention test; no changes there and no flake rerun requested. All desktop, smoke, host-container and N-1 lanes passed.214de639d110e08cb7b46c3f5eb1249d58b9b4fb, run39278520935: Check + Build and all N-1 lanes passed. The bounded 30-minute plaingh pr checks 938 --watchtimed out while Test (packages), desktop 3/4 and 4/4, host-container, core smoke and smoke shard 3 remained in progress; coverage and CI gate remain queued. Verification blocked pending CI completion; not claiming review-head CI green. No action reruns or concurrent watchers started.Overlap
The specified PRs #909, #919, #920, #921 and #922 are already merged.
git merge-tree --write-treeis clean against currentorigin/mainand each specified PR head; no stack is required. Target: main.