mirror of
https://github.com/openai/codex.git
synced 2026-05-01 03:42:05 +03:00
Fixes #10248.
Replace println! in JSONL streaming with a locked stdout writer.
Treat ErrorKind::BrokenPipe as a graceful shutdown signal instead of panicking.
Add a regression test that closes stdout mid-stream and asserts a clean exit.
Why this looked like a 0.92.0 regression:
The panic-on-EPIPE behavior is older, but 0.92.0 appears to emit additional early --json stdout lines in some configurations.
In particular, 0.92.0 includes a new “under-development features enabled” warning event (c900de271, #9954) that prints to stdout in JSON mode.
More early stdout writes increase the chance of hitting EPIPE when downstream consumers (e.g., head, tee, detached runners) close the pipe mid-run.
This change makes --json streaming robust to stdout closure regardless of when it happens.
11 lines
210 B
Rust
11 lines
210 B
Rust
// Aggregates all former standalone integration tests as modules.
|
|
mod add_dir;
|
|
mod apply_patch;
|
|
mod auth_env;
|
|
mod broken_pipe;
|
|
mod originator;
|
|
mod output_schema;
|
|
mod resume;
|
|
mod sandbox;
|
|
mod server_error_exit;
|