Repository navigation
Reconnect managed servers through the current SSH connection - #26645
Merged
Merged
Conversation
This was referenced Oct 8, 2026
OrcaWin
force-pushed
the
nwparker/managed-serving-live-process
branch
from
October 9, 2026 02:30
d858417 to
d8e1cf2
Compare
OrcaWin
force-pushed
the
nwparker/managed-start-reconnect-fence
branch
from
October 9, 2026 02:33
ad088c9 to
ebf6a29
Compare
OrcaWin
changed the base branch from
nwparker/managed-serving-live-process
to
main
October 9, 2026 02:33
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
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 |
9 tasks done
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
Reconnecting while the server is starting can keep waiting for a check on the connection you just closed. After three minutes, the canceled check becomes the answer for the new connection. Now cancellation ends that check and the new connection runs its own.
What Changed
The readiness wait stops retrying a locally canceled SSH operation and rejects a readiness reply received after cancellation. Ordinary failed reads still retry.
After waiting for server identity or serving checks, tunnel setup verifies that it still owns the SSH connection. A retired setup removes its own forward and returns the existing superseded result. The existing once-only retry then lets a joining reconnect build its current tunnel, without removing a replacement's forward.
CI routes readiness-source changes into the idle-exit end-to-end lane.
Why
The reconnect already knows the previous connection was retired. Retrying its readiness read cannot recover that connection. Reusing the existing ownership checks, exact-forward cleanup and once-only joined retry keeps recovery in one place. A live process stays alive; startup may truthfully remain unverifiable until it answers.
Visual Proof
N/A — backend connection-result and startup-wait correction, with no renderer changes. Actual hidden Electron / owned Linux SSH before-and-after evidence:
providerEpoch: nullandSSH operation was cancelled; original PID 564 remains live andterminal.listsucceeds independently.Testing
ORCA_BACKGROUND_LAUNCH=1.264 tests / 24 files pass, including activation, rollback, recovery, host fences and connection decisions. Full
pnpm tc,pnpm lint, changed-code quality, fresh E2E build and all four runtime cases pass.After an E2E build, set
ORCA_BACKGROUND_LAUNCH=1,SKIP_BUILD=1,ORCA_E2E_SSH_DOCKER=1,ORCA_E2E_ORCAD_CONVERT_HOST=dockerandORCA_E2E_ORCAD_CONVERT_TEMPLATEto an appropriate Linux server template. Runpnpm test:e2e --project=electron-headless tests/e2e/ssh-orcad-idle-exit.spec.ts --workers=1.Review
Now based directly on main and independent of #26637. The Docker cold-start spec and idle-stop control changes depended on #26637's helpers and serving semantics, so they were dropped here; the unit regressions (nine fail without the fix) cover the change. Product changes are limited to the existing readiness wait and tunnel checks. Activation and rollback strip the cancel signal before launching, so the post-read cancel check cannot reject a ready update candidate.
Agent skill upstream boundary
Notes
No server build or remote wire change. Cancellation says nothing about host process death; the host keeps its existing live / unverifiable / exited rules. Existing authentication failures do not gain another retry. Actual runtime coverage is macOS / Linux SSH; Windows runtime was not exercised. PID capture, SIGSTOP/SIGCONT and cleanup are confined to disposable Docker hosts.
Checklist