* Resolve Windows drive paths inside the WSL distro for Source Control
Source Control failed for a Windows-drive repository when its WSL distro mounts drives somewhere other than /mnt/ (wsl.conf [automount] root): Git ran cd /mnt/c/..., changed files never loaded and Generate stayed disabled. Worktree deletion checked the same wrong path.
Drive paths are now resolved by the distro itself at the moment of use (wslpath on the drive root), so Git, the line-ending probe, worktree removal checks, object quarantine and OpenCode file operands follow the distro's own mount root with no host-side copy to go stale. A drive with no readable mount stops the command instead of running it from the wrong directory. Git output under a custom root maps back to the drive through the existing per-distro root reader.
Tracked in STA-15054.
* Read generation recipe files from a Windows-drive workspace in WSL
Commit, PR and branch generation with a file recipe failed before launch in a WSL + Windows-drive workspace: the recipe reader passed the Windows workspace path to a runner that accepts only guest paths. The workspace and a drive recipe path now resolve under the distro's own drive mount, as Git does.
Tracked in STA-14217.
* Map Git output to drives once the distro's mount root is read
Before a drive checkout's WSL Git runs, the distro's automount root is read if it has not been since the distro started, reusing the existing root reader, so paths Git prints under a custom root map back to the drive instead of a UNC path that removal guards would not match. Mount lookups no longer leak wslpath's stderr into missing-path detection, multi-line arguments such as commit messages are never treated as drive paths, an uppercase /mnt/C directory is not a drive, and removal resolves its two paths in one guest call.
* Refuse drive Git output when the distro's mount root can't be read
A failed or timed-out root read now fails the Git call instead of reading its output against /mnt/, so a custom-root listing can never reach removal guards spelled as UNC paths; a failed read is not retried for ten seconds, so polls fail fast without another wsl.exe. Background Git is admitted before the read, so it never boots a stopped distro, and a cancelled call stops waiting for the read.
* Read the mount root once per start without adding work to warm Git calls
Per the design ruling: the root read before drive Git allows for a cold distro start (60 s) instead of failing a default-root user's first Source Control load; admission runs only when a read is needed, so warm background polls add no wsl.exe; probes and Git share the ten-second failure backoff; and a read overtaken by a distro stop reads once more, re-admitted, instead of reporting a failure.
* Recheck the mount root after admission so concurrent callers share one read
A caller that waited for admission while another caller read or failed to read the root now uses that outcome instead of starting a second read inside the failure backoff.
* refactor(ipc): group handlers and PTY support by owner
* chore(test): prune retired IPC timeout baseline
* fix(types): include worktree path settings in web project
* feat(editor): git blame for the cursor line
* fix(editor): blame review fixes
Co-authored-by: AnddyAgudelo <andiagudelo@gmail.com>
Co-authored-by: Matt Tuusberg <tuusberg@gmail.com>
Co-authored-by: eric <1034850788@qq.com>
Co-authored-by: 5hseok <110245258+5hseok@users.noreply.github.com>
* fix(editor): blame follows the owning repo, focused pane and visible editor
* fix(editor): blame review fixes for compiler and lint
* fix(editor): blame keeps the status bar steady and resends nothing when HEAD is unchanged
* fix(editor): inactive blame panes do no work; read worktrees through the record accessor
* fix(editor): released blame hides; split panes never take over; local IPC passes knownHeadOid
* fix(editor): blame baseline tracks shallow history, uses source lines, and drops stale results after HEAD moves
* fix(editor): blame hides the old baseline while a HEAD-change reload is pending
* fix(editor): blame baseline is the raw blob; only real HEAD moves drop it
* fix(editor): only a failed focus reload keeps blame
---------
Co-authored-by: AnddyAgudelo <andiagudelo@gmail.com>
Co-authored-by: Matt Tuusberg <tuusberg@gmail.com>
Co-authored-by: eric <1034850788@qq.com>
Co-authored-by: 5hseok <110245258+5hseok@users.noreply.github.com>
* refactor: place shared settings profiles and host contracts with owners
* fix: retire stale cleanup validation contacts
* refactor: consolidate imports from concrete owners
* refactor: bind new card fixture to profile defaults owner
* style: format rebased concrete host import
* refactor: consolidate project header color owner imports
* fix: load released phone readers after folder moves
* fix: preserve released chat readers and current owner imports
* fix(sidebar): keep delete dialog height stable and show full ignored-files list
* Replace delete dialog file popovers with inline collapsible sections
* fix(worktree): refresh the base without merging into a checked-out branch
Creation already starts from the fetched remote-tracking commit. Keep Local
Main Up to Date now moves the local branch only when no worktree has it
checked out, with a compare-and-swap update-ref, so creation never takes
another checkout's index.lock or a checkout admission slot.
* fix(worktree): recheck checkout ownership right before moving the base ref
* fix(worktree): let Git refuse a checked-out base branch when fast-forwarding it
* fix(worktree): keep the base ref update a compare-and-swap, checked under one admission grant
Revert the local fetch: it overwrote FETCH_HEAD, failed when the file
transport is disallowed and protected nothing extra on Git before 2.35.
The final ownership check now runs with update-ref under one admission
grant, and a branch a rebase or bisect has reserved counts as checked out.
* fix(worktree): settle routing before the base-ref grant and count reserved branches as in use
* fix(worktree): check base-branch ownership from Git's files right before update-ref starts
Holding one admission grant across commands could deadlock on WSL routing
probes. The write now takes its own admission and, once admitted, rereads
worktree HEAD and rebase/bisect files before Git starts.
* fix(worktree): treat any worktree HEAD naming the base branch as in use, and recheck before the WSL fallback
* fix(worktree): fast-forward a checked-out base in its own clean checkout after the create returns
Creates stay on the fetched remote ref and never wait on local main. Once a
create succeeds, a detached, admission-exempt job (one per repo, coalesced)
fast-forwards a checked-out base in its owner checkout with the ff-only safety
flags, only when that checkout has no tracked changes; Git refuses a held
index.lock and overwritten untracked files. It has no deadline, so it is never
killed mid-checkout. Not-checked-out bases keep the compare-and-swap update-ref.
Restores the setting copy, and drops the unused relay outcome parsers.
* fix(worktree): skip checked-out history walks during create, defer sparse creates' base update, add Windows long paths
The create-time refresh now stops at a checked-out base before rev-list, so
only the admission-exempt background job walks its history. Sparse creates
start the update after their own checkout. The owner merge gets Windows long
paths like the create's checkouts, and no longer holds the app-wide ref
maintenance pause while a filter stalls.
* fix(git): retire native process groups after abnormal stops
* fix(git): drain worker output after group retirement
* test: retain descendant cleanup until liveness assertion passes
* refactor: group process and platform modules by ownership
* refactor: preserve moved module workflow routing
* refactor: preserve native loader and embedded bundle origins
* perf(layout): skip unused normalization reports in pane commands (#42615)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* Clarify cleanup pinning and ignored-file protection (#42616)
* test: remove 55 low-value suites and assertion driver (#42605)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* fix(skills): skip Claude sync scratch folders during skill discovery (#42610)
Claude Code parks replaced skill copies in `.trash` and in-progress syncs
in `.staging` under its skills roots. Discovery walked into both, so each
synced skill showed up as duplicates. Prune those directory names in the
native file walk and in the generated WSL `find` command.
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
* test: remove 78 low-value suites and trim redundant cases (#42621)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
* test: remove 53 low-value suites and trim redundant cases
---------
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: BingZ <zzb@gxsmjx.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
* Fix worktree deletion on server hosts
* Finish workspace removal cancellation and final saves
* Wait for WSL workspace deletion to finish
* Capture CLI deletion errors in the server integration test
* test: canonicalize removal fixture and expose serve stop phases
* test: align serve fixture versions and report workspace paths
* test: isolate removal lifetimes and resolve native fixture paths
* Type-check cancellation assertions on the shared removal mock
The delete preflight listed the whole index with a buffered
`git ls-files --stage -z`, which overflows the 10 MiB Git output cap in
large repositories and blocks workspace deletion. Stream the listing
through gitStreamStdout and keep only gitlink (mode 160000) paths, so
memory scales with the number of submodules instead of the index size.
Fixes#42134
* Reuse resolved executable paths for Mac process launches
* Keep synchronous launch wrappers covered by the ratchet
* Explain executable launch type assertions
* Remove resolved Git imports from the direct-launch baseline
* Keep native spawn cancellation on the native lookup path
* fix(hooks): approve setup from the ref a new workspace checks out
The setup trust check before a create read orca.yaml from the project's
own checkout, while the host (since #37977) checks the created worktree.
A checkout behind origin/main made every create skip setup and open the
"branch has different setup commands" dialog right after creation.
The check now reads orca.yaml at the ref the create checks out (the
resolved base, or the local branch for explicit reuse), refreshing it
only when create would, under one deadline. Any failure falls back to
the previous checkout read, and older hosts ignore the new parameter.
* fix(hooks): stop optional setup reads at the deadline and cover automation recovery, VM and web paths
* fix(hooks): refuse late WSL git retries and approve an automation's saved base on recovery
* docs(hooks): move the skipped-setup recovery comment back to its function
* fix(automations): re-approve setup when an automation's base branch changes
The project catalog keys a repo by its first network remote (upstream,
origin, then the rest), but GitHub issue and PR lookups only read the
remotes named origin and upstream. A repo whose origin is a local bare
repo and whose GitHub remote has another name showed as GitHub-backed
yet Tasks said no GitHub source was detected. Origin's role now falls to
the same remote the project identity picks.
Fixes#42102
* feat(worktrees): archive and restore a workspace's checkout (backend, off)
* fix(worktrees): keep archived rows through startup GC and Windows path checks
* fix(worktrees): serialize archive and restore, finish interrupted restores
* fix(worktrees): restore prior archive flag, drop leftover marks, keep archived rows out of offline listings
* test(worktrees): fixed timestamp in archived GC test; drop path cast
* feat(workspace-cleanup): archive inactive workspaces from the runner once archive is on
* fix(worktrees): queue bare-id restores and forget the archive mark when deleting an archived workspace
* fix(worktrees): import archive params from their new contract folder