Audit finding from #300 (commit 679f9fe)
Severity: medium
Category: tech debt / convention
File: crates/network/Cargo.toml, crates/storage/Cargo.toml, crates/replay/Cargo.toml, crates/transport/Cargo.toml, crates/worker/Cargo.toml; CLAUDE.md "Code Conventions"
Obvious fix: no (requires defining the error enums)
Description
CLAUDE.md explicitly mandates thiserror in libraries and anyhow only in application/binary code. Yet network, storage, replay, transport, and worker (all library or library+binary crates) depend on anyhow. This is a documented convention mismatch, not a stylistic preference.
Impact / Threat
Maintenance — convention erodes; new contributors will copy whichever dep is already in the Cargo.toml.
Suggested fix
Remove the anyhow dep from the library targets (push it down to */main.rs only via a separate binary target if needed) and replace public APIs with thiserror enums.
Verify
grep -l '^anyhow' crates/*/Cargo.toml
Audit finding from #300 (commit 679f9fe)
Severity: medium
Category: tech debt / convention
File: crates/network/Cargo.toml, crates/storage/Cargo.toml, crates/replay/Cargo.toml, crates/transport/Cargo.toml, crates/worker/Cargo.toml; CLAUDE.md "Code Conventions"
Obvious fix: no (requires defining the error enums)
Description
CLAUDE.md explicitly mandates
thiserrorin libraries andanyhowonly in application/binary code. Yetnetwork,storage,replay,transport, andworker(all library or library+binary crates) depend onanyhow. This is a documented convention mismatch, not a stylistic preference.Impact / Threat
Maintenance — convention erodes; new contributors will copy whichever dep is already in the Cargo.toml.
Suggested fix
Remove the
anyhowdep from the library targets (push it down to*/main.rsonly via a separate binary target if needed) and replace public APIs withthiserrorenums.Verify