Repository navigation
fix(ssh): a live run's journal reads busy, a wake releases only its own fence, a cancelled re-check never reports connected - #25470
Merged
Conversation
…wn fence, a cancelled re-check never reports connected - A held fence asks for Recover only when its lock is stale or a journal has no fence over it; a journal under a fresh fence is a run still working and reads orcad_activation_fence_busy. - A wake writes an owner token into the fence it takes and later releases only a fence carrying that token; observing the fence gone forgets it. - The connect re-checks ownership after the relay-terminal re-check, and the re-check itself neither records a decision nor retires leases for a cancelled attempt.
7 of 9 tasks
…ilds its own The launch-time restore's tunnel run connects over SSH; a disconnect then cancels that connect. An explicit connect that had joined the run inherited its SshConnectAttemptCancelledError and failed (seen as the idle-exit e2e's 'connect threw: ... cancelled'). A joiner now builds once anew after any end of the joined run except an auth failure, which it shares rather than prompt again.
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — full PR reviewed in this run (no prior Pullfrog review to delta against); the head commit adds the tunnel-joiner retry on top of the three fixes in 8c6ece1.
- Classified a held activation fence as busy unless the install lock is stale or a journal is left with no fence over it, so a healthy update or stop from another client no longer reads as recovery-required.
- Gave each wake an owner token inside the fence's lock directory and release only the fence carrying that exact token, so a fence a later run took after the original was cleared is never dropped.
- Threaded
isCurrentthrough the relay-terminal re-check so a cancelled connect neither records a live relay decision nor retires leases, and re-checked session ownership indoConnectafter the re-check returns. - Made a tunnel caller that joined a run a disconnect cancelled build its own once, while sharing an auth failure instead of prompting again.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
7 of 9 tasks
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
This fixes three small correctness problems in the last round of SSH fixes:
What Changed
A live run's journal is busy, not "recovery required".
orcad_activation_fence_busy, which is retried, unless the lock is past its stale age or a journal exists with no fence over it. Deploy's pre-upload shortcut uses the same classifier, so a fresh fence returns busy.A wake releases only the fence it left.
A cancelled connect never reports connected after the relay-terminal re-check.
doConnectchecks session ownership afterrefineRelayTerminalDecision, the same way it does after every other await. Inside the re-check, an attempt that is no longer current neither records a relay decision nor retires leases.A caller that joined a cancelled tunnel run builds its own. This is the
ssh-orcad-idle-exitrace.Why
Linked Issue
N/A (Phase 3 delta review)
Visual Proof
N/A. There is no UI change.
Testing
pnpm tc:nodepasses.pnpm test src/main/ssh src/main/ipcpasses: 800 files, 8897 tests.The changed-code gate passes.
New tests:
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
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)