Repository navigation
fix(runtime): PR/MR worktree base refuses SSH projects named only by executionHostId - #31054
Conversation
…executionHostId Codex review 6 #4: the guard read the legacy connectionId, so a row stamped executionHostId 'ssh:<target>' without it ran git fetch on this machine.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
…grees with create Review follow-up: a local row with a stale connectionId and runtime: rows now refuse too (create already refused runtime: rows), through requireRepoLocalGitRoute in repo-execution-host.ts.
…er owns Codex follow-up: older servers keep a client-minted runtime:<id> stamp on rows whose files are here, and base resolution worked for them before. requireRepoLocalGitRoute reads the stored host (getStoredRepoExecutionHostId), so they run locally again; SSH rows and any row with a connectionId still refuse.
ELI5
When you start a workspace from a pull request (GitHub) or merge request (GitLab), Orca first works out which branch to start from. For a project that lives on an SSH machine, Orca must not do that work on this computer. It checked an old field to decide "is this an SSH project?", and newer projects don't always fill that field in. Those projects slipped through and Orca ran
git fetchon this computer instead.What Changed
executionHostId: 'ssh:<target>'(no legacyconnectionId) passed the "is this SSH?" guard inresolveRuntimeGitHubWorktreeBase/resolveRuntimeGitLabWorktreeBase. The server then rangit fetchin a local directory with the same path and returned a local commit as the base for a remote project.requireRepoLocalGitRoute(src/main/repo-execution-host.ts).getStoredRepoExecutionHostId) and passes it to the existingrequireReachableGitRoute.connectionId: a nested SSH target, or a stale one besidelocal.SshHostNotServedError, the same error the legacy spelling already got.runtime:<id>stamp, still resolve locally.Why
The gate is built from the existing resolvers (
getStoredRepoExecutionHostId,requireReachableGitRoute), so these guards answer the same way the rest of the main process does. A follow-up PR adds a ratchet that flags new rawconnectionIdhost checks and points at this gate.Codex review 6, item #4.
Linked Issue
N/A (internal review finding: Codex review 6 #4).
Visual Proof
N/A. This changes server-side routing only; nothing is drawn differently.
Testing
src/main/runtime/runtime-review-worktree-base-execution-host.test.ts. On main, the twoexecutionHostId-only cases fail: they returned a local SHA after a localgit fetch. With the fix, they pass. The test covers four refused row shapes (SSH by either spelling, a staleconnectionIdbesidelocal, a nested SSH target besideruntime:) and two local shapes (local, and aruntime:stamp), for both GitHub and GitLab.Review
gpt-6.1-sol, high):runtime:-stamped rows, which older servers keep on rows they own.localrow with a staleconnectionIdbecame local. Fixed: it now refuses.runtime:rows the way create does. Declined: those rows are this server's own files, see the Codex point above. Create's refusal of them already exists on main and is separate.Agent skill upstream boundary
Notes
SSH: this is the SSH fix. Mobile and wire format: unchanged. Cross-platform: no path handling changed.
Rows with contradictory host fields are refused rather than guessed.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)