Repository navigation
fix(orcad): reopen a managed tunnel to a host another desktop restarted - #25800
Merged
OrcaWin merged 1 commit intoOct 6, 2026
Merged
Conversation
The tunnel's identity check pinned the saved runtime id, which orcad mints per process. A host updated or woken by another desktop, or restarted while this one was away, failed every reconnect with orcad_identity_mismatch, and nothing could refresh the id because that needs the tunnel. The E2EE handshake with the pinned host key and our accepted token now prove the server; the first authenticated status reply records the new id. A different host is still refused. Co-Authored-By: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
A managed SSH server gets a new internal ID every time it restarts. Desktop A's tunnel check insisted on the ID it last saw. So if another desktop restarted or updated the server while A was away, A could never reconnect, and it couldn't learn the new ID either, because learning it needs the tunnel. Now the tunnel check trusts what actually proves the server, its encryption key and our login token, and the new ID is recorded from the first status reply.
What Changed
Before (Astra review pass 6, P1):
verifyManagedOrcadTunnelIdentitycompared the server's status reply against the savedruntimeId.randomUUID()inorca-runtime-runtime-id.ts).orcad_identity_mismatch.After:
markEnvironmentUsed) already existed.Why the real-host Windows scenario (d) worked anyway: orcad was killed and the same desktop reconnected with a new pid. The SSH forward stayed up the whole time, so the identity check never ran again. The desktop's existing transport reconnected over the open forward, and its first status reply recorded the new ID. The check runs only when a tunnel is reopened, which is the case that fails.
Why
~/.orca) across updates and restarts.Linked Issue
Phase 3 review, Astra pass 6 (P1):
verifyManagedOrcadTunnelIdentitycompares the reply against the per-process runtime ID.Visual Proof
N/A. This changes connection behavior, and the tests below cover it.
Testing
orcad-managed-tunnel-identity-restart.test.tsruns real runtime RPC servers with real E2EE:The restart case fails on the current phase3 code with
The endpoint does not match this paired runtime identity.orcad-managed-tunnel-identity.test.tsis updated: the check no longer pins the runtime ID.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)