Skip to content

test(wsl-mover): orchestrator automatic path never reconnects a serving host (E9) - #34110

Merged
nwparker merged 1 commit into
nwparker/wsl-mover-land-2from
nwparker/wsl-d3a-landing-connect-test
Oct 26, 2026
Merged

nwparker merged 1 commit into
nwparker/wsl-mover-land-2from
nwparker/wsl-d3a-landing-connect-test

Conversation

@nwparker

@nwparker nwparker commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​130 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​130
Prod 0 0 0 0

ELI5

This adds a test for the landing branch only, with no product change. It checks the WSL move orchestrator's automatic path from end to end against a real WSL host service. First the orchestrator readies the host, then the move driver reaches it in automatic mode. The test makes sure the host is never reconnected when it's already serving, and that a bridge user's host is added only once.

What Changed

src/main/ipc/wsl-move-orchestrator-host-connect.test.ts, which uses a real WslHostService with the shared fake connector. It covers two cases:

  • A host that's already serving: a project-opened wake moves the distro, and preview and start each reach the host through connectWslMoveHostService(..., 'automatic'). The connector is never connected or disconnected again.
  • A bridge user with no host: the orchestrator's prepareWslMoveHost adds the host once with startIfStopped: false, and the driver's automatic reach adds no further connect.

Why

The E9 connect change (wsl-move-host-connect.ts) and the orchestrator's own host readiness both reach the host before a move. This test pins the order: prepare first, then the driver's automatic path. That way, an automatic move never adds a reconnect, which would bump the host's liveness generation.

Linked Issue

N/A (internal tracker: D3a, E9)

Visual Proof

N/A: this only adds a test.

Testing

  • Automated: 2 tests. Both fail if the automatic mode calls service.connect instead of ensureForRuntimeCall.
  • On this head (land-2 at c0f0253), the whole orchestrator suite passes, 188 tests across 16 files:
    • orchestrator unit, user-choice and over-the-driver tests;
    • host readiness;
    • wiring, release and host-handler tests;
    • register-core-handlers and the host service;
    • wsl-move-host-connect, telemetry, and the wsl-move handler and driver-handler tests.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

This is based on the landing branch, which owns wsl-move-host-connect.ts. Merge it into land-2 at your discretion.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

… serving host, and adds a bridge host once (E9)
@nwparker
nwparker force-pushed the nwparker/wsl-d3a-landing-connect-test branch from 8f027a3 to 2b8420a Compare October 26, 2026 22:28
@nwparker
nwparker merged commit 4245537 into nwparker/wsl-mover-land-2 Oct 26, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant