|
| 1 | +# ToadStool S209 — Deep Debt: Lint Reason + Dep Unification + Auth Capability |
| 2 | + |
| 3 | +**Date**: April 29, 2026 |
| 4 | +**Session**: S209 |
| 5 | +**Scope**: Codebase-wide lint evolution, dependency hygiene, auth capability evolution |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Changes |
| 10 | + |
| 11 | +### 1. Lint Evolution — `reason =` on all remaining attrs |
| 12 | + |
| 13 | +All crate-level `#![allow]` without `reason =` upgraded (7 crates): |
| 14 | +- `specialty/embedded/protocol_engine.rs` — `missing_docs` |
| 15 | +- `specialty/embedded/chip_database.rs` — `missing_docs` |
| 16 | +- `specialty/embedded/cpu6502/mod.rs` — `missing_docs` + cast/names |
| 17 | +- `specialty/embedded/cpuz80.rs` — `missing_docs` + cast |
| 18 | +- `neuromorphic/akida-models/src/lib.rs` — `clippy::must_use_candidate` |
| 19 | +- `runtime/native/src/lib.rs` — `clippy::no_effect_underscore_binding` |
| 20 | +- `testing/src/lib.rs` — `refining_impl_trait` |
| 21 | + |
| 22 | +~30 production `#[expect(deprecated)]`/`#[allow(deprecated)]` upgraded with |
| 23 | +`reason =` across: config, auth, ecosystem, storage, GPU backends, CLI, |
| 24 | +distributed, server/mocks. |
| 25 | + |
| 26 | +### 2. Workspace Dependency Unification (23 Cargo.toml files) |
| 27 | + |
| 28 | +| Dependency | Crates unified | |
| 29 | +|-----------|----------------| |
| 30 | +| `sha2` | cli, security/policies, runtime/wasm, integration/storage, runtime/edge | |
| 31 | +| `serde_json` | integration-tests, runtime/edge, toadstool-core, management/monitoring | |
| 32 | +| `tracing-subscriber` | runtime/gpu, integration-tests, runtime/display, neuromorphic/akida-driver | |
| 33 | +| `tokio-test` | testing, server, integration/protocols, runtime/display, distributed, client, integration/primals, integration/storage, runtime/specialty, runtime/orchestration | |
| 34 | +| `tracing` + `thiserror` | runtime/edge | |
| 35 | + |
| 36 | +All converted from pinned versions to `{ workspace = true }`. |
| 37 | + |
| 38 | +### 3. Stale Feature Flag Cleanup |
| 39 | + |
| 40 | +Removed unused placeholder features from excluded `runtime/python`: |
| 41 | +- `ai-ml = []` — no `cfg(feature)` gate anywhere |
| 42 | +- `squirrel-preparation = []` — no `cfg(feature)` gate anywhere |
| 43 | + |
| 44 | +### 4. Auth Backend — Capability-Based Issuer Evolution |
| 45 | + |
| 46 | +**Before**: `validate_token()` fallback issuer was `well_known::BEARDOG` |
| 47 | +(hardcoded primal name). |
| 48 | + |
| 49 | +**After**: Fallback issuer is `capabilities::CRYPTO` (capability domain). |
| 50 | +Auth backend no longer imports `well_known` module. Crate-level |
| 51 | +`#![expect(deprecated)]` removed (no deprecated items used in production). |
| 52 | + |
| 53 | +Test fixtures updated: mock token issuers use `capabilities::CRYPTO`, |
| 54 | +audience targets use `capabilities::COORDINATION`. |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## Files Changed (69) |
| 59 | + |
| 60 | +Major categories: |
| 61 | +- 7 crate-level `#![allow]` attrs (specialty, neuromorphic, native, testing) |
| 62 | +- ~20 production `#[expect(deprecated)]` sites (config, auth, ecosystem, CLI) |
| 63 | +- 23 `Cargo.toml` dep unification files |
| 64 | +- `auth_backend.rs` + `auth/tests.rs` (capability evolution) |
| 65 | +- `DEBT.md`, `NEXT_STEPS.md` (session documentation) |
| 66 | +- Edge crate formatting (rustfmt wrapping long attrs) |
| 67 | + |
| 68 | +## Tests |
| 69 | + |
| 70 | +- **7,842 lib-only**, 0 failures, clippy clean (`-D warnings`), fmt clean |
| 71 | +- No test count change — all existing tests pass |
| 72 | + |
| 73 | +## For primalSpring / guideStone |
| 74 | + |
| 75 | +- **Auth issuer change**: Token validation now expects `"crypto"` as default |
| 76 | + issuer (was `"beardog"`). If your tokens use `"beardog"` as issuer, either: |
| 77 | + - Set `TOADSTOOL_AUTH_ISSUER=beardog` env var, or |
| 78 | + - Update token issuer to `"crypto"` (capability-based) |
| 79 | +- No wire protocol changes |
| 80 | +- No IPC surface changes |
0 commit comments