Move STDIO input reads off the cooperative executor#184
Conversation
FileHandle.AsyncBytes can block the sole cooperative worker in low-capacity CI runners, starving the task that writes and closes adapter stdin. Route input through a bounded DispatchIO channel while preserving EOF drain, read-error abort, and deterministic shutdown contracts.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64ad7593f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Close only the duplicated input descriptor during channel cleanup and verify that the caller-owned FileHandle remains open. Bound the failing-input test's send observation so regressions fail instead of hanging CI.
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Purpose
Fix the main-branch CI hang observed in run 29402610133.
The apparent progress-test stall was buffered output. Under a single cooperative worker,
FileHandle.AsyncBytesperformed a blocking stdin read and starved the task responsible for writing and closing the adapter pipe.Changes
DispatchIOchannelFileHandleTesting
./scripts/check.shLIBDISPATCH_COOPERATIVE_POOL_STRICT=1(14 focused tests)codex-reviewagainst pinnedmain@d2b7e76d: no findings