Files
codex/codex-rs/exec/tests/suite/mod.rs
Eric Traut e4aa2b2c3b Handle BrokenPipe in codex exec --json stdout streaming
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.
2026-01-30 12:38:12 -08:00

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;