Repository navigation
fix(orcad): a launch reads readiness at least once; fake hosts match the capture's tar flag, not any -cf - #25918
Merged
OrcaWin merged 1 commit intoOct 6, 2026
Conversation
…the capture's tar flag, not any -cf A random fence token contains `-cf` about 1 time in 125, and the fake hosts read any command containing it as a snapshot capture, so a rollback's restore answered CAPTURED and the rollback never launched. Separately, a client descheduled between computing the readiness deadline and checking it skipped every read and failed a ready launch.
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
One orcad crash-recovery test failed now and then in CI: a rollback "never started orcad". It had two causes, and both are fixed here. One was in the test's fake host. The other was a small real timing gap in how the client waits for a launched server to be ready.
What Changed
-cf. The fake hosts used in the orcad tests treated any command containing-cfas a snapshot capture. So when a token happened to contain it, the rollback's restore step was answered as a capture (CAPTURED). The rollback then reported "the pre-activation snapshot could not be restored" and never launched. That is exactly the CI failure.tar -C <dir> -cfform, through one shared helper (orcad-snapshot-capture-command.ts) used by all four fakes.-cfand proves the rollback still restores and launches. It fails on the old fake and passes on the new one.launchOrcadAndAwaitReadinessset its deadline and then loopedwhile (Date.now() < deadline). If the client process was descheduled between those two lines for longer than the timeout, it never read readiness once. A ready launch was then reported as not ready.Why
The CI failure was nondeterministic, so it needed a cause, not retries. A sweep of 9,000 random fence tokens across the update, first-activation and rollback scenarios found no other token-dependent misreads once the capture match was fixed. The at-least-once read is the smallest change that removes the scheduling gap without changing any timeout. On a real host a zero-second read is already supported, because the wait command clamps it to a single check.
Linked Issue
Fixes # (maintainer: flaky phase3 landing check, no issue)
Visual Proof
N/A: no UI change; this affects the remote launch readiness loop and test fakes.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Ran the crash-recovery, rollback, deploy, state-mutation-timeout, managed-wake and decommission test files 50 times: 5 runs in parallel at a time, alongside 8 CPU-saturating processes. All 50 were green (91 tests each). With only the fake-host fix, 4 of 50 failed.
src/main/ssh: 4011 passed.pnpm tc:node: clean.Changed-code quality gate: passed.
Ran on macOS. The readiness loop is shared by POSIX and Windows hosts, and the fix applies to both.
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: the readiness change only adds one guaranteed read. It sends no new commands and no wire change.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)