Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Leaf-backed dispatch authority now follows the live pane — In
getOrchestrationDispatchAuthority, runtime-ownedpty:handles keep their retained PTY binding, while a leaf-backed handle takespaneKeyfromgetPaneKeyForTerminalHandle(handle)(the live leaf) instead of the PTY record's retainedpaneKey. That aligns the authority with the caller identity already returned bygetTerminalPaneKey/getLiveTerminalPaneKey, closing the mismatch in #17741 where the worker sent from its real pane but the capability was bound to a stale one. - Regression test recreates the stale-sibling binding — A live leaf handle is issued, then the PTY record's
tabId/paneKeyare repointed at a stale sibling pane; the test asserts the resolved authoritypaneKeyis the live pane and completes an end-to-endprepareStartingWorkerAuthority→verifyDispatchCapabilityround-trip.
I confirmed the test is load-bearing: reverting the production hunk to the previous pty.paneKey resolution makes it fail with the stale 3333…:4444… key, so it genuinely pins the fix rather than passing vacuously. The structured-worker branch, fail-closed behavior, and the runtime-owned handle path are all untouched, and the change is platform-neutral (SSH/WSL host scope still comes from the PTY record).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
A supervised worker can receive its task in one pane while Orca accidentally authorizes a different pane remembered by the same terminal process. This change makes the pane that receives the task the pane that can report progress and completion.
What Changed
For leaf-backed terminal handles, dispatch authority now uses the handle's live leaf pane instead of the PTY's retained pane binding. Runtime-owned PTY handles keep their existing behavior. A regression test recreates a live worker leaf with a stale sibling PTY binding and verifies the Task/Dispatch capability against the same terminal handle, pane, and process identity.
Why
The task preamble is delivered through the exact terminal handle, and lifecycle commands derive their caller pane from that handle. Binding the capability from the same live leaf closes the mismatch without changing prompt timing or the OpenCode boot-splash handling in #20451.
Linked Issue
Addresses the wrong-pane worker lifecycle failure in #17741. The separate OpenCode boot-splash race remains covered by #20451.
Visual Proof
N/A — this changes orchestration identity binding and has no visible UI.
Testing
ORCA_BACKGROUND_LAUNCH=1 vitest run --config config/vitest.config.ts src/main/runtime/orca-runtime-orchestration-dispatch-authority.test.ts src/main/runtime/rpc/methods/orchestration/messaging/send.test.ts src/main/runtime/rpc/methods/orchestration/worker/worker-start-terminal-target.test.ts src/main/runtime/rpc/methods/orchestration/worker/worker-start-prompt-contract.test.ts— 54 passednode config/scripts/check-changed-code-quality.mjs— passedtsc --noEmit -p config/tsconfig.node.json— blocked by eight unrelated unresolved ambient build constants in telemetry/diagnostics; no changed-file type errors were reportedAI Disclosure
Implemented with OpenAI Codex (GPT-5).
Review
Please focus on the leaf-backed versus runtime-owned handle branch in
getOrchestrationDispatchAuthorityand the stale PTY-pane regression fixture.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
The fix adds no wire fields, storage schema, platform-specific behavior, or renderer changes. Capability verification remains fail-closed when the live leaf or pane cannot be resolved.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)