Repository navigation
Conversation
added 2 commits
October 5, 2026 23:58
… Recover, and report a restarting update from status BUG-21: a wake cut short leaves a stale fence with no journal. Every update then answered 'Recover it first' while Recover answered 'none'. The fence-hold check now takes such a fence over and drops it, and the update retries once; Recover is asked for only over a journal. The CLI also treats a connection closed by the server's own restart during update or rollback as expected and reports what status shows once the runtime answers.
OrcaWin
force-pushed
the
OrcaWin/node-rt-p3-bug21
branch
from
October 6, 2026 06:59
24589cb to
8f9fce2
Compare
This was referenced Oct 6, 2026
Merged
OrcaWin
marked this pull request as draft
October 6, 2026 07:50
6 of 9 tasks
Collaborator
Author
|
Superseded by #25834, which includes this bare-stale-fence fix together with per-holder fence ownership. |
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
After a host was recovered, every automatic update on connect failed with "An interrupted update or stop holds this host… Recover it first". Yet
orca environment recoversaid there was nothing to recover, and a manual update worked. This is BUG-21. The cause was a leftover per-host lock (the "fence" that stops two runs changing a host at once) with nothing actually interrupted behind it. Orca now clears that kind of leftover lock by itself and goes on with the update. It asks for Recover only when there is a real interrupted run to finish.Separately,
orca environment updatecould fail with "closed the connection before responding", because the server restarts as part of the update. The CLI now waits for the server to answer again and reports what the update left behind.What Changed
Bare stale fence
orcadActivationFenceRefusalanswered "Recover it first" for any fence past its 20-minute stale age.none. That's why the host looked fine afterwards and a manual update succeeded.CLI during a restarting update or rollback
runtime_unavailable.orca environment updateandorca environment rollbacktreat a closed connection as expected. They pollmanagedServer.statusevery 2 s, for up to about 30 s, and report what it shows:managed_server_interrupted(runrecover), when an interrupted run is recorded;managed_server_deferred, with the deferral reason;managed_server_in_progress, if the server never answers again.Why
Linked Issue
BUG-21 (real host r6-upd, test-linux). Internal.
Visual Proof
N/A. No UI changes; the visible change is the update status and CLI messages.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
orcad-activation-fence-hold.test.ts:orcad-remote-deploy.test.ts: an update that meets a stale bare fence clears it and goes on to upload.managed-server.test.ts:managed_server_interrupted.The fence and deploy tests fail without the fix; I checked by restoring the original files. The CLI tests exercise new code.
Ran locally:
pnpm tc:node,pnpm tc:cli, the changed-code gate, oxlint, the format check, and the deploy, rollback, stop and crash-recovery tests.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
SSH execution boundary: a fence is taken over only through the stale or previous-boot takeover, and only when no journal exists under it. A fresh fence still answers busy. Windows uses the same takeover command path.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)