Repository navigation
fix(runtime): new local projects never dedupe onto an SSH project at the same path - #31055
Conversation
…machine Codex review 6 #7: create() matched paths across hosts, so creating a local project at a path an SSH project used returned the SSH row and made no directory. add() with no host had the same gap. One predicate, runtimeRepoIsRegistrationCandidate, now backs add, create and clone.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
…d dedupe Review follow-up (Opus P3s): runtime:<env> rows carrying a nested SSH connectionId, add() for a runtime host, the clone controller, and a stricter create() assertion.
ELI5
When you create a new local project, Orca first checks whether you already have a project at that folder, so it doesn't add the same project twice. The check compared folder paths only. If an SSH machine had a project at the same path (say
/home/me/notes), creating a local project there silently handed you the SSH project instead. No local folder was made and no local project was added.What Changed
RuntimeRepositoryRegistrationController.creatematched any project at the target path on any machine.addwith no host given (repo.add) matched across machines too.runtimeRepoIsRegistrationCandidate(src/main/runtime/runtime-worktree-selection.ts): the existing same-host match, plus "not an SSH row" through the sharedgetRepoSshConnectionId.add,create(both its first check and its race re-check) and the clone controller, which had its own copy of the same rule inline, all go through it. A project already registered locally at that path is still returned instead of being duplicated.Why
Registration reads and creates the folder on this machine, so an SSH row at the same path string is a different directory on a different machine. Using one predicate for all three registration paths keeps them from drifting apart. The clone controller already had this fix;
addandcreatedidn't.Codex review 6, item #7.
Linked Issue
N/A (internal review finding: Codex review 6 #7).
Visual Proof
N/A. Server-side registration logic only; nothing is drawn differently.
Testing
src/main/runtime/runtime-repository-registration-host-dedupe.test.tsruns the real controller on a temp directory. On main, all four SSH cases fail (createandadd, with both SSH spellings), andcreatemakes no directory. With the fix, all pass, and the "local project already there is returned" case still passes.runtime-repository-registration-controller.test.tsstill passes.Review
gpt-6.1-sol, high): no findings.Agent skill upstream boundary
Notes
SSH: this is the SSH fix. Folder workspaces are covered: the tests use folder projects. Wire format: unchanged.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)