Repository navigation
feat(wsl-mover): retain moved source rows, reconcile them on start, and plan delta moves (D1b-8) - #31401
Closed
nwparker wants to merge 2 commits into
Closed
feat(wsl-mover): retain moved source rows, reconcile them on start, and plan delta moves (D1b-8)#31401nwparker wants to merge 2 commits into
nwparker wants to merge 2 commits into
Conversation
nwparker
force-pushed
the
nwparker/wsl-mover-d1b-7e-orchestration-history
branch
from
October 21, 2026 05:17
b8bf5c6 to
05e3553
Compare
nwparker
force-pushed
the
nwparker/wsl-mover-d1b-8-retain-reconcile
branch
from
October 21, 2026 05:18
5d0884e to
5e909a6
Compare
8 of 9 tasks
…nd plan delta moves (D1b-8)
nwparker
force-pushed
the
nwparker/wsl-mover-d1b-8-retain-reconcile
branch
from
October 21, 2026 07:46
e0640d7 to
b9722fe
Compare
nwparker
changed the base branch from
nwparker/wsl-mover-d1b-7e-orchestration-history
to
nwparker/wsl-mover-d1b-7f-browser-logins
October 21, 2026 07:47
8 of 9 tasks
Contributor
Author
|
Contained in the dark landing PR #34059 (its head commit is an ancestor of the landing branch). Closing in favour of it; branch kept. |
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
When a project moves from "Windows reaching into WSL" to "the WSL host itself", Orca keeps the old Windows-side copy of the project's records, hidden, as a safety net. This PR makes that safety net hold up. Each kept record gets a small label saying which move took it. If you downgrade Orca and come back, the labels are put back and the records are hidden again, and nothing is lost. A later move into the same WSL distro only takes projects that are new.
What Changed
Before: a committed move hid its projects' local records. Nothing marked those records, nothing checked them after a downgrade, and no step finished a move by setting it to
retained. A second move into the same distro had no planning step: nothing worked out what it should take, chained it to the earlier move, or refused it while another move was still running.After:
client-rewritten), its local rows are markedorcadRetained: {migrationId, environmentId}. The marks are saved to disk first, then the journal records the move asretained. Nothing is deleted. The rows stay hidden by the samevisibleRepos/visibleFolderWorkspacesfilters SSH uses (through D1b-7a'swithoutWslMovedRepos).reconcileManagedOrcadSshTargetsdoes for SSH. A pass runs at startup and after every journal change. It:sourceChangedAtif an older build changed it;planWslMoveworks out what a move into a distro would take: only projects no earlier move of that distro took. It also checks what the host holds now, so a project the host still has after "Use on this computer again" is not taken twice.generationkeeps increasing even past a released move.journalWslMoverecords the move atprepared, chained to the current head bysupersedesMigrationId. The journal itself refuses a second move while one is in flight, or one planned against a head that has since changed.changed. They are never moved again.orcadRetained. For SSH this changes no bytes, because SSH rows are never marked.assertLocalWslScopeMatchesPayload).Shared paths touched:
Repo/FolderWorkspacetypes, repo hydration, folder-workspace normalization, and a new store methodsetWslMoveRetainedMarks.main-process-ready-foundation.ts.orcad-source-catalog.ts.How this relates to other work:
removeWslMoveCutoverand does not add a removal path of its own. After a release, the next reconcile pass removes the released move's marks so the rows list normally again. If the journal refuses a release because a later delta move builds on it (wsl_move_superseded), every mark stays as it was (test included). Undo is not reimplemented here; owner decision 2 says no reverse mover.recoverInterruptedWslMoves) owns moves that stop before the commit. This PR only handlesclient-rewritten→retainedand after. The planner refuses a new move while any move of that distro is unfinished, so it never competes with a reset.Why
notReflected).Owner questions
Each one ships with the conservative default:
sourceChangedAt) and listed, never moved again, and "Use on this computer again" is the remedy. Do we want a host-side update, or a "keep the host's version" action like SSH has?Linked Issue
N/A (maintainer stack, tracker row D1b-8).
Visual Proof
N/A: no UI. The mover is dark-gated, and D1b-9 adds the move UI.
Testing
wsl-move-retention.test.ts(real SQLite, listed invitest-sqlite-runtime-files.mjs):wsl_move_superseded) keeps them;client-rewritten;wsl-move-delta-plan.test.ts:orcad-retained-marker.test.ts.pnpm tc, the neighbour suites (moving-wsl-projects,shared/wsl-move,shared/orcad-migration,main/ssh,main/orcad, catalog and folder persistence),check:code-quality:changedand the ratchet scripts all pass locally on macOS. The only local failure wasorcad-forked-child-paths.test.ts, which fails the same way on the base (macOS/varvs/private/vartemp-path symlink).Review
An adversarial review agent found no HIGH and two MEDIUM issues, both fixed:
These LOW findings are also fixed:
retained.changed, notremoved.Agent skill upstream boundary
Notes
wslUncPathToLinuxand the existing WSL path rewriter, and the profile-folder comparison follows the fence's case rule.isLocalWslMoveRow), and SSH manifests are byte-identical.