Commit Graph
15538 Commits
Author SHA1 Message Date
NeilandClaude fb90078675 fix(wsl-mover): refuse an unreadable slept checkpoint, prefer it, and spool it to disk
Review of #32343:
- A checkpoint behind an unreadable log (or an unreadable one) refuses with the pane named instead
  of carrying stale history.
- For a pane the move just slept the checkpoint is the newest copy, so it wins over an older
  renderer buffer or snapshot.
- Buffers spool to a per-move folder and only their hashes and sizes stay in memory; the snapshot
  channel reads them by offset. The folder is removed whatever the outcome.
- A journal write that landed before it threw is reset, so no orphan record blocks the next move.

awin's checkpoints were 310-615 KB, well inside the 5 MB per-pane cap, so nothing there is trimmed.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 04:04:46 -07:00
NeilandClaude 5c3801bb3d fix(wsl-mover): never leave behind an agent whose key may be the selected project
Review of #32343: scoping the session check to the selected projects let an unqualified key for a
repo id another host also registers fall out of both the transfer and the refusal. Such a key now
refuses. Adds tests that fail on the old code: another project's live agent with its tab open and
its draft don't refuse, the same kinds of state in the selected project still do.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:58:08 -07:00
NeilandClaude 18ca408e4d fix(wsl-mover): a WSL pane is idle only when its shell has nothing else
Review of #32343: reading only the terminal's foreground group let background jobs, nohup and
disowned work, setsid daemons and a script waiting at read pass as idle, and the move's Sleep would
end them. Scan the pane shell's subtree, its session and every process carrying its key; any
non-shell process, or a shell running a script, blocks.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:53:32 -07:00
NeilandClaude 37106eecf7 fix(wsl-mover): retry a renderer store main refused to record
The renderer applied a store and wrote its marker, but ignored a refused ledger record (gated-off,
failed, not-main-window), so a committed move stayed unfinished and refused every later move of the
distro until the next app start. Log the reason and retry with backoff until it lands.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:46:20 -07:00
NeilandClaude cee37f7c45 fix(wsl-mover): say why when a move can't be prepared, instead of a bare reset
An export or journal failure after the pause (a digest mismatch, on awin) was rethrown and shown as
"everything was put back" with no reason. Nothing is journaled yet at that point, so refuse with the
error named instead.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:44:17 -07:00
NeilandClaude 637fd933b2 fix(wsl-mover): carry a slept pane's scrollback from its daemon checkpoint
The move sleeps every pane first, and a slept pane's history lives only in the daemon's checkpoint,
never in a renderer snapshot. The export carried renderer snapshots only, so moved terminals opened
empty. After Sleep the driver reads each paused pane's checkpoint (as cold restore would replay it)
and the export carries it under the pane's own snapshot ref; the snapshot channel serves those bytes,
checked against the signed hash. SSH conversions pass no reader and are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:36:10 -07:00
NeilandClaude a5bdb61e93 fix(wsl-mover): sign the manifest as the journal and the host read it
The digest was computed over in-memory rows. A value with toJSON (a Date on a row added this
session) canonicalized to {} when signing but to its string once written to the journal or sent to
the host, so the first move after adding a project reset with orcad_migration_manifest_digest_mismatch
until a restart reloaded the row. Normalize through JSON before signing.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:35:16 -07:00
NeilandClaude b894061a6f fix(wsl-mover): only the selected projects' session rows can refuse a WSL move
The session eligibility check treated host local's whole partition as the move's, as the SSH
conversion does. So an agent session or unsaved draft in any other project on this desktop, or in a
project an earlier move retained, refused every later WSL move from that distro.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:35:15 -07:00
NeilandClaude c88c91d29c fix(wsl-mover): judge a bridge WSL pane's foreground inside its distro
On Windows every live bridge pane's own process is wsl.exe, so the busy-terminal gate read every
open WSL terminal as running a program and refused the move. Read the pane's terminal foreground
process group inside the distro (processes carry ORCA_PANE_KEY): only shells means idle, anything
else blocks, and an unreadable guest stays unverifiable.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:35:14 -07:00
NeilandClaude d5806d5b4a feat(wsl-mover): "Use on this computer again" brings a moved project back as it was before the move
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-23 03:11:23 -07:00
NeilandClaude 0146ba170b fix(agent-hooks): a WSL host's Codex account-home launch with hooks off skips too; mark the R42 guard to drop with the bridge
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 05:33:23 -07:00
NeilandClaude f57817e216 fix(agent-hooks): a WSL host's orcad never removes the hook entries the WSL bridge shares (R42)
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 05:33:23 -07:00
NeilandClaude 5770de8ac6 fix(telemetry): report a pause refusal's reason, an outcome for a thrown run, and only real transport errors as unreachable
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 05:33:07 -07:00
NeilandClaude 0e9de6eaf8 feat(telemetry): report how WSL moves end, by phase and reason code (R43)
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 05:33:07 -07:00
NeilandClaude d18f5e7643 test(wsl-mover): read the persisted stage through a typed record, not Reflect
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 05:32:49 -07:00
NeilandClaude 76fb1812d5 fix(wsl-mover): carry markdown frontmatter visibility and closed-terminal-tab tombstones into the moved project
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 05:26:06 -07:00
NeilandClaude 4ba818d4e6 fix(wsl-mover): reset for a lost distro even when its kept host fails to connect, never for a renamed one; compare filled-in repo keys only where the source lacked them
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 04:56:33 -07:00
NeilandClaude e527e159c1 test(wsl-mover): type the fault test's journal hook without a cast
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 04:48:26 -07:00
NeilandClaude d70f1057c3 test(wsl-mover): list the D1b-10 real-SQLite mover tests
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 04:41:49 -07:00
NeilandClaude 1aa6b7c37f fix(wsl-mover): reset a move waiting on a distro that is proven unregistered; test updates mid-move (R41), lost distros (R38) and two desktops (R39)
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 04:36:55 -07:00
NeilandClaude ef9886b516 fix(wsl-mover): carry unsaved drafts into the moved project; round-trip every fixture through the real export, driver and host import
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 04:30:40 -07:00
NeilandClaude e8fa137a86 test(wsl-mover): kill the real move driver at every point against a real host store; abort a reset move's leftover stage on reconnect
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-22 04:15:58 -07:00
Neil a63e7012a2 fix(wsl-mover): a terminal in a known folder outside the move never blocks it (R46 follow-up) 2026-10-22 03:48:19 -07:00
Neil 21fb600ec6 fix(wsl-mover): fence any spawn by its folder and name the re-proof's reason (R46 review) 2026-10-22 03:27:06 -07:00
Neil 00a841b612 test(wsl-mover): pin the commit re-proof, browser jar identity and repeated move generations (R45, R46, R47) 2026-10-22 03:27:05 -07:00
Neil b5d8e34c0d fix(wsl-mover): fence worktree-less spawns by cwd and re-prove terminal exit before commit (R46, WIP) 2026-10-22 03:27:05 -07:00
Neil 0f99b5ce07 test(wsl-mover): the IPC record test now finishes the rewrite with the registry complete (D1b-7f-2) 2026-10-22 03:26:32 -07:00
Neil 6e0e029f0b fix(wsl-mover): redo additive rewrites once at a stale window's unload; behavioural coverage proof (D1b-7f-2 review) 2026-10-22 03:06:48 -07:00
Neil 5a1999609e fix(wsl-mover): share the session focus write so the re-apply adds no layout writer (D1b-7f-2) 2026-10-22 02:58:44 -07:00
Neil 84af6ca6f4 test(wsl-mover): registry-complete lifecycle, stale-focus restart, unload re-apply (D1b-7f-2) 2026-10-22 02:47:26 -07:00
Neil e3d305c843 WIP(wsl-mover): 7f-2 registry complete, coverage proof, startup re-apply (D1b-7f-2) 2026-10-22 02:37:31 -07:00
Neil a9aa4067b9 test(wsl-mover): type the e2e's fake move state instead of reading it through Reflect (D1b-9) 2026-10-20 23:38:18 -07:00
Neil f474c907b6 fix(wsl-mover): word an unfinished earlier move as still finishing (D1b-9) 2026-10-20 23:33:29 -07:00
Neil 58e88aa723 fix(wsl-mover): move dialog hides instead of blocking, follows runs after a reload, and lets a start settle an unfinished move (D1b-9 review) 2026-10-20 23:33:29 -07:00
Neil fe7d00535a feat(wsl-mover): move dialog with preview, blockers, progress and result behind the internal WSL hosts gate (D1b-9) 2026-10-20 23:33:28 -07:00
Neil b5cb7b5655 feat(wsl-mover): the move driver runs a WSL move end to end, with production gate facts and journaled restore folders
One entry point (and preview/start/cancel/listUnfinished IPC for D1b-9) plans the move, gates
terminals on the hook server's agent status, the close-tab process probe, running automation runs
and live dispatches, pauses and proves exit, stages, sends blobs, commits only from
blobs-transferred (#29825), and finishes on the desktop. Any failure resets to zero or goes forward
when the host committed. Restore folders and the automations to turn back on are kept in the
journal; the host turns those automations back on after commit, retried until it confirms.
A real-PTY test pauses daemon shells, and runs on a real distro in the WSL orcad lane.
2026-10-20 23:33:12 -07:00
Neil b9722fe82b fix(wsl-mover): keep the retained mark out of the WSL move manifest (D1b-8) 2026-10-20 23:31:57 -07:00
Neil 3b00ec67a8 feat(wsl-mover): retain moved source rows, reconcile them on start, and plan delta moves (D1b-8) 2026-10-20 23:31:57 -07:00
Neil 4cf77a562f feat(wsl-mover): copy in-app browser logins into the WSL host on a move (D1b-7f)
A committed WSL move now copies each in-app browser profile's cookies once into
the WSL host's stable route partition (owner decision 3a), merging without
overwriting what the host jar holds and never touching the source. Where that
is infeasible (no deployment link so no stable partition, the destination is
not a WSL host or is gone, or the partition name is held by another identity)
the host starts fresh and the move journal records why (3b). Registered as the
ledgered browser-cookies rewrite store; it runs only once browser sessions and
an app window exist. WSL_MOVE_DESKTOP_REWRITE_REGISTRY_COMPLETE stays false.
2026-10-20 23:30:47 -07:00
NeilandClaude 05e35530ca fix(wsl-mover): hold the orchestration store while a worker in scope is live; skip federated rows (D1b-7e review)
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-20 22:10:55 -07:00
NeilandClaude fab9f339d3 feat(wsl-mover): rewrite a moved project's orchestration history on the desktop (D1b-7e)
Settled local worker dispatches and their worker-terminal rows in a moved
project take the WSL host's worktree id, in one ledgered, idempotent store.
Chat workers, live rows, federated attachments and JSON receipts stay as
written; automations keep their unchanged local copy (the scheduler only
advances it). Per-table dispositions for orchestration.db.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-20 22:10:55 -07:00
Neil df675bff31 fix(wsl-move): import wslUncPathToLinux from shared wsl-paths in the manifest exporter, where 7d moved it (D1b-7d) 2026-10-20 22:10:25 -07:00
Neil a17b13ddde fix(wsl-move): import the migration manifest types from main's orcad-migration folder (D1b-7d) 2026-10-20 22:00:53 -07:00
Neil 87e9755483 feat(wsl-move): rewrite renderer stores for moved projects and keep their UI through catalog prunes (D1b-7d)
Registers the renderer-side desktop rewrite stores quick-open-history, file-view-preferences and notebook-environments. The renderer copies each moved workspace's entry to its WSL host key, marks it applied in the same storage, and records the ledger entry; main requests a storage flush first and accepts only the main window. Committed moves are re-listed for re-application at every startup. Catalog prunes keep filters, hook trust and setup-script dismissals of moved repos.
2026-10-20 22:00:53 -07:00
Neil 0a93bdd293 fix(wsl-mover): finish the main rewrite before the window loads, keep one copy of each moved tab, and copy instead of move (D1b-7c) 2026-10-20 22:00:43 -07:00
Neil 01fc68626f feat(wsl-mover): rewrite the desktop's routing and seed the host's session after a move (D1b-7c)
Registers the main-side desktop rewrite stores ui-routing, session-globals and host-session-seed. Adds a +2 main layout-writer baseline line for wsl-move-main-rewrite-stores.ts: these are one-shot, ledgered move rewrites, and no LayoutCommand can set focus or seed a runtime host's partition.
2026-10-20 22:00:43 -07:00
Neil ed9c23ad2e test(wsl-mover): read the hidden local row through main's per-host hidden-repo API (D1b-7a) 2026-10-20 22:00:28 -07:00
Neil 4e266cf553 test(wsl-mover): run the moved-project chat runtime test in the Node runtime (D1b-7a) 2026-10-20 22:00:28 -07:00
Neil cac9b7be2d fix(wsl-mover): moved-project chats go through the layout owner instead of writing layout directly (D1b-7a) 2026-10-20 22:00:28 -07:00
Neil 9b863147f9 feat(wsl-mover): a moved project's existing chats stay listed and resumable on this computer (D1b-7a) 2026-10-20 22:00:27 -07:00