Skip to content

reliability: eprintln! panic on failed stderr write #258

Description

@dean0x

Location: crates/mds-cli/src/output.rs:513

What: eprintln! panics with 'failed printing to stderr' if the write fails (e.g., EPIPE when stdout is closed).

Why deferred: This is a pre-existing behavior pattern — every eprintln! site on main already has this property. Not a regression introduced by PR #253. However, it's worth documenting and potentially hardening in a dedicated pass.

Source review: .devflow/docs/reviews/fix-esc-injection-176/2026-07-25_1625 (reliability-6)

Acceptance Criteria:

  • Audit all eprintln! sites in the crate
  • Determine if EPIPE should be caught and silently ignored (common pattern)
  • Consider using writeln! with explicit error handling where appropriate
  • Add tests for stderr write failures if adding error handling

Note: This affects the watch command most directly. The Linux BrokenPipe stdin-test trap is a known pattern; verify behavior before adding error handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI commands and options

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions