Development Workflow & Conventions

12.1 Error Handling Patterns

  • Use anyhow::Context at CLI/UI boundaries so errors report the path or operation that failed.
  • Prefer typed errors in core crates (IoPipelineError, EditError, etc.) and convert to anyhow only at edges.
  • Treat optional parse fields as Option<T> and log/record warnings rather than panicking on missing data.
  • For malformed input, return ParseError { path, message } with enough detail to debug fixtures.
  • Avoid unwrap/expect in non-test code; use ?, ok_or_else, or a documented fallback.
  • Clippy enforces unwrap_used/expect_used at the workspace level; test crates and examples may opt out with #![allow(clippy::unwrap_used, clippy::expect_used)].