Repository navigation
test(claude-cli): scope the async stdout-pipe probes to POSIX and pin the Windows outcome - #8666
Conversation
… the Windows outcome windows 5/14 of dev batch 43369456647 failed four cases of the #8484 stdout flush regression. They measure a stdout pipe write the runtime still holds, which only exists where pipe writes are asynchronous. Node documents process.stdout pipe writes as synchronous on Windows, and the batch shows Bun doing the same: the observe child never returned from its 3 MB write with no reader (60 s timeouts, marks=[]), the pre-fix early exit delivered the frames without a protocol error, and the parent's large stdin write was accepted at once. Those four cases now run where stdout pipes are asynchronous. Windows gets a case that pins the opposite outcome: the pre-fix early exit still delivers all three frames and the whole replay through the production reader. The production default-path case and the remaining cases run everywhere, unchanged.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
… stdin case on its own premise Review of #8666. The reader-release case deadlocked on Windows only because it waited for the replay-returned mark before starting the reader; on a synchronous pipe the write returns only once read. It now runs everywhere, starting the reader first where stdout pipes are synchronous, and keeps the accepted===false check where they are asynchronous. The no-read case is about the parent's stdin write, not stdout, so it gets its own gate (PARENT_STDIN_WRITE_HELD) with the Windows evidence: the 3 MB write returned true at once there, and the effect of a later kill was not observed, so no Windows expectation is invented. The early-exit EPIPE case still runs everywhere.
|
Maintainer judgment (dev integration, MAINTAINERS.md maintainer-integration exception): merging without a second maintainer approval, as part of the DEV-RED repair for dev batch run 43369456647 (windows 5/14).
|
Summary
windows 5/14 of dev batch run 43369456647 failed four cases of
tests/providers/claude-cli-fixture-stdout-flush.test.ts, the regression for the fixture flush fix in #8484:marks=[].CodingAgentProtocolError.true.These cases measure a stdout pipe write that the runtime is still holding when the process exits, which is the defect #8484 fixed. That state exists only where pipe writes are asynchronous. Node documents
process.stdoutpipe writes as asynchronous on POSIX and synchronous on Windows, and the Windows log shows Bun doing the same: the observe child never returned from its multi-megabyte write while nothing read stdout. So on Windows the guarded defect cannot occur, and these assertions encode POSIX pipe semantics. The production default-path case passed on Windows.ASYNC_STDOUT_PIPES).replay-returnedbefore starting the reader. On Windows it now starts the reader first; theaccepted === falsecheck stays limited to asynchronous pipes, and the callback, frames and exit-order assertions are unchanged.PARENT_STDIN_WRITE_HELD. On Windows the 3 MB write returnedtrueat once and the effect of a later kill was not observed, so no Windows expectation is invented. The early-exit EPIPE case still runs everywhere and passed on Windows.The task brief said "no skip". This restricts cases whose premise doesn't exist on one platform and adds a positive assertion for that platform instead, so I'm calling it out for an explicit decision.
Verification
bun test tests/providers/claude-cli-fixture-stdout-flush.test.tson Linux: 8 pass, 1 skip (the Windows-only case), 0 fail.process.platformreported aswin32on Linux, the selection flips: the stdout-pipe cases and the no-read case are skipped, the reader-release case passes with its reader started first, and the Windows case runs. It fails there only because Linux pipes really are asynchronous, so the Windows case itself is evidenced by the CI log, not run locally.bun run typecheck: exit 0.Checklist
Summary by CodeRabbit