Repository navigation
test(ssh): wait for the busy relay's child before probing it - #25916
Merged
OrcaWin merged 1 commit intoOct 6, 2026
Merged
Conversation
The fake relay's spawn is not visible to pgrep at READY on Linux under Bun, so the probe could count zero children. The sibling cases already wait.
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 test checks that Orca won't treat a relay as empty while it still has a running child process. The test asked "how many children?" before the child was reliably visible, so it sometimes got zero and failed. It now waits until the child shows up, just like the neighbouring tests already do.
What Changed
Before:
refuses to call a relay with a live child an empty huskprobed the relay right after it reported ready. On the Linux CI runners, where unit tests run under Bun, the child it had just spawned was sometimes not yet listed bypgrep, sochildCountwas 0 and the test failed. This failed both attempts of run 37485014895 on #24863.After: the test waits for the probe to report one child, using the existing
waitForChildCounthelper (it polls for up to about 5 seconds), and then makes the same assertions. If the child never shows up, the assertion still fails. Production code is unchanged.Why
The probe itself is right to report zero children when the process table shows none. Waiting in the probe would hide real hosts' state, so the race belongs in the test. Phase 3 changed none of the probe's code (
ssh-relay-endpoint-incumbent.ts,ssh-relay-endpoint-takeover.ts,relay-daemon-service-children.tsand the lsof probe are identical to main). Three sibling cases in the same file already go throughwaitForChildCountfor this reason. Its own comment says the probe can race the relay's children. This was the one forked-child case that didn't wait.Linked Issue
Fixes #
Visual Proof
N/A: test-only change, with no UI or behaviour change.
Testing
50 runs under load: in progress, results will be added here.
AI Disclosure
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
The test is POSIX-only and already skipped on Windows. Production behaviour is unchanged on SSH hosts and on every platform.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)