Repository navigation
Description
Current status - 2026-11-07
Implementation in #4463; no active prerequisite blocker. Windows/Win32 descriptor runs exercise cancellation, correlated delayed/error readiness, old-message rejection, quarantine/recovery, and same-session preview invalidation. The ledger retains exact reference kind, identity, generation, session continuity, and failed stimuli.
Remaining acceptance:
- Partial, Win32: a render fault did not expose a fresh preview root, so fresh-preview lost-context mutation fencing is not proven. Production-bundle Metro reload is Unsupported and is not substitute evidence.
- Partial, both Windows endpoints: Callout was shown and cleaned up, but a separately registered secondary-window target was not selected. Preserve chrome/window and immutable PNG lifetimes while invalidating only preview element references.
- Not run on the latest recorded macOS candidate
a19fd3e1: native cancellation, readiness/render faults, lost-context fencing/recovery and secondary-window cases. Fabric physical input remains Partial; earlier failure evidence remains in Infrastructure: Live-qualify the desktop driver and MCP foundation on macOS, Windows, and Win32 #4441. - Intentionally unsupported: transparent upstream bridge reconnect/session restoration. Exact same-live-incarnation restart must keep returning renderer-specific relaunch-required; uncertain or replaced identities stay fail-closed.
Physical input failures and broader platform/measurement gates remain #4441; full support consolidation remains #4451. Merging main is not a new native qualification.
Goal
Story providers have no cancellation or lifetime context, and runtime bridge reconnect and delayed-render fencing are incomplete. #4434 conservatively quarantines the target when a story change has an unknown effect. Add the context needed to settle or fence story changes precisely, so a late render can never satisfy or overwrite a newer selection, and so that whole-target quarantine is needed only when fencing cannot be proven.
Part of #4435 (plan item F4).
Scope
- Owner: driver story context port and runtime bridge.
- Paths (under
packages/agentic/):desktop-driver/src/{storybook.ts,server/sessionStories.ts,operations/story.ts,operations/runtime.ts},storybook-desktop/src/driver/StorybookChannelOrchestrator.ts, and the runtime bridge and story root instorybook-desktop-runtime, with tests. - Add a local signal and lifetime context separate from serializable inputs, a typed bridge-unavailable state, connection epochs, and prompt failure of pending requests on disconnect.
- Version the producer/verifier story-marker contract and add conformance tests of real runtime output against the driver verifier, without Node imports in the runtime.
- Pass story operations only the catalog fields they need, not source or test metadata.
- Account for the orchestrator's prepare broadcast, HTTP navigation, authenticated readiness, and local timeout.
- Investigate upstream
@storybook/react-nativechannel reconnect behavior before promising transparent recovery.
Dependencies
- Blocked by: nothing. The context contract from Desktop driver: bounded agent operations, protected service, and MCP adapter #4434 is in place; process relocation is not required.
- Unblocks: F5 Infrastructure: Authorize and settle every controlled Storybook mutation entrance #4443 and the Storybook facet of F13 Infrastructure: Add the generalized desktop-mcp management facet #4450.
- Parallel with: F1 Infrastructure: Unify desktop driver-service composition and wire durable recovery #4436, F7 Infrastructure: Guard neutral desktop package dependency and import boundaries #4438, F8 Infrastructure: Expose bounded persisted desktop test-run and artifact queries #4439, F12 Infrastructure: Attenuate desktop driver grants and isolate MCP connections #4440, and F15 Infrastructure: Live-qualify the desktop driver and MCP foundation on macOS, Windows, and Win32 #4441.
- Coordination: this item owns epoch and cancellation changes in
StorybookChannelOrchestrator.ts; F5 applies ingress changes afterward. Do not split that file between simultaneous editors.
Acceptance
- An absent bridge fails promptly, before dispatch, with effect
none. - Cancellation after dispatch settles or fences late work. Releasing the queue at a deadline is not acceptance.
- An old ready, error, or render message cannot satisfy or overwrite a newer selection.
- Context-sensitive actions reject stale previews.
- Restarting the driver with a running app either reauthenticates safely or returns an explicit, renderer-specific relaunch-required state.
- Behavior is qualified separately on macOS Fabric, Windows Fabric, and Win32 Paper.
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 owning
references/current-status.mdrows (done, work in progress, unsupported) and affected README/AGENTS guidance in the same change. - 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
- Current state: "Story catalog/select/reset", "Exclusive Storybook control", and "Application-exit/reconnect continuity" in
packages/agentic/desktop-driver/references/current-status.md; topology notes inpackages/agentic/storybook-desktop/references/integration.md. - Retired plan:
driver-next.mdat0569e1b86, sections 5 (story operations) and 8 (F4).
Activity