Skip to content

Infrastructure: Add scoped runner grants and drain-confirmed desktop controller handoff #4448

Closed

Description

@JasonVMo

Status: Done

The generic attach-only handoff landed in #4491. Prerequisites F2 #4442 (#4463) and F1 #4436 (#4455) were already delivered.

  • Bounded busy by 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, and storybook-desktop/src/testing/{runWdioTests,worker}.ts.
  • Default to a bounded busy result. 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

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 its yarn format, yarn lint, yarn build, and yarn test. Finish with yarn clean-lage-cache then yarn lage buildci; run yarn lage test-links --verbose --grouped after 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's references/current-status.md keeps 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.md at 0569e1b86, sections 6 (cancellation, handoff, and recovery) and 8 (F11).

Activity

  1. JasonVMo commented on Nov 16, 2026

    @JasonVMo
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions