Problem
render_json maps serde_json::to_writer_pretty failures with io::Error::other, which converts a real BrokenPipe into ErrorKind::Other. Commands that silence EPIPE cannot recognize the failure.
A large JSON response piped to an early-exiting consumer demonstrates it:
set -o pipefail
burn search needle --limit 3000 --json | head -2
The pipeline is silent but exits 2; equivalent human output exits 0. Small payloads can fit the pipe buffer and hide the defect.
Expected behavior
render_json preserves the underlying I/O error kind so shared BrokenPipe handling exits quietly with status 0 for every JSON-producing command. serde_json::Error::io_error_kind() can be used to reconstruct the I/O error without a command-specific source-chain workaround.
Scope
Fix the shared helper in crates/relayburn-cli/src/render/json.rs and add a regression covering a payload large enough to force an early pipe close.
Problem
render_jsonmapsserde_json::to_writer_prettyfailures withio::Error::other, which converts a realBrokenPipeintoErrorKind::Other. Commands that silence EPIPE cannot recognize the failure.A large JSON response piped to an early-exiting consumer demonstrates it:
The pipeline is silent but exits 2; equivalent human output exits 0. Small payloads can fit the pipe buffer and hide the defect.
Expected behavior
render_jsonpreserves the underlying I/O error kind so shared BrokenPipe handling exits quietly with status 0 for every JSON-producing command.serde_json::Error::io_error_kind()can be used to reconstruct the I/O error without a command-specific source-chain workaround.Scope
Fix the shared helper in
crates/relayburn-cli/src/render/json.rsand add a regression covering a payload large enough to force an early pipe close.