Repository navigation
fix(wsl-mover): hold an app update install while a WSL project move runs - #34813
Merged
Merged
Conversation
6 tasks done
Installing an update quits the app. A move interrupted that way recovers on the next launch with nothing lost, but the user sees the move fail and, if it stopped between sending the copy and the host's commit, the projects stay read-only until a move is started again. The install now refuses while this process runs a move, says why, and keeps the staged update's Install retry; the move and its terminals carry on. Moves only run behind the internal WSL hosts gate, so nothing changes with the gate off.
nwparker
force-pushed
the
nwparker/wsl-move-update-install-hold
branch
from
October 28, 2026 07:18
d177cf5 to
7f626e3
Compare
Contributor
|
Warning Review limit reachedYou'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 8 minutes. View limit details
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. Comment |
7 of 9 tasks
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Moving a project to a WSL host takes a while. If Orca installs an app update in the middle, the update quits the app and the move is cut off. Orca recovers safely on the next launch, so nothing is lost, but the move fails, and in one narrow window the projects stay read-only until the user starts the move again. Now, while a move is running, Orca holds the update install and says why. The move finishes, and the user installs the update afterwards.
What Changed
isAnyWslMoveRunning()inwsl-move-running-moves.ts(the per-process move registry) is true from the moment a move claims its distro through the desktop rewrite.performQuitAndInstallchecks it right after the Linux package checks and before anything is torn down. It uses the same abort-and-status path as the Linux package refusal:updater:quitAndInstallAbortedplus an error status withretryAction: 'install'.Why
I audited quit, crash and update-install at every step of a move on this branch. Every step comes back on the next launch either fully moved or back at zero; none loses data:
prepared/source-fenced/quiesceddestination-stagedblobs-transferred(commit may have been sent)wsl-move-reset.ts:96-98,wsl-move-driver-plan.ts:74-105)destination-committed→client-rewrittenThe existing kill-rig fault-injection test kills at more than 30 points of a clean move, with and without a host server restart, and pins these outcomes.
So the cost of an install mid-move is availability, not data: a failed move, and in the
blobs-transferredwindow, read-only projects. The automatic mover's step previews first, and the preview refuses an in-flight move, so the user has to start the move from the dialog. Holding the install is the smallest guard that avoids all of it. It applies only while a move actually runs in this process, so there is nothing to time out or get stuck: the run always ends by finishing, failing or being cancelled.Alternatives considered:
Linked Issue
N/A (internal).
Visual Proof
N/A: an updater status message shown only during an internal, gated flow. The message text is asserted in the test.
Testing
src/main/updater.wsl-move-install-hold.test.ts:quit_and_install_held_for_wsl_move;The first test fails with the check removed.
pnpm tc,check:code-quality:changed, the existing updater suites (35 files) and the import, test-runner and max-lines checks pass locally. The full lint and test suites run in CI.Review
Self-reviewed.
Agent skill upstream boundary
Notes
wsl-orcad-deploy.ts, no move check). This is safe (the move resets or waits), but it costs the move. A one-line hold beforedeployOrcadwhenisWslMoveRunning(distro), mirroring the SSH "migrating" skip, would cover it.blobs-transferredwindow, the orchestrator's preview is refused as already in flight and retried forever, without starting the move that would settle it. The projects stay read-only until the user starts the move in the dialog.