# lint-enforcement-upgrade ## AUDIT (2026-01-31) ### Original Concern Error handling audit flagged expect()/unwrap() in: - `crates/stemedb-core/src/lib.rs` (9 occurrences) - `crates/stemedb-storage/src/sled_backend.rs` (5 occurrences) - `crates/stemedb-wal/src/durability.rs` (23 occurrences) - `crates/stemedb-wal/src/format.rs` (5 occurrences) ### Analysis **All 42 occurrences are in `#[cfg(test)]` blocks.** The `clippy.toml` correctly configures: ```toml allow-unwrap-in-tests = true allow-expect-in-tests = true allow-panic-in-tests = true ``` **Production code is clean.** No actual error handling issue. ### Real Issue Found `Cargo.toml` workspace lints are at `warn` level: ```toml [workspace.lints.clippy] unwrap_used = "warn" expect_used = "warn" panic = "warn" ``` This means: 1. CI currently passes even with violations 2. New production code could introduce expect()/unwrap() 3. Protection will drift ### Solution Upgrade to `deny` to fail CI on violations. The clippy.toml test exceptions will still apply. --- ## FIX - [x] Cargo.toml - upgraded lints from warn to deny (2026-01-31) - `unwrap_used = "deny"` - `expect_used = "deny"` - `panic = "deny"` ## VERIFY - [x] `cargo clippy --workspace -- -D warnings` - PASSED - [x] `cargo test --workspace` - PASSED (11 tests) ## ENFORCE (2026-01-31) - [x] CLAUDE.md - enhanced "No Unwrap" rule to mention enforcement mechanism ## DOCUMENT (2026-01-31) - [x] .claude/guides/local/quality-checks.md - added "Enforced Lints" section explaining: - Which lints are at deny level - Why tests are exempt - How to add new enforced lints ## COMPLETE All phases executed successfully.