Repository navigation
fix(orcad): a failed readiness read no longer kills a healthy candidate; log unsettled activations (BUG-17a) - #25701
Merged
OrcaWin merged 2 commits intoOct 5, 2026
Conversation
…nch, and log every unsettled activation BUG-17: the candidate went ready and the client SIGTERMed it ~1 s later through its reject path, yet that readiness passes the gate, so the launch itself failed: one readiness-wait exec that errored failed the launch outright. Retry such reads until the readiness deadline; an unconfirmed termination still fails at once. The update's outcome never reached the app log, so every update or rollback that does not go through now logs its code and reason.
Contributor
|
This run was cancelled 🛑 The workflow was cancelled before completion. Please check the link below for details. |
On a loaded host each poll's reads outlasted its sleep, so the step-counted loop ran past the client's 30 s exec timeout. That timeout failed the launch, the reject path SIGTERMed a candidate still starting, and orcad, which defers a stop until startup completes, published readiness and then exited (BUG-17).
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
An update to a managed Orca server could start the new version successfully, then shut it down one second later. When that happened, the host was left serving nothing (BUG-17). This PR stops a failed status check from being treated as a failed start, and it records in the app log why any update or rollback did not go through, so the next case can be diagnosed from the log alone.
What Changed
What the hosts show (read-only, r6-idle / r6-upd)
snapshot-captured. The old version was stopped at 13:36:41 and the new one launched at 13:36:46.parseOrcadReadinessOutputandevaluateOrcadActivation, that readiness line givesactivate.launchError: one of the readiness-wait SSH commands threw an error that wasn't an unconfirmed termination, and the activation treated that as "the candidate failed while starting".Before / after
launchOrcadAndAwaitReadinessfailed the launch on the first readiness-read command that errored (for example a refused SSH channel or a timed-out command), however healthy the started process was. The activation then stopped the new version and refused to restart the old one over the state it had changed.Outcome logging
deployOrcadandrollbackOrcadnow log every outcome that isn't a success, with its code and reason, and every failure that throws:[orcad] update to <v> installed-not-activated (<code>): <reason>[orcad] rollback to <v> failed: <error>Why
The readiness read that failed (follow-up commit). The hosts' sshd logs show no refused channels between 13:36 and 13:38, so the failing read was a client-side timeout:
connect_to 127.0.0.1 port 6768: failed) come from the client's tunnel and serving checks retrying while nothing listened. The activation never dials that port, and a failed forward dial closes only its own socket.The wait now ends on a wall-clock deadline (
date +%s). The Windows host script's wait already did. Together with the read retry, a slow host can no longer fail a healthy launch.Linked Issue
BUG-17 part (a) (real-host, test-linux). Part (b), where recover was stuck pending, is in #25698.
Visual Proof
N/A. No UI changes.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
orcad-remote-readiness-wait.test.tsruns the real POSIX wait command in a shell where everywctakes 0.5 s. It must end near its 2 s deadline. The old counted loop takes about 10 s, and this test fails against it.orcad-remote-runtime-control.test.ts: a readiness read that is refused once, followed by a ready line, now yieldsready. This fails without the fix, which I checked by restoring the original file. An unconfirmed termination still fails at once.orcad-activation-outcome-log.test.ts: an outcome that isn't a success logs its code and reason; a throw is logged and re-thrown; a success logs nothing.Ran locally:
pnpm tc:node, the changed-code gate, oxlint and the format check pass.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: retrying a read never decides that a process is live or has exited. An unconfirmed termination still stops the run, and the fence is kept. Windows uses the same loop through its host-script read operation.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)