Skip to content

test(wsl-mover): prove the host's server update is held during a real move - #35404

Merged
nwparker merged 1 commit into
mainfrom
nwparker/wsl-move-update-hold-ci
Oct 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/wsl-move-update-hold-ci

Conversation

@nwparker

@nwparker nwparker commented Oct 28, 2026 •

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

ELI5

When a project is moving onto a WSL host, Orca must not replace that host's server partway through, or the move gets cut off. #34823 added that hold, but it couldn't be shown on a test device, because that needs a newer server build to update to. This PR proves it in CI instead: it runs a real project move, tries to update the host's server partway through, and checks that the update waits and then goes through once the move ends, however it ends.

What Changed

Test-only. No product code changes.

  • New src/main/wsl/wsl-orcad-update-move-hold-driver.test.ts uses the same rig as test(wsl-mover): prove an update install is held during a real move #35345 (which covered the app update for fix(wsl-mover): hold an app update install while a WSL project move runs #34813). These parts are real:

    • the WSL move driver;
    • the real orcad profile store on the host side (the fault-injection kill rig);
    • the running-moves registry and the move journal;
    • the server launch admission (deployAndLaunchWslOrcad), which is the code that decides whether to update.

    Only the calls into the distro itself are faked (remote commands, deploy, readiness probe), the same way wsl-orcad-deploy.test.ts fakes them.

  • How each test runs:

    • A move starts and is paused where it first stages on the host. By then it has journaled its cutover, so isWslMoveUnderwayOnHost is true.
    • The host's server is then launched with an Update (from Settings) and with a connect (its activation on connect).
    • Both keep the running server and report the update as deferred with orcad_update_wsl_move_running. Nothing is deployed.
    • The move is then settled and an Update deploys the new build. The four endings covered:
      • moved: the move completes.
      • failed: the host goes away mid-move and the move is put back.
      • cancelled: the user cancels.
      • killed then recovered: the desktop is killed at the host stage, then relaunched and recovered.
  • New managed-server-copy.test.ts checks that this code shows in Settings as "Not done: a project is moving onto this server. Orca updates it once the move finishes."

Why

The device check (awin) can't produce a server build with a different version partway through a move, but CI can. The test drives the real move code rather than seeding the registry, so it also catches a change in when a move counts as underway. For example, if the hold started only after the cutover, or ended before the move had settled.

It fails with the deferral removed: with moveRunning: false in wsl-orcad-deploy.ts, all 4 cases fail. A failed assertion releases the paused move, so a failure doesn't leave the later cases timing out.

Flag-off: test-only, no behaviour change. The test sets the WSL hosts gate the same way #35345 does.

User risk: none (tests only).

Linked Issue

Internal: CI proof for #34823's "host server update during a move" part, the counterpart of #35345 for #34813.

Visual Proof

N/A. Tests only.

Testing

  • Automated tests added: 4 driver cases and 1 label case. Three runs back to back, together with wsl-orcad-deploy.test.ts, wsl-orcad-update-admission-move-hold.test.ts and updater.wsl-move-install-hold-driver.test.ts, all passed.
  • Mutation: forcing moveRunning to false fails all 4 cases.
  • pnpm tc, oxlint, pnpm run check:code-quality:changed and the ast-grep gate pass.

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.

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)

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e1dc54ca-6576-46e5-8cb3-0d2440ca7c01
Commits

Reviewing files that changed from the base of the PR and between 93ff483 and be3c233.

Files selected for processing: 2
  • src/main/wsl/wsl-orcad-update-move-hold-driver.test.ts
  • src/renderer/src/components/settings/managed-server-copy.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only PR appears safe to merge.

Summary

Adds tests showing that a WSL host keeps its running server during a real project move.

  • CI checks that WSL server updates wait until project moves settle.

Reviews (1) · Last reviewed commit: "test(wsl-mover): prove the host's server..." · Reviewed by Greptile

@nwparker
nwparker merged commit 96038ec into main Oct 28, 2026
34 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