Skip to content

fix(sdk): ignore retryable reads on the supervised owner pipe - #184

Merged
SarthakWade merged 2 commits into
mainfrom
fix/supervised-owner-eagain
Sep 13, 2026
Merged

fix(sdk): ignore retryable reads on the supervised owner pipe#184
SarthakWade merged 2 commits into
mainfrom
fix/supervised-owner-eagain

Conversation

@yashranaway

Copy link
Copy Markdown
Collaborator

What this changes

start --supervised watches the owner pipe and shuts the host down on EOF. The old condition was count >= 0 || errno != EINTR, so a DispatchSource or poll wakeup that returned EAGAIN/EWOULDBLOCK also stopped a live host.

That is the kind of false owner-exit that leaves Chromium with a closed DevTools pipe.

EOF and unexpected data still stop the host. EINTR, EAGAIN, and EWOULDBLOCK do not. The CLI wait loop uses the same helper.

Verification

Protocol test covers EOF, data, EINTR, EAGAIN, EWOULDBLOCK, and EBADF.

Security

No transport, JS, or credential change. Supervised hosts still stop when the owner pipe actually closes.

DispatchSource and poll can wake with EAGAIN. Treating that as owner
exit killed a live supervised host. EOF and real errors still stop it.
macOS 3.14 CI spent 530 ms on a 400 ms budget plus process overhead.

@SarthakWade SarthakWade left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed owner-pipe EOF, unexpected-data, retryable-error, and hard-error paths across both monitor call sites. Protocol, runtime, and Python lifecycle suites pass locally; required CI is green and the branch has no merge conflict.

@SarthakWade
SarthakWade merged commit 478cff7 into main Sep 13, 2026
18 checks passed
@SarthakWade
SarthakWade deleted the fix/supervised-owner-eagain branch September 13, 2026 19:21
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.

2 participants