|
| 1 | +# ToadStool S206 — Lint Evolution + Dep Hygiene + Feature Cleanup |
| 2 | + |
| 3 | +**Date**: April 28, 2026 |
| 4 | +**Session**: S206 |
| 5 | +**Scope**: Codebase-wide lint evolution, dependency unification, stale feature removal, mock default policy |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Changes |
| 10 | + |
| 11 | +### 1. Lint Evolution — All `#[allow]` with `reason =` |
| 12 | + |
| 13 | +All ~40 production bare `#[allow(...)]` evolved to `#[allow(..., reason = "...")]`: |
| 14 | + |
| 15 | +- **17 `unsafe_code` modules**: hw-safe (10: device_mmap, volatile_mmio, locked_memory, huge_page, vfio_dma, safe_mmap, vfio_setup, exclusive_ptr, aligned_alloc, contiguous), GPU (4: backend, glowplug, buffer/mod, buffer/threading), display (v4l2/ioctl), hw-learn (nouveau_drm), plugin (ffi_loader) |
| 16 | +- **~23 clippy/deprecated/async-fn-in-trait**: auto_config, cli (lib + lifecycle_ops + 3 template modules), client, distributed (lib + discovery/client), integration (primals, protocols, security), management (analytics, monitoring, performance), neuromorphic (akida-driver, reservoir-research lib + readout, cross-substrate-validation lib + main), runtime (adaptive, secure_enclave, wasm), security/policies |
| 17 | + |
| 18 | +### 2. Dependency Unification |
| 19 | + |
| 20 | +Added to `[workspace.dependencies]` and unified across 20+ crate Cargo.toml files: |
| 21 | + |
| 22 | +| Dep | Crates Unified | |
| 23 | +|-----|---------------| |
| 24 | +| `humantime-serde` | common, toadstool, distributed (3) | |
| 25 | +| `rand` | distributed, reservoir-research, testing (3) | |
| 26 | +| `tokio-util` | distributed, client, server (3) | |
| 27 | +| `temp-env` | 13 crates (all dev-deps) | |
| 28 | + |
| 29 | +### 3. Stale Feature Removal |
| 30 | + |
| 31 | +**GPU crate** (`toadstool-runtime-gpu`): |
| 32 | +- Removed features: `spirv`, `jit`, `testing` (none referenced in `cfg` source) |
| 33 | +- Removed optional deps: `spirv`, `cranelift-jit`, `wasmtime` |
| 34 | + |
| 35 | +**Testing crate** (`toadstool-testing`): |
| 36 | +- Removed features: `integration-tests`, `benchmarks` (none referenced in source) |
| 37 | +- Removed optional dep: `wiremock` |
| 38 | + |
| 39 | +### 4. Mock Default Policy |
| 40 | + |
| 41 | +- `test-mocks` removed from `toadstool` core `default` features |
| 42 | +- Production builds no longer compile `InMemoryAuthBackend` / `InMemoryAgentBackend` |
| 43 | +- `toadstool-testing` explicitly enables via `features = ["test-mocks"]` |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## Files Changed (60) |
| 48 | + |
| 49 | +- `Cargo.toml` (root): added `humantime-serde`, `temp-env` to workspace deps |
| 50 | +- 20+ `crates/*/Cargo.toml`: unified dep versions |
| 51 | +- 17 `unsafe_code` module files: `reason =` added |
| 52 | +- ~23 clippy/deprecated allow files: `reason =` added |
| 53 | +- `DEBT.md`, `NEXT_STEPS.md`, `README.md`: S206 documentation |
| 54 | + |
| 55 | +## Tests |
| 56 | + |
| 57 | +- **7,841 lib-only**, 0 failures, clippy clean (`-D warnings`), fmt clean |
| 58 | +- No test count change — all existing tests pass unchanged |
| 59 | + |
| 60 | +## For primalSpring / guideStone |
| 61 | + |
| 62 | +- No wire protocol changes |
| 63 | +- No IPC surface changes |
| 64 | +- `test-mocks` feature must be explicitly requested if needed (no longer default) |
| 65 | +- Workspace dep versions unchanged (only source of version truth moved to root) |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +## Next Evolution |
| 70 | + |
| 71 | +- Coverage push 83.6% → 90% (hardware mocks for V4L2/VFIO) |
| 72 | +- `crypto_integration` migration (replace deprecated `SecurityClient` direct calls) |
| 73 | +- Primal self-registration with Songbird (`ipc.register`) |
| 74 | +- Pipeline encryption (extend dispatch encryption to pipeline submit) |
0 commit comments