Repository navigation
fix(orcad): an install lock this desktop's exited process left mid-upload is taken over without the 20-minute wait - #25991
Merged
OrcaWin merged 1 commit intoOct 6, 2026
Conversation
…load is taken over without the 20-minute wait A quit during the bundle upload leaves the version dir's install lock, not the activation fence. The lock now carries this desktop's token, recorded in the held-token store, and is forgotten only once its removal is confirmed. On a later attempt, before each stale check, a POSIX lock whose token belongs to an exited process of this machine and boot, quiet for three minutes, is backdated so the existing stale takeover claims it at once. The fence path now shares the same helper.
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
#25941 let Orca clear a busy marker it had left itself on an SSH host, after a quit in the middle of an update. A real-host test showed a second case it didn't cover. If you quit while Orca is still uploading the new server, the leftover marker is a different lock: the one on the version's install folder. The next launch still waited about 20 minutes for that lock to expire. This PR applies the same "it's our own, and the process that held it is gone" rule to that lock.
What Changed
installOrcadBundletook the version directory's install lock (orcad-<version>/.install-lock), which held only.boot-id.Waiting for install lock …until the lock passed the 20-minute stale window.abandonInstallnow reports whether removal was confirmed, so a removal that a quit cut short keeps the token.acquireInstallLockgained an optionalbeforeStaleCheckhook. The install passes the shared reclaim helper to it.orcad-exited-own-lock.ts), with its state-mutation gate. The install lock passes no gate.Why
chmod, a version-file write and the completion marker;Linked Issue
Fixes # (maintainer: BUG-23 follow-up to #25941, found by the real-host retest)
Visual Proof
N/A: no UI change. This changes how a leftover install lock on an SSH host is handled on the next launch.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Added
orcad-exited-own-install-lock.test.ts, which runs real host commands in a local shell:Added to
orcad-remote-install-termination.test.ts:src/main/ssh: the install, install-lock, versioned-install, deploy and fence test files pass (298).tc:nodeandtypecheck:cli: clean.Changed-code quality gate: passed.
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)