Repository navigation
Conversation
6 of 9 tasks
…lock exists The idle-exit e2e still read 'fenced' on reconnect: the launch-time wake's lock landed on the host but its connection dropped before the client saw OK, so the wake body never ran and never wrote its owner token, leaving a fence nothing could prove. The token is now claimed before the lock and written by the same command that creates it, and a wake registers itself before any remote step so a reconnected wake waits for it instead of racing it.
OrcaWin
force-pushed
the
OrcaWin/node-rt-p3-wake-fence-atomic
branch
from
October 6, 2026 08:44
41b4e5f to
6a00ad6
Compare
…start comes back fenced
Collaborator
Author
|
Folded into #25834, which carries this commit plus the follow-up wake-token fix. |
2 of 3 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
When Orca restarts a stopped managed server, it first takes a short lock on the host. That lock stops two clients from starting the server at once. If the SSH connection dropped at exactly the moment the lock was created, the host could be left with a lock that nobody could prove was theirs. The next connect then said "An update, rollback or recovery holds this host" and didn't start the server. That lasted until the lock went stale, 20 minutes later. Now the lock records who created it in the same step that creates it, so the client that left it can always clear it.
What Changed
Before:
ssh-orcad-idle-exit.spec.ts:114, on fix(ssh): never offer Move for terminals another Orca desktop or session runs #25815 head e7c9bdad, which already contains fix(ssh): a reconnected transport starts managed orcad itself instead of inheriting a dropped start #25689). fix(orcad): clear a bare stale activation fence instead of asking for Recover; report a restarting update from status (BUG-21) #25802's bare-fence clearing doesn't cover it, because it only clears fences past the 20-minute stale age and only on the update path.After:
Why
Linked Issue
Fixes # (idle-exit e2e failure on #25815; follow-up to #25689)
Visual Proof
N/A. No UI change.
Testing
New wake test: the host creates the lock with the token, but the client sees the connection drop. The next restart clears that fence and starts the server. Against the phase3 restart code, this test fails with "fenced".
New wake test: a restart still taking the lock on a dropped connection is waited for, and the reconnected restart then starts the server.
New command test: the lock-creation command writes the owner token in the same command on POSIX and Windows. It writes nothing extra without an owner.
Existing tests: the other-client tests (no token, someone else's token) still return
fenced.Local: wake, activation, install-lock, retained-fence and remote-command suites pass (22 files, 260 tests).
pnpm tc:nodeand the changed-code quality gate are clean.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
Platforms. On Windows hosts the token goes into the same PowerShell lock script, next to the existing
.ownerfile. Other install-lock callers pass no owner, and their commands are unchanged byte for byte.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)