Repository navigation
fix(orcad): release this app's wake fence once its dropped launch is serving - #35808
Conversation
…serving A wake whose launch reply was lost but whose server did start left its fence held; the next wake saw the slot serving and returned, so deploys saw the fence busy until it aged out. When the slot is proven LIVE, the fence names this app's interrupted-wake token and no journal exists, release it through the owner-guarded release command.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryReleases this app’s interrupted-wake fence when the active slot is
|
ELI5
Sometimes Orca starts the server on a remote or WSL host and the "it started" reply gets lost. The server is running, but the lock Orca took to start it stays held. The next connect sees the server running and moves on, so the lock keeps blocking updates until it times out. Now, once Orca can prove the server is running and the lock is its own with nothing else in progress, it releases the lock.
What Changed
Before: a wake that dropped while launching kept its activation fence, and recorded its token so a later wake could reclaim the fence. If the server had actually started, the next
wakeAfterPriorfound the slot LIVE and returned "serving" before the reclaim branch. The fence stayed held, and deploys reported a busy fence until it went stale by age.After:
forgetSettledInterruptedWake(from fix(wsl): forget an interrupted wake's token once its fence is settled #35759) now knows whether the slot is LIVE. It releases the fence through the existingreleaseOrcadActivationFenceonly when all three of these hold:That release command re-checks the owner token on the host before removing anything.
Every other case behaves as in fix(wsl): forget an interrupted wake's token once its fence is settled #35759:
Why
This is a pre-existing low raised by d1c-review-high during #35690 and #35708 review. A LIVE slot proves the dropped launch finished, so the fence protects nothing. Without a journal there is no activation it could be guarding. Requiring both, plus the token check on the host, means the release only ever removes this app's own finished wake fence.
Flag-off: this is in the shared managed wake, so it applies to SSH and WSL alike, but only after an interrupted wake whose launch did start the server. Every other path is unchanged.
User-risk: low. A release happens only on positive proof of all three conditions, through the owner-guarded command.
Linked Issue
N/A (review follow-up).
Visual Proof
N/A: no UI.
Testing
orcad-managed-wake-one-fence.test.ts:All test files that cover the managed wake pass (including
orcad-managed-wake.test.ts, 16).pnpm tc,pnpm run typecheck:ci, the changed-code quality gate, anti-slop oxlint and oxlint all pass.Review
Agent skill upstream boundary
Notes
No wire change. SSH benefits from the same release after an interrupted wake.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)