[BUG] Output failures panic instead of returning an error #4

Closed
opened 2026-10-17 07:10:57 +02:00 by erikinkinen · 1 comment
Owner

Summary

Boot-tool prints responses and diagnostics with panicking stdio macros. A broken
or full output stream can terminate the command with a panic instead of its
ordinary operational error status.

Reproduction

On Linux, direct boot-tool --help to /dev/full, or close the receiving end of
its stdout pipe. Also cover a response failure after build has published its
outputs, and a failed stderr while reporting a usage error.

Expected and actual behavior

Return operational status one for a failed write or flush, make one best-effort
diagnostic attempt, and preserve any completed file effects without retrying
them. The existing print!, println! and eprint! routes can panic instead.
Successful bytes and established command/file error order should remain stable.

Environment and identity

Boot-tool e2a59008fcd9ddea6e4fe7717b17a2880287d50a, Linux entry in src/main.rs
and command responses in src/cli.rs. No native EriX runtime is involved.

Evidence and prior checks

This report follows a complete source read of the printing routes. The
reproducer above has not been executed for this report. The platform-I/O work
will add controlled short-write, partial-write, flush and diagnostic failures.

Tracking

  • Replace panicking output with checked writes and flushes.
  • Cover partial writes, broken pipes and failed diagnostic output.
  • Preserve successful command bytes and ordered publications, with no replay
    after an output failure.

Related: native build-tool separation.

## Summary Boot-tool prints responses and diagnostics with panicking stdio macros. A broken or full output stream can terminate the command with a panic instead of its ordinary operational error status. ## Reproduction On Linux, direct `boot-tool --help` to `/dev/full`, or close the receiving end of its stdout pipe. Also cover a response failure after `build` has published its outputs, and a failed stderr while reporting a usage error. ## Expected and actual behavior Return operational status one for a failed write or flush, make one best-effort diagnostic attempt, and preserve any completed file effects without retrying them. The existing `print!`, `println!` and `eprint!` routes can panic instead. Successful bytes and established command/file error order should remain stable. ## Environment and identity Boot-tool `e2a59008fcd9ddea6e4fe7717b17a2880287d50a`, Linux entry in `src/main.rs` and command responses in `src/cli.rs`. No native EriX runtime is involved. ## Evidence and prior checks This report follows a complete source read of the printing routes. The reproducer above has not been executed for this report. The platform-I/O work will add controlled short-write, partial-write, flush and diagnostic failures. ## Tracking - [x] Replace panicking output with checked writes and flushes. - [x] Cover partial writes, broken pipes and failed diagnostic output. - [x] Preserve successful command bytes and ordered publications, with no replay after an output failure. Related: [native build-tool separation](https://git.erikinkinen.fi/erix/integration/issues/8).
Author
Owner

Fixed in 3040a592. Checked writes and flushes now return operational failure without panicking or replaying a completed publication. Debug and release tests cover short writes, a partial write followed by BrokenPipe, diagnostic failures and publication order. The original process-level reproducer remains unexecuted; the adapter controls exercise these failure paths directly.

Fixed in [3040a592](https://git.erikinkinen.fi/erix/boot-tool/commit/3040a592e2a8745b0149ade92b5f4204321445b3). Checked writes and flushes now return operational failure without panicking or replaying a completed publication. Debug and release tests cover short writes, a partial write followed by BrokenPipe, diagnostic failures and publication order. The original process-level reproducer remains unexecuted; the adapter controls exercise these failure paths directly.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/boot-tool#4
No description provided.