SIGN IN SIGN UP

add specific error messages/context for failed trace writes (#268)

Closes #252 

- keeps the underlying I/O error in the error chain.
- prints the topmost error, and then any other causes if they exist.
- I wrote custom (but basic) printing logic because the existing options
didn't seem as good:
- alternative display formatting (`{error:#}`) prints all causes on a
single line, separated by colons.
- debug formatting (`{error:?}`) prints a backtrace if one exists. If
you're fine with a backtrace being displayed, then this could be used
instead of the current implementation; let me know if you'd like me to
change it.
- I put the error mapping into a separate function because the same
logic is used in a few places.

Here's what the error now looks like for the case I described in the
original issue:

```
terminal test failed: try using `--output-path` to write traces outside of the temporary directory

Causes:
  - Disk quota exceeded (os error 122)
```

I have run locally all of the checks mentioned in the contributing docs:

```
cargo build --workspace --exclude bombadil-inspect
cargo clippy --workspace --exclude bombadil-inspect --fix --allow-dirty
cargo fmt --all
cargo test
```

<hr>

Tangentially related: have you looked into the viability of storing the
traces as diffs rather than full snapshots at all? That would certainly
reduce the size a lot, and would probably be faster to write.
B
Billy Levin committed
800bd4262cc3cb197c633cb6ff79118204a58181
Parent: 790a00e
Committed by GitHub <noreply@github.com> on 8/21/2026, 8:35:41 AM