Skip to content

Commit d07ff18

Browse files
westgatewestgate
authored andcommitted
S206: root docs + wateringHole handoff — align all hubs to S206/7,841 tests
Made-with: Cursor
1 parent 3e91156 commit d07ff18

7 files changed

Lines changed: 92 additions & 13 deletions

File tree

CONTEXT.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ ToadStool is the **Layer 0** hardware substrate that other primals and springs d
2929
- Override: `TOADSTOOL_SOCKET` / `TOADSTOOL_TARPC_SOCKET` env vars
3030
- Family: `compute-{family_id}.sock` / `compute-{family_id}-tarpc.sock`
3131
- **Peer primals**: Resolved at runtime via capability IDs and Unix-socket discovery (e.g. `capability.discover`, `resolve_capability_socket_fallback`) — not hardcoded URLs or legacy per-primal env manifests.
32-
- **Tests**: 20,000+ (7,832 lib-only S204, 0 failures, unlimited parallelism)
33-
- **Unsafe**: 49 blocks (all in hw-safe/GPU/VFIO/display/plugin containment, all SAFETY-documented); workspace `unsafe_code = "deny"`, 41 crates `forbid` + 5 hw crates with narrow `#[allow(unsafe_code, reason)]`
32+
- **Tests**: 20,000+ (7,841 lib-only S206, 0 failures, unlimited parallelism)
33+
- **Unsafe**: 49 blocks (all in hw-safe/GPU/VFIO/display/plugin containment, all SAFETY-documented); workspace `unsafe_code = "deny"`, 41 crates `forbid` + 5 hw crates with narrow `#[allow(unsafe_code, reason)]`; all ~40 production `#[allow]` have `reason =` (S206)
3434
- **async-trait**: DEPRECATED — fully removed and banned in `deny.toml` (S203r); transitive only via axum/config/wiggle
3535
- **deny.toml**: `ring` + `async-trait` + `zstd-sys` bans active (ecoBin v3 compliant)
3636
- **Display Phase 2**: `display.present`, `display.subscribe_input`, `display.poll_events` (petalTongue IPC)
37+
- **Encrypted compute dispatch** (Phase 55): Tower `crypto.encrypt`/`crypto.decrypt` for payloads; `DISCOVERY_SOCKET` highest-precedence capability resolution
3738
- **BTSP**: 13/13 converged — JSON-line relay + NDJSON post-handshake (primalSpring Phase 45c)
39+
- **Dep hygiene**: `test-mocks` off by default (S206); all workspace deps unified
3840
- **Monitoring**: Real host queries via `toadstool_sysmon` + `rustix::fs::statvfs`
3941
- **Config**: All `TOADSTOOL_*` env vars interned to `socket_env` constants
4042

DOCUMENTATION.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ToadStool Documentation Hub
22

3-
**Last Updated**: April 2026 — S204
3+
**Last Updated**: April 2026 — S206
44

55
---
66

@@ -30,11 +30,11 @@ These root documents were **fully resolved** and **fossilized** in wateringHole
3030

3131
---
3232

33-
## Current State (S204 — April 2026)
33+
## Current State (S206 — April 2026)
3434

3535
**Post-budding, dependency-sovereign, IPC-first, fully concurrent, capability-based.** barraCuda is a separate primal at `ecoPrimals/barraCuda/`. ToadStool is the hardware infrastructure layer — GPU/NPU/CPU discovery, capability probing, workload orchestration, and shader dispatch.
3636

37-
- **20,000+ tests** (7,832 lib-only S204), 0 failures, 0 clippy warnings, 0 fmt diffs. Full workspace concurrent test suite.
37+
- **20,000+ tests** (7,841 lib-only S206), 0 failures, 0 clippy warnings, 0 fmt diffs. Full workspace concurrent test suite.
3838
- **65 JSON-RPC methods** (incl. `compute.execute` direct route S203f). Wire Standard L3 (partial): `cost_estimates`, `operation_dependencies`. IPC compliant (`health.liveness``{"status":"alive"}`, `health.readiness` → ready+version, `health.check` full envelope, `capabilities.list`, `identity.get`).
3939
- **Dual-socket IPC**`compute.sock` (JSON-RPC primary, biomeOS routes here) + `compute-tarpc.sock` (tarpc hot-path). Override: `TOADSTOOL_SOCKET` / `TOADSTOOL_TARPC_SOCKET`. Family: `compute-{fid}.sock` / `compute-{fid}-tarpc.sock`.
4040
- **Pipeline dispatch**`compute.dispatch.pipeline.submit` + `.status` for ordered multi-stage workloads (DAG, topological sort, result forwarding). Resolves neuralSpring PG-05.
@@ -44,7 +44,9 @@ These root documents were **fully resolved** and **fossilized** in wateringHole
4444
- **BTSP Phase 2 + JSON-line relay (S176)** — Handshake enforced on every UDS accept path; auto-detects plain-text clients (primalSpring) and degrades gracefully. JSON-line BTSP auto-detection on `0x7B` path routes `"protocol":"btsp"` to `relay_json_line_handshake()` (4-step BearDog IPC relay). Family seed loading via `load_family_seed_for_btsp()` (env→file cascade).
4545
- **async-trait DEPRECATED** (S203r) — fully removed and banned in `deny.toml`. All ~91 annotations evolved to manual `Pin<Box<dyn Future>>` (dyn-dispatched) or native AFIT (non-dyn), and subsequently enum dispatch + RPITIT (S203s). Zero runtime behavior change. Transitive only via axum/config/wiggle.
4646
- **`deny.toml` ring ban active** — ecoBin v3 compliant. `ring` absent from lockfile.
47-
- **49 unsafe blocks (all in hw-safe/GPU/VFIO/display/plugin containment crates)**; all SAFETY-documented (S204: ffi\_loader.rs gap closed). Workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow]`.
47+
- **49 unsafe blocks (all in hw-safe/GPU/VFIO/display/plugin containment crates)**; all SAFETY-documented (S204: ffi\_loader.rs gap closed). Workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow(unsafe_code, reason)]`. All ~40 production `#[allow]` have `reason =` (S206).
48+
- **Encrypted compute dispatch (S205)** — payloads encrypted via Tower `crypto.encrypt` before dispatch, decrypted on result return. `DISCOVERY_SOCKET` wired as highest-precedence capability resolution tier.
49+
- **Dep hygiene (S206)**`humantime-serde`, `rand`, `tokio-util`, `temp-env` unified to workspace. GPU `spirv`/`jit`/`testing` stale features removed. `test-mocks` removed from core default features.
4850
- **Edge discovery evolved (S203m)** — USB via `/sys/bus/usb/devices/`, Bluetooth via sysfs adapter enumeration, IPv6 via `/proc/net/if_inet6`. All gracefully degrade on non-Linux.
4951
- **Scheduler queuing (S203m)**`schedule_job``UniversalJobQueue::add_job` inserts into per-priority queues (was metadata-only). `schedule_local_job` logs post-enqueue telemetry.
5052
- **Hardcoding sweep (S203m–p)** — sysfs/procfs paths centralized to `platform_paths`; all `TOADSTOOL_*` env var literals interned to `socket_env` constants (~55 new in S203p). `env_overrides` subsystem fully converted.

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ToadStool Documentation
22

3-
**Updated**: April 2026 — S204
3+
**Updated**: April 2026 — S206
44

55
Primary documentation lives at the repository root. See [../DOCUMENTATION.md](../DOCUMENTATION.md) for the navigation hub. Session trackers archived to `ecoPrimals/infra/wateringHole/fossilRecord/toadstool/`.
66

docs/guides/TESTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Testing Guide
22

3-
**Last Updated**: April 12, 2026 — S203c
3+
**Last Updated**: April 28, 2026 — S206
44

55
## Quick Status
66

77
| Metric | Status | Details |
88
|--------|--------|---------|
9-
| **Workspace Tests** | **21,853 (default features, S203c)** | 0 failures, 220 intentional GPU ignores |
10-
| **Line Coverage** | **~80% (lib-only)** | ~185K production lines. Gap: hardware-dependent code (V4L2/VFIO/neuromorphic) |
9+
| **Lib-Only Tests** | **7,841 (S206)** | 0 failures, unlimited parallelism |
10+
| **Workspace Tests** | **20,000+ (default features)** | ~93 intentional GPU/hardware ignores |
11+
| **Line Coverage** | **~83.6% (lib-only)** | ~185K production lines. Gap: hardware-dependent code (V4L2/VFIO/neuromorphic) |
1112
| **Clippy Pedantic** | **0 warnings** | Full workspace (`-D warnings`), in CI |
1213
| **BarraCuda Tests** | Separate primal | Budded to `ecoPrimals/barraCuda/` (S93) |
1314

docs/reference/PRODUCTION_DEPLOYMENT_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ echo '{"jsonrpc":"2.0","method":"health.check","id":1}' | socat - UNIX-CONNECT:$
4242
### Quality Gates
4343

4444
- `cargo clippy --workspace --all-features -- -D warnings` (0 warnings)
45-
- `cargo test --workspace --all-features` (21,853 tests, 0 failures)
45+
- `cargo test --workspace` (20,000+ workspace / 7,841 lib-only tests, 0 failures)
4646
- `cargo fmt --check` (clean)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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)

specs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ toadStool picks the row. coralReef compiles for it. Springs never see the table.
115115
| Test coverage | Target 90%, current ~83.6% (llvm-cov) | D-COV |
116116
| Mocks in production | 0 (all `#[cfg(test)]` gated) ||
117117

118-
### Key Numbers (S203i)
118+
### Key Numbers (S206)
119119

120-
- **21,600+ tests** (0 failures), **~69 JSON-RPC methods**
120+
- **20,000+ workspace / 7,841 lib-only** tests (0 failures), **~65 JSON-RPC methods**
121121
- **3 hardware transports** — Display (DRM), Capture (V4L2), Serial
122122
- **VFIO interface** — BAR0, DMA, power management (nvpmu)
123123
- **NPU dispatch** — Akida AKD1000/1500 (kernel, VFIO, userspace)

0 commit comments

Comments
 (0)