Repository navigation
Fix SSH worktree delete routing after host reconnect - #7997
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughWorktree removal, local forgetting, and hook inspection now accept optional execution host identifiers. IPC and renderer logic resolve repositories by host, reject ambiguous identities, and isolate concurrent cleanup operations across hosts. Host IDs are forwarded through preload and local deletion APIs, while hook confirmation selects host-specific repositories and runtime settings. Tests cover duplicate repository IDs, fail-closed behavior, SSH removal, host-specific hook checks, and host-separated concurrent operations. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
Co-authored-by: Orca <[email protected]>
Jinwoo-H
left a comment
There was a problem hiding this comment.
Thanks @timsuchanek. I tightened the fix so deletion, forget, archive-hook inspection, and in-flight deduplication all use the canonical execution host. Ambiguous legacy worktree identities now fail closed instead of risking deletion on the wrong host.
Validated with focused regression tests, typecheck, a production build, Electron assertions, and a live Linux SSH worktree deletion.
* Fix SSH worktree delete routing * Harden host-scoped worktree deletion Co-authored-by: Orca <[email protected]> --------- Co-authored-by: Jinwoo-H <[email protected]> Co-authored-by: Orca <[email protected]>
Summary
Root cause
Orca can retain repo rows with the same project ID on different execution hosts. The delete flow and desktop IPC handler selected a repo using only the project ID, so an older SSH workspace could resolve to a local repo row after a host disconnect and re-adoption.
That caused Orca to invoke local
gitwith an EC2-only working directory. Node reported the missing working directory asspawn git ENOENT, leaving the workspace impossible to remove.Impact
Older SSH workspaces now carry their host identity through the preload contract. Deletion selects the matching SSH repo/provider, while disconnected or removed targets reach the existing reconnect-or-forget recovery flow.
Legacy workspaces without host metadata retain the existing bare-ID fallback.
Validation
vitestfocused suite: 193 tests passedgit diff --checkpassed