Skip to content

test(util): the fake bridge waits through the reads a just-started pid cannot answer (#867) - #909

Merged
akleizor merged 1 commit into
mainfrom
hive/867-land
Nov 25, 2026
Merged

akleizor merged 1 commit into
mainfrom
hive/867-land

Conversation

@akleizor

Copy link
Copy Markdown
Owner

Closes #867

TestTwoSessionsShareOneBridge flaked under gate -j5 load where bridgeProc
read the fresh fake bridge exactly once. The read of a just-started pid
answers two transients: #409's doubt — the kernel read cannot answer for
a live pid — and the fork/exec publish window, where the child is forked
but has not exec'd yet and the read answers certainly-not-ours with the
argv it still carries from the parent (caught under load: pid alive,
cmdline still the parent test binary's). A one-shot check obeys either
answer; production treats both as alive and retries, and never reads a
bridge it just started inside that window. bridgeProc now waits through
both under a 2s deadline and fails only when certainly-not-ours outlasts
it; doubt that never lifts stays not fatal, as #409 ruled. Production is
untouched: answers()' doubt-as-alive stays as it landed. The regression
test drives both answers through the argvOfPID seam — it fails against
main's one-shot — and lands in make gate, so a rewrite back to one shot
fails the gate.

Closes #867

Co-Authored-By: Claude Code noreply@anthropic.com

…d cannot answer (#867)

TestTwoSessionsShareOneBridge flaked under gate -j5 load where bridgeProc
read the fresh fake bridge exactly once. The read of a just-started pid
answers two transients: #409's doubt — the kernel read cannot answer for
a live pid — and the fork/exec publish window, where the child is forked
but has not exec'd yet and the read answers certainly-not-ours with the
argv it still carries from the parent (caught under load: pid alive,
cmdline still the parent test binary's). A one-shot check obeys either
answer; production treats both as alive and retries, and never reads a
bridge it just started inside that window. bridgeProc now waits through
both under a 2s deadline and fails only when certainly-not-ours outlasts
it; doubt that never lifts stays not fatal, as #409 ruled. Production is
untouched: answers()' doubt-as-alive stays as it landed. The regression
test drives both answers through the argvOfPID seam — it fails against
main's one-shot — and lands in make gate, so a rewrite back to one shot
fails the gate.

Closes #867

Co-Authored-By: Claude Code <noreply@anthropic.com>
@akleizor
akleizor merged commit 531380a into main Nov 25, 2026
9 checks passed
@akleizor
akleizor deleted the hive/867-land branch November 25, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: TestTwoSessionsShareOneBridge flakes under gate load: bridgeProc treats the ownership check's doubt as fatal, where production retries it

1 participant