# stale-allow-directives

## AUDIT (2026-02-02)

Pattern: `#[allow(dead_code)]` and `#[allow(unused_imports)]` directives
Found: 18 instances in 9 files

### Analysis

| File | Line | Directive | Status |
|------|------|-----------|--------|
| durability.rs | 81 | dead_code | ✅ Reserved `timeout` field |
| durability.rs | 187 | clippy::incompatible_msrv | ✅ MSRV workaround |
| epoch_aware/mod.rs | 212 | dead_code | ✅ Legacy fallback |
| key_codec/mod.rs | 271 | dead_code | ✅ Future VI:meta key |
| key_codec/mod.rs | 279 | dead_code | ✅ Future VI:hot_cursor key |
| key_codec/mod.rs | 287 | dead_code | ✅ Future VI:cold_version key |
| key_codec/mod.rs | 295 | dead_code | ✅ Future VH:meta key |
| quota_store/mod.rs | 37 | dead_code | ✅ Const for reference |
| vector_index/persistent/index.rs | 22 | dead_code | ✅ ColdIndex.metadata field |
| vector_index/persistent/index.rs | 27 | dead_code | ✅ ColdIndex.cutoff_timestamp field |
| ingest/worker/tests/mod.rs | 37 | dead_code | ✅ Test helper |
| ingest/worker/tests/mod.rs | 43 | dead_code | ✅ Test helper |
| ingest/worker/tests/mod.rs | 67 | dead_code | ✅ Test helper |
| ingest/worker/tests/mod.rs | 72 | dead_code | ✅ Test helper |
| middleware/meter.rs | 146 | dead_code | ✅ Test helper w/ future use |
| handlers/source.rs | 192 | dead_code | ✅ RAII TempDir |
| tests/common/mod.rs | 79 | dead_code | ✅ Test helper |
| engine/mod.rs | 11 | unused_imports | ✅ Trait needed for methods |

### Findings

**No remediation needed.** All 18 directives are legitimate:

1. **Future-reserved code (6)**: Well-documented keys/fields for planned features
2. **Test helpers (5)**: Functions only called by test modules
3. **Internal fields (3)**: Struct fields for RAII or internal state
4. **Backward compatibility (2)**: Legacy methods kept for migration
5. **Workarounds (2)**: MSRV compat and implicit trait imports

### Quality Assessment

The codebase follows good practices:
- Every `#[allow(dead_code)]` has a comment explaining WHY
- Reserved code is grouped and documented (e.g., "Vector Index Persistence" section)
- Test helpers are properly scoped to test modules
- No truly dead code is being suppressed

## COMPLETE (2026-02-02)

Task closed - no fixes required. All directives are intentional and documented.
