Phase 1 delivers the complete durability and storage layer:
- WAL with crash recovery: Append-only journal with BLAKE3 checksums,
fsync guarantees, and proper seek-to-EOF on reopen
- Storage engine: sled-backed KVStore with scan_prefix for range queries
- Content-addressed storage: H:{hash}, V:{hash}, E:{hash} key patterns
- Ingestor: Background worker tailing WAL, writing to KV with 8-byte
aligned record headers for rkyv zero-copy deserialization
- Comprehensive tests: 31 tests covering crash recovery, round-trips,
and multi-cycle durability
New crates: stemedb-wal, stemedb-storage, stemedb-ingest
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
2.0 KiB
Markdown
54 lines
2.0 KiB
Markdown
# lint-level-warn-to-deny
|
|
|
|
## AUDIT (2026-01-31)
|
|
|
|
**Pattern**: Workspace clippy lints set to "warn" instead of "deny"
|
|
|
|
**Problem**:
|
|
- `unwrap_used = "warn"` - New code can introduce unwrap() without CI failure
|
|
- `expect_used = "warn"` - New code can introduce expect() without CI failure
|
|
- `panic = "warn"` - New code can introduce panic!() without CI failure
|
|
- `missing_docs = "warn"` (rust lint) - separate concern, keeping at warn is OK
|
|
|
|
**Risk**: Drift will happen. The CLAUDE.md says "No Unwrap" but there's no enforcement.
|
|
|
|
**Current State**:
|
|
- `Cargo.toml` lines 21-23 have clippy lints at warn level
|
|
- `clippy.toml` correctly allows these in tests (`allow-unwrap-in-tests = true`)
|
|
- `Makefile` runs clippy with `-D warnings` which turns warnings into errors
|
|
- BUT: developers running `cargo clippy` directly won't see errors
|
|
|
|
**Fix Strategy**:
|
|
1. Change clippy lints from "warn" to "deny" in Cargo.toml
|
|
2. This enforces at the workspace level regardless of how clippy is invoked
|
|
3. Combined with clippy.toml's test exceptions, tests remain unaffected
|
|
|
|
## FIX
|
|
|
|
- [x] Cargo.toml:21-23 - Changed unwrap_used, expect_used, panic from "warn" to "deny"
|
|
- Verified: `cargo clippy --workspace` passes
|
|
- Verified: `cargo test --workspace` passes (test exceptions via clippy.toml work)
|
|
|
|
## ENFORCE
|
|
|
|
- [x] CLAUDE.md line 29 - Updated "No Unwrap" rule to mention enforcement mechanism
|
|
|
|
## DOCUMENT
|
|
|
|
- [x] .claude/guides/local/quality-checks.md - Added "Enforced Lints" section documenting:
|
|
- Which lints are at deny level
|
|
- Why tests are exempt (clippy.toml)
|
|
- How to add new enforced lints
|
|
|
|
## COMPLETE (2026-01-31)
|
|
|
|
**Before:** 4 lints at "warn" level (unwrap_used, expect_used, panic, missing_docs)
|
|
**After:** 3 lints at "deny" level, 1 at "warn" (missing_docs - intentional)
|
|
|
|
**Enforcement added:**
|
|
- Workspace Cargo.toml now fails on unwrap/expect/panic outside tests
|
|
- CLAUDE.md documents enforcement
|
|
- quality-checks.md explains the system
|
|
|
|
**No drift possible:** Changes are baked into workspace config, not just docs.
|