Skip to content

Commit 20d1d60

Browse files
BiomeOS Developercursoragent
andcommitted
docs + cleanup: S282 root docs, orphan deletion, handoff archive, cargo clean
- Updated README.md, DOCUMENTATION.md, NEXT_STEPS.md, .env.example, sporeprint/validation-summary.md to S282 - Deleted 7 orphan source files (~1,400 lines dead code): container/engines.rs, container/config.rs, distributed/tests.rs, config/validation.rs, common/validation.rs, toadstool/workload_types.rs, sovereign/tests.rs - Removed tools/rm_trigger C binary (Rust replacement canonical since S278) - Archived S279-S281 handoffs to archive/ - Created S282 handoff document - cargo clean (370 GB build artifacts purged) Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 69afe01 commit 20d1d60

18 files changed

Lines changed: 135 additions & 1427 deletions

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ToadStool Environment Configuration
2-
# Updated: S273 (May 24, 2026)
2+
# Updated: S282 (May 28, 2026)
33
#
44
# All values have sensible defaults. Only override what you need.
55
# Copy this file to .env and customize for your environment.

DOCUMENTATION.md

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

3-
**Last Updated**: May 2026 — S279
3+
**Last Updated**: May 2026 — S282
44

55
---
66

NEXT_STEPS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# ToadStool -- Next Steps
22

3-
**Updated**: May 2026 — S279 (Deep Debt Evolution III: Panic Path Elimination + Capability Hardening. All P0/P1 production unwrap/expect eliminated. Legacy capability→primal roundtrip deprecated. 9,156+ lib tests. Zero clippy.)
4-
**Status**: Production-grade | Rust edition **2024** (MSRV 1.85) | **AGPL-3.0-or-later** | **All quality gates green** | tests verified (23,000+ workspace, 0 failures; 9,156+ lib-only) | **88+ JSON-RPC methods** | Wire Standard L3 (partial) | Zero C FFI deps (ecoBin v3.0) | **Zero production panics/expects** | **Zero production TODO/FIXME/HACK** | **Zero production unreachable!()** | IPC-first | workspace `unsafe_code = "deny"`, **41 crates `forbid`** | **46 unsafe blocks** (all in hw containment, all SAFETY-documented) | **rustix 1.x workspace-wide** | **capability-based primal references (no hardcoded names)** | **`async-trait` DEPRECATED** (banned in `deny.toml`) | **`deny.toml` ring + async-trait + zstd-sys bans active** | **Zero external mmap deps (memmap2 removed S276)** | **Phase D dispatch live** | **E2E sovereign dispatch VALIDATED on Titan V (warm handoff)**
5-
**Latest**: S279**Deep Debt Evolution III**: All P0/P1 production panic paths eliminated (handoff handler, pipeline, CE validate, ELF parsing, reagent, signal handlers, network config, module_patch). Legacy capability→primal roundtrip helpers deprecated. Platform status documented as intentional design. SAFETY comments verified complete.
6-
**Previous**: S279**Exp 229: Catalyst Channel**: Full RM compute channel before warm swap (FECS ACR blocker). `rm_trigger --channel` 16-step Volta recipe. `RmChannelEvidence` + PCCSR scan. Phase A/B fallback in `open_vfio.rs`. 705+864 tests. S278 — Deep Debt Evolution Sprint. S277 — Wave 54: Early Health Responder. S276 — Deep Debt Evolution II. S275 — Wave 49: Ecosystem Tightening. S274 — Glacial Horizon. S273 — Deep Debt Evolution.
3+
**Updated**: May 2026 — S282 (Deep Debt Evolution V: Complete Unsafe Hardening + Env Centralization + Panic Elimination. Zero libc. Zero unsafe without SAFETY. Zero production panics. ~97% env centralized. 178 lib tests. Zero clippy.)
4+
**Status**: Production-grade | Rust edition **2024** (MSRV 1.85) | **AGPL-3.0-or-later** | **All quality gates green** | tests verified (23,000+ workspace, 0 failures; 9,156+ lib-only) | **88+ JSON-RPC methods** | Wire Standard L3 (partial) | **Zero `libc`** (ecoBin v3.0 — rustix for all hardware I/O) | **Zero production panics/expects** (S282: 4 paths evolved to Result) | **Zero production TODO/FIXME/HACK** | IPC-first | workspace `unsafe_code = "deny"`, **41 crates `forbid`** | **46 unsafe blocks** (all SAFETY-documented, S282: 28 gaps closed) | **rustix 1.x workspace-wide** | **~97% env centralized** (410+ reads via socket_env constants) | **capability-based primal references** | **`async-trait` banned in `deny.toml`** | **Phase D dispatch live** | **E2E sovereign dispatch VALIDATED on Titan V**
5+
**Latest**: S282**Deep Debt V**: 28 unsafe SAFETY gaps closed. 4 panic paths → Result. 110 env::var sites migrated (+56 constants). libc::mmap→rustix::mm. 8+13 clippy fixes. PatchStrategy → impl FromStr.
6+
**Previous**: S281libc eliminated from cylinder. S280 — Wave 59 env centralization (+73 constants). S279 — Panic path elimination + Exp 229 catalyst channel. S278 — Module extraction + C→Rust. S277 — Wave 54. S276 — Deep Debt II. S275 — Wave 49.
77

88
---
99

README.md

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

3-
**Sovereign Compute Hardware** | Pure Rust | ecoBin | May 2026 | S279 | v0.2.0
3+
**Sovereign Compute Hardware** | Pure Rust | ecoBin | May 2026 | S282 | v0.2.0
44

55
---
66

@@ -45,8 +45,8 @@ Nest = Tower + Storage <- storage
4545
| `cargo test --workspace` | **23,000+ tests, 0 failures** (9,156+ lib-only), **~222** ignored (hardware-gated); full workspace ~7m |
4646
| Doctests | All passing (common, core, server, cli, testing, display) |
4747
| Standalone clone test | Pull to any machine, `cargo test` works (GPU-optional, CPU fallback, device-lost resilient) |
48-
| `unsafe` blocks | **46 actual** (all in hw-safe/GPU/VFIO/display/plugin containment crates); all SAFETY-documented (S204, reconciled S221); workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow(unsafe_code, reason)]`; **all lint attrs have `reason =`** (S211+S213) |
49-
| Production panics/unwraps | **0** production `unwrap()` / `expect()` / `panic!()` |
48+
| `unsafe` blocks | **46 actual** (all in hw-safe/GPU/VFIO/display/plugin containment crates); **all SAFETY-documented** (S282: 28 gaps closed); workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow(unsafe_code, reason)]`; **all lint attrs have `reason =`** |
49+
| Production panics/unwraps | **0** production `unwrap()` / `expect()` / `panic!()` (S282: 4 panic paths evolved to Result) |
5050
| Production stubs / test mocks | Stubs evolved to real implementations (edge USB/BT/IPv6, scheduler queuing, monitoring via sysmon+statvfs); **auth test mocks** (`InMemoryAuthBackend`) isolated under **`#[cfg(any(test, feature = "test-mocks"))]`**; **`test-mocks` removed from default features** (S206 — production builds exclude mock code) |
5151
| Production `Box<dyn Error>` | 0 in core crates -- all typed errors (thiserror) |
5252
| Production TODOs / FIXME / HACK | 0 in production code |
@@ -276,15 +276,16 @@ toadStool/
276276
| Workspace tests | **23,000+**, 0 failures (9,156+ lib-only) |
277277
| Lib-only line coverage | ~83.6% |
278278
| Full workspace test time | ~7m (unlimited parallelism, `cfg!(test)` fast timeouts; GPU crates have NVK resilience wrappers) |
279-
| `unsafe` blocks | **46 actual** (all in hw-safe/GPU/VFIO/display/plugin containment crates); all SAFETY-documented (S204, reconciled S221); workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow(unsafe_code, reason)]` |
280-
| Production panics/unwraps | **0** production `unwrap()` / `expect()` / `panic!()` (confirmed S279) |
279+
| `unsafe` blocks | **46 actual** (all in hw-safe/GPU/VFIO/display/plugin containment crates); **all SAFETY-documented** (S282: 28 gaps closed); workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow(unsafe_code, reason)]` |
280+
| Production panics/unwraps | **0** production `unwrap()` / `expect()` / `panic!()` (S282: 4 panic paths evolved to Result) |
281281
| Production `Box<dyn Error>` | 0 in core crates -- all typed errors (thiserror) |
282282
| Production stubs | 0 blind stubs; test-only mocks **`#[cfg(test)]`** only |
283283
| Production `todo!()`/`unimplemented!()`/`dbg!()` | 0 |
284284
| Production FIXME / HACK | 0 |
285285
| Dead code removed | ~400+ lines (REST handlers, middleware, dead modules); **~80** justified `#[allow]` remain (conditional compilation, deprecated compat) |
286286
| Hardcoded localhost/ports/URLs in prod | 0 -- config constants + capability-based discovery |
287-
| External deps eliminated | `chrono`, `log`, `instant`, `anyhow` (core), `pollster`, `serde_yaml`, `libc`, `sysinfo`, `caps`, `console`, `indicatif`, `figment`, `handlebars` + 23 phantom deps. S164: dep dedup (linfa/ndarray/mockall/env_logger). S166: `md5``md-5`, `bollard` 0.18, `ed25519-dalek` (core+CLI→BearDog RPC), `regex` (→`str::contains`), `parking_lot` (→`std::sync`). S169: `pyo3`, `gbm`, `linfa`, `hmac`, `indicatif` |
287+
| External deps eliminated | `chrono`, `log`, `instant`, `anyhow` (core), `pollster`, `serde_yaml`, **`libc`** (S281→S282: zero libc, all mmap/ioctl via rustix), `sysinfo`, `caps`, `console`, `indicatif`, `figment`, `handlebars` + 23 phantom deps. S164: dep dedup. S166: `ed25519-dalek`/`regex`/`parking_lot`. S169: `pyo3`, `gbm`, `linfa`, `hmac`, `indicatif` |
288+
| Env centralization | **~97%** (~410+ env reads via `socket_env::` constants); <10 raw `env::var("...")` remaining (S282) |
288289
| Default test timeout | 5s (unit: 2s, integration: 30s, chaos: 20s) |
289290
| Hardware transports | 3 | Display (DRM), Capture (V4L2), Serial (feature-gated) |
290291

@@ -302,8 +303,11 @@ toadStool/
302303
- **NUCLEUS crypto integration** -- compute payloads encrypted via Tower `crypto.encrypt`/`crypto.decrypt` (S205); **self-registration with Songbird** via `DISCOVERY_SOCKET` + `ipc.register` at startup (S207)
303304

304305
### Recently Completed
305-
- **S279 (May 27, 2026)**: **Deep Debt Evolution III: Panic Path Elimination + Capability Hardening** — All P0/P1 production panic paths eliminated (sovereign handoff handler, pipeline tier, CE validate, ELF parsing, reagent, signal handlers, network config, module_patch). Legacy capability→primal roundtrip helpers deprecated. Platform status documented as intentional design. SAFETY comments verified complete. **9,156+ lib tests, zero clippy.**
306-
- **S279 (May 27, 2026)**: **Exp 229: Catalyst Channel** — Full RM compute channel before warm swap (FECS ACR blocker). rm_trigger --channel 16-step Volta recipe. RmChannelEvidence + PCCSR scan. Phase A/B fallback in open_vfio.rs. 705+864 tests.
306+
- **S282 (May 28, 2026)**: **Deep Debt Evolution V: Complete Unsafe Hardening + Env Centralization + Panic Elimination** — 28 unsafe SAFETY doc gaps closed (12 files). 4 production panic paths evolved to Result. 110 raw env::var sites migrated (+56 new socket_env constants). libc::mmap→rustix::mm. 8 cylinder + 13 server clippy fixes. `PatchStrategy` → idiomatic `impl FromStr`. **178 lib tests, zero clippy, zero libc, ~97% env centralized.**
307+
- **S281 (May 28, 2026)**: **Deep Debt Evolution IV: libc Elimination + Workspace Consolidation** — libc eliminated from cylinder (last C binding on hardware path). rm_trigger.rs → rustix::ioctl. rustix consolidated to workspace dep across 10 crates. +33 socket_env constants, 47 env::var sites migrated. **Zero libc in workspace.**
308+
- **S280 (May 28, 2026)**: **Wave 59 Env Centralization + Clippy Allow Evolution** — Deleted orphan env_overrides.rs (342L). +73 socket_env constants. 117 env::var sites migrated across 30 files. Fixed 5 P0 bare #[allow(clippy::)].
309+
- **S279 (May 27, 2026)**: **Deep Debt Evolution III: Panic Path Elimination + Capability Hardening** — All P0/P1 production panic paths eliminated. Legacy capability→primal roundtrip helpers deprecated. **9,156+ lib tests, zero clippy.**
310+
- **S279 (May 27, 2026)**: **Exp 229: Catalyst Channel** — Full RM compute channel before warm swap (FECS ACR blocker). rm_trigger --channel 16-step Volta recipe.
307311
- **S278 (May 27, 2026)**: **Deep Debt Evolution Sprint: Module Extraction + C→Rust + ABI Absorption** — Split 7 oversized files into module directories (sovereign_handoff 2,860L→11 modules, module_patch 2,020L→11, compute_device 2,072L→11 with gr_ungating/pbdma dedup, sovereign_stages 1,861L→7, guarded_sysfs 1,561L→5, channel/mod 1,117L→4, handler/sovereign 1,004L→6). Ported 4 userspace C tools to Rust bins (rm_trigger, sovereign_acr_boot, sovereign_pmu_boot, capture_pmu_falcon). Created `nv/registers/` (12 domain submodules) and `nv/rm_abi.rs` (canonical RM ABI types from coral-kmod). Evolved `StubGspBridge``NoopGspBridge` with capability guidance. Gated AMD Vega behind feature. Fossilized coral-kmod. **705 cylinder tests, zero clippy, zero userspace C.**
308312
- **S276 (May 26, 2026)**: **Deep Debt Evolution II — Unwrap Elimination, Sovereign Split, memmap2 Removal** — Eliminated remaining production unwrap/expect/unreachable: sovereign.rs 2x unwrap, mmio_region.rs expect, dma.rs Drop expect, diagnostic interpreter 6x expect, permissions.rs expect, dispatch unreachable!(). `handler/sovereign.rs` (1,003L, 11 handlers) → module directory (init/snapshot/capture). `memmap2` removed from hw-safe — `safe_mmap.rs` rewritten on rustix. 3 stale primal-name type aliases deprecated. `ipc.register` capability list aligned to Node Atomic set. 13 upstream clippy warnings absorbed. **88+ JSON-RPC methods. 9,158+ lib tests, zero clippy.**
309313
- **S275 (May 25, 2026)**: **Wave 49: Ecosystem Tightening** — Showcase fossilized (35 files → fossilRecord). wateringHole consolidated (36 handoffs mirrored, archive/ created). Stale deploy patterns fixed (4 files → plasmidBin). Startup latency optimized (deferred wgpu, pre-bound socket). toadstool.toml HTTP-era template fossilized. Docs fossil-tagged.
@@ -397,7 +401,7 @@ See [DEBT.md](DEBT.md) for full register and evolution paths.
397401

398402
---
399403

400-
**Last Updated**: May 2026 — S279. **23,000+** workspace tests, 0 failures (9,156+ lib-only). ~83.6% lib-only line coverage (target 90%). **88 JSON-RPC methods** (direct) + semantic registry. AGPL-3.0-or-later. Zero C FFI deps (ecoBin v3.0). Zero userspace C in primal codebases. **46 unsafe blocks** (all in hw-safe/GPU/VFIO/display/plugin containment crates); all SAFETY-documented; workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow(unsafe_code, reason)]`. **Zero production panics/expects**. Zero production TODO/FIXME/HACK. **705 cylinder tests.** `nv/registers/` (12 domain submodules), `nv/rm_abi.rs` (canonical RM ABI). `NoopGspBridge` (was `StubGspBridge`). AMD Vega feature-gated. coral-kmod fossilized. IPC-first JSON-RPC. Rust 1.85+ (edition 2024). **Phase D dispatch live** (S254–S263). **Capability-based discovery compliant** per `CAPABILITY_BASED_DISCOVERY_STANDARD.md` v1.3.
404+
**Last Updated**: May 2026 — S282. **23,000+** workspace tests, 0 failures (9,156+ lib-only). ~83.6% lib-only line coverage (target 90%). **88 JSON-RPC methods** (direct) + semantic registry. AGPL-3.0-or-later. **Zero `libc`** (ecoBin v3.0 — all hardware I/O via rustix). Zero userspace C. **46 unsafe blocks** all SAFETY-documented (S282: 28 gaps closed); workspace `unsafe_code = "deny"`, **41 crates `forbid`** + 5 hw crates with narrow `#[allow(unsafe_code, reason)]`. **Zero production panics** (S282: 4 paths evolved to Result). Zero production TODO/FIXME/HACK. **~97% env centralized** (410+ reads via `socket_env::` constants). Rust 1.85+ (edition 2024). **Phase D dispatch live** (S254–S263). **Capability-based discovery compliant** per `CAPABILITY_BASED_DISCOVERY_STANDARD.md` v1.3.
401405

402406
---
403407

0 commit comments

Comments
 (0)