Repository navigation
Description
Status: Done
The generic attach-only handoff landed in #4491. Prerequisites F2 #4442 (#4463) and F1 #4436 (#4455) were already delivered.
- Bounded
busyby default; explicit relinquish or operator-authorized preemption; the runner reservation is granted only after cancellation, settlement and session deletion. Old references, cursors, proofs and artifact links stay invalid, and preempted MCP controllers reopen with fresh child authority. - Parent-owned worker grants drain on normal exit, crash and lost acquisition response. Worker credentials are passed individually and scrubbed before hook imports and specs. The runner-owned CSF borrowed-session exception is preserved.
- Evidence on the generic native fixture (not Storybook): macOS 5/5 and Windows 5/5 with zero skips; physical console Ctrl+C passed on Windows Fabric packaged and Win32 Paper REX (unlocked remote RDP session). Hosted capture is a policy skip, not a pass.
Residuals live in open issues: the Storybook runner handoff and the optional retained supervisor-launched app option (F10-M/F10-W prerequisites delivered by #4492 and #4494) in #4449; the generic management facet no longer waits on this issue in #4450; renderer-level and Storybook handoff qualification on macOS Fabric, macOS Paper, Windows Fabric and Win32 Paper in #4441. Cross-MCP-connection resume and automatic replay are not supported.
Goal
Agent-served mode (serve --agent) and WDIO runs currently exclude one another, so moving between MCP control and suite execution requires restarting services. Add scoped runner grants and a handoff that waits for the previous controller to drain before a runner opens its own session.
Part of #4435 (plan item F11).
Scope
- Owner: WDIO and CSF runner integration.
- Paths (under
packages/agentic/):desktop-test/src/wdio/*, the driver's grant transport and drain contracts, andstorybook-desktop/src/testing/{runWdioTests,worker}.ts. - Default to a bounded
busyresult. An explicit relinquish or operator-authorized preempt stops new work, cancels and awaits settlement, confirms session deletion, invalidates references, cursors, proofs, and artifact links, and only then authorizes a new runner session. Grant revocation callbacks are not a drain barrier. - Keep the documented CSF exception, where the runner owns the session and an isolated Node worker borrows it, unless it is deliberately migrated.
Dependencies
- Depended on: F2 Infrastructure: Implement settled desktop lifecycle supervision and fenced ownership records #4442 for the generic handoff (closed, Desktop driver: typed resources, process lifelines, story lifetimes, exclusive agent ingress, and native qualification runbook #4463); F1 Infrastructure: Unify desktop driver-service composition and wire durable recovery #4436 is delivered by Unify desktop driver-service composition and wire durable recovery #4455.
- Phased prerequisites: Storybook integration requires F9 Infrastructure: Convert Storybook lifecycle takeover into desktop-test resource contributions #4449 and is tracked there. Retaining a supervisor-launched app across handoff needs F10-M Infrastructure: Implement neutral macOS desktop application ownership and identity recovery #4446 or F10-W Infrastructure: Implement neutral Windows desktop application ownership and containment #4447 (delivered, Add neutral macOS application ownership with exact workload identity #4492 and feat(desktop-test): qualify Windows application ownership and containment #4494) and an explicit ownership option, and is tracked in Infrastructure: Convert Storybook lifecycle takeover into desktop-test resource contributions #4449. Attached-app handoff needed neither and is delivered.
- Unblocks: F13 Infrastructure: Add the generalized desktop-mcp management facet #4450.
- Parallel with: F3 Infrastructure: Add owned-process lifelines and typed desktop service readiness #4444, F6 Infrastructure: Tighten Storybook manifest provenance and native helper trust handoff #4445, F10-M, and F10-W.
Acceptance
- MCP and WDIO cannot control the same reserved target concurrently (#4491)
- A worker crash drains its session (#4491)
- Stale references, cursors, and artifact links fail after handoff (#4491)
- Credentials never enter capabilities, generated config, logs, or model output (#4491)
Validation
- Iterate with focused
yarn test <name>in each changed package, then run itsyarn format,yarn lint,yarn build, andyarn test. Finish withyarn clean-lage-cachethenyarn lage buildci; runyarn lage test-links --verbose --groupedafter markdown changes. - Add a patch changeset for each changed published package. Update the affected topic section and its status-overview line in the owning
references/current-status.md, and affected README/AGENTS guidance, in the same change. Per-run evidence lives in the pull request description or an issue comment; each package'sreferences/current-status.mdkeeps a status overview, stable topic sections, and only the latest result per native endpoint with a link. - Native, provider, or process-topology changes need matching-OS native contracts and the affected consumer lane. JavaScript tests and bundles do not qualify native behavior; hosted capability skips are not passes. Report each check as passed, failed, skipped, not run, or unsupported.
Evidence
- Qualification: the #4491 pull request description; the latest per-endpoint results are in the "MCP/WDIO handoff" topic and the "Native qualification" sections of
packages/agentic/desktop-test/references/current-status.md. - Retired plan:
driver-next.mdat0569e1b86, sections 6 (cancellation, handoff, and recovery) and 8 (F11).
Activity
test(desktop): cover Windows runner and agent interruption
Add scoped attach-only runner grants and settled controller handoff
test(desktop): cover Windows runner and agent interruption
Add scoped attach-only runner grants and drain-confirmed desktop hand…
JasonVMo commentedon Nov 16, 2026
Closing as completed. The generic attach-only handoff landed in #4491.
Acceptance: MCP and WDIO cannot control the same reserved target (bounded busy, explicit relinquish or operator preemption, reservation only after cancellation, settlement and session deletion); worker crash, normal exit and lost acquisition response drain the grant; stale references, cursors, proofs and artifact links fail after handoff and preempted MCP controllers reopen with fresh authority; worker credentials are passed individually and scrubbed before hook imports and specs. Evidence is on the generic native fixture: macOS 5/5 and Windows 5/5 with zero skips, plus real physical console Ctrl+C (unlocked remote RDP session) on Windows Fabric packaged and Win32 Paper REX. Hosted capture is a policy skip, not a pass. This does not qualify a React Native renderer or Storybook runner.
Residual items moved to open issues:
Cross-MCP-connection resume and automatic replay remain unsupported.