Skip to content

Commit a5d2b71

Browse files
BiomeOS Developercursoragent
andcommitted
S266: sandbox working_dir production + upstream debt + doc cleanup
Wire data_dependencies pre-dispatch validation with BLAKE3 integrity into execute_workload. Wire SandboxSpec.working_directory into sandbox manager creation. Absorb upstream clippy errors from new cylinder modules (ce_validate, sovereign_tiers, pmu_investigate, pushbuf, kmod, module_patch, sovereign_handoff) and server API removals (adopt_anchor_fds, skip_cold_memory_training). Remove compute.fan_out from DIRECT_JSONRPC_METHODS (handler dropped upstream). Fix crate count 64→46, method count 85→86 across all docs. Archive 413 lines of completed session history from NEXT_STEPS.md. Derive Default for ModuleSource. Align all root docs to S266 / 9,055 lib tests / 86 methods. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2b1c0e2 commit a5d2b71

28 files changed

Lines changed: 457 additions & 606 deletions

File tree

.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: S265 (May 20, 2026)
2+
# Updated: S266 (May 20, 2026)
33
#
44
# All values have sensible defaults. Only override what you need.
55
# Copy this file to .env and customize for your environment.

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,24 @@ All notable changes to ToadStool will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased] - May 20, 2026 (Sessions 43-265)
8+
## [Unreleased] - May 20, 2026 (Sessions 43-266)
9+
10+
### Session S266 (May 20, 2026) — Sandbox working_dir Production + Upstream Clippy
11+
12+
primalSpring Wave 31 horizon resolution: data dependency staging + sandbox working_dir + upstream debt.
13+
14+
- ADDED: Pre-dispatch `data_dependencies` validation in `execute_workload` — checks file existence, optional dep degradation, BLAKE3 integrity verification
15+
- ADDED: `blake3` dependency to CLI crate (pure Rust, no C/asm)
16+
- WIRED: `SandboxSpec.working_directory` into `CrossPlatformSandboxManager::create_sandbox` — creates directory inside sandbox, stores in metadata
17+
- FIXED: 90+ upstream clippy errors from new cylinder modules (`ce_validate`, `sovereign_tiers`, `pmu_investigate`, `pushbuf`)
18+
- FIXED: Upstream API removal — `adopt_anchor_fds` dropped from `ComputeDevice`, `skip_cold_memory_training` dropped from `SovereignInitOptions`
19+
- FIXED: Server dispatch `Default::default()``SovereignInitOptions::default()`, `_sysfs_bar``sysfs_bar`, `_cache``cache_guard`, collapsed `if let`, `map().unwrap_or()``map_or()` / `is_some_and()`
20+
- FIXED: `primal_announce` re-export lint (function pending handler dispatch wiring)
21+
- REMOVED: `compute.fan_out` tests (method dropped upstream from `DispatchHandler`)
22+
- TESTS: 7 new data dependency validation tests (existence, BLAKE3 match/mismatch, optional deps, remote skip)
23+
- REMOVED: `compute.fan_out` from DIRECT_JSONRPC_METHODS + wire_l3 cost estimates (handler dropped upstream)
24+
- FIXED: Crate count in sporeprint 64 → 46 (actual workspace members)
25+
- METRICS: 86 JSON-RPC methods, 9,055 lib tests, 0 clippy warnings, deny clean
926

1027
### Session S265 (May 20, 2026) — sporePrint pappusCast Wave 28
1128

CONTEXT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ ToadStool is the **Layer 0** hardware substrate that other primals and springs d
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
3232
- **Discovery hierarchy** (primalSpring cross-cutting): Songbird `ipc.resolve` → biomeOS `capability.discover` → UDS filesystem convention → socket registry → TCP probing. toadStool implements tiers 1–4; TCP probing (tier 5) not used for local IPC
33-
- **Wave 8 Compute Trio** (S235–S263): `compute.dispatch.submit` trio-standard IPC contract. **Phase A: coral-ember absorbed** (S237). **Phase B: glowplug absorbed** (S239). **Phase C complete — all blocking items resolved** (S245–S253): toadstool-cylinder (153 .rs, 520 tests), DRM/MMIO/AMD/NVIDIA/VFIO, `OwnedFd` VFIO fd ownership (S253), SwapOrchestrator real quiesce/persist/restore (S253), `toadstool device` CLI (S253). **Phase D: dispatch live** (S254–S263) — `LocalDeviceFactory` wired at handler startup (S254), AMD DRM dispatch live, NV VFIO QMD-based dispatch wired via PBDMA (S258–S259). `CPUCTL_HALTED` bit fix + `probe_warm_fecs()` (S256). `device.vfio.open` + `device.vfio.roundtrip` JSON-RPC endpoints (S259). `health.version` + `health.drain` RPC endpoints (S260). Kepler dispatch wired (S260). `device.gr.init` / `compute.context.init` IPC exposed (S262). coralReef shader metadata aliases wired (S262). `compute.fan_out` DAG-aware dispatch (S263). `primal.announce` self-registration (S263). **85 JSON-RPC methods.**
34-
- **Deep Debt** (S240–S263): All Duration literals extracted to named constants (~100+ across 30+ files). Legacy primal env vars `#[deprecated]` with migration guidance (S250). All `#[allow(deprecated)]` evolved to `#[expect(deprecated, reason)]` (S252). `VfioResourceHandle` `Option<i32>``OwnedFd` (S253). Sentinel values evolved to idiomatic Rust (S250). Zero library `println!`/`eprintln!`. All production files <800 lines. Zero production mocks/TODO/FIXME/unreachable!(). All unsafe SAFETY-documented. All `#[allow]`/`#[expect]` have `reason` (S255+S259+S261+S263). `cargo deny check bans` passes clean. `aws-lc-sys` banned (S263).
35-
- **Tests**: 22,900+ (8,945+ lib-only, 0 failures, unlimited parallelism)
33+
- **Wave 8 Compute Trio** (S235–S263): `compute.dispatch.submit` trio-standard IPC contract. Phase A–D complete. NV VFIO e2e dispatch validated on Titan V (S263). **86 JSON-RPC methods.**
34+
- **Deep Debt** (S240–S266): All Duration literals named constants. Zero production mocks/TODO/FIXME/unreachable!(). All unsafe SAFETY-documented. All `#[allow]`/`#[expect]` have `reason`. `cargo deny check bans` clean. Stale socket hygiene (S264). sporePrint Wave 28 (S265). Sandbox `working_dir` production + `data_dependencies` validation (S266).
35+
- **Tests**: 23,000+ (9,055+ lib-only, 0 failures, unlimited parallelism)
3636
- **Unsafe**: 46 blocks (all in hw-safe/GPU/VFIO/display/plugin containment, all SAFETY-documented; 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)
3737
- **async-trait**: DEPRECATED — fully removed and banned in `deny.toml` (S203r); transitive only via axum/config/wiggle
3838
- **deny.toml**: `ring` + `async-trait` + `zstd-sys` + `aws-lc-sys` bans active (ecoBin v3 compliant, `SOVEREIGNTY_STANDARDS.md` dark forest gate). `ring` present only as conditional transitive dep via quinn-proto/rustls-webpki (not on default build path)

DEBT.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
# Active Technical Debt Register
22

3-
**Date**: May 2026 — S265
3+
**Date**: May 2026 — S266
44
**Philosophy**: Math is universal, precision is silicon. Workarounds are
55
short-term solutions that increase debt. We aim to solve deep debt over
66
iterations, evolving toward vendor-agnostic, capability-based solutions—
77
with production stubs surfacing typed configuration errors and capability
88
guidance, and auth policy driven by explicit environment configuration
99
where applicable.
1010

11+
**S266 (Sandbox working_dir Production + Upstream Clippy)**:
12+
`data_dependencies` validation wired into `execute_workload`: file existence
13+
check, optional dep degradation, BLAKE3 integrity verification (pure Rust).
14+
`SandboxSpec.working_directory` consumed in `CrossPlatformSandboxManager::create_sandbox`.
15+
90+ upstream clippy errors fixed across 4 new cylinder modules (ce_validate,
16+
sovereign_tiers, pmu_investigate, pushbuf). Upstream API removals absorbed
17+
(`adopt_anchor_fds`, `skip_cold_memory_training`). Server dispatch lint cleanup.
18+
9,055 lib tests, 0 clippy warnings, deny clean.
19+
1120
**S253 (Phase C Complete + Deep Debt Sweep)**:
1221
`VfioResourceHandle` `Option<i32>``OwnedFd` (RAII fd ownership).
1322
SwapOrchestrator quiesce/persist/restore evolved from stubs to real impls.

DOCUMENTATION.md

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

3-
**Last Updated**: May 2026 — S265
3+
**Last Updated**: May 2026 — S266
44

55
---
66

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

3131
---
3232

33-
## Current State (S263 — May 2026)
33+
## Current State (S266 — May 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-
- **22,900+ tests** (8,849+ lib-only), 0 failures, 0 clippy warnings, 0 fmt diffs. Full workspace concurrent test suite.
38-
- **83 JSON-RPC methods** (incl. `device.vfio.open`, `device.vfio.roundtrip`, `device.gr.init`, `compute.context.init`, `device.swap`, `device.warm_catch`, `health.version`, `health.drain`, 6 MMIO/Falcon RPCs, `toadstool.validate`, `compute.execute` direct route, `auth.check`/`auth.mode`/`auth.peer_info`, `provenance.query`). Semantic aliases incl. `ember.vfio.*`, `ember.gr.init`, `sovereign.gr.init`, `ember.swap`, `sovereign.boot`. Wire Standard L3 (partial): `cost_estimates`, `operation_dependencies`. **Recommended caller timeout: ≥3 seconds** for health probes during startup.
37+
- **23,000+ tests** (9,055+ lib-only), 0 failures, 0 clippy warnings, 0 fmt diffs. Full workspace concurrent test suite.
38+
- **86 JSON-RPC methods** (direct) + semantic registry. Wire Standard L3 (partial): `cost_estimates`, `operation_dependencies`. **Recommended caller timeout: ≥3 seconds** for health probes during startup.
3939
- **Phase C complete** (S245–S253) — toadstool-cylinder (153 .rs, 520 tests), DRM/MMIO/AMD/NVIDIA/VFIO hardware modules absorbed from `coral-driver`. `OwnedFd` VFIO fd ownership (S253). SwapOrchestrator real quiesce/persist/restore (S253). `toadstool device` CLI with swap/list/status/warm subcommands (S253). GspBridge trait boundary.
40-
- **Phase D: Sovereign dispatch validated** (S250–S263) — `try_local_dispatch()` via `ComputeDevice` trait before `coral_client` IPC forward. Full buffer lifecycle. AMD DRM dispatch live. **NV VFIO e2e dispatch validated on Titan V** (S263): warm handoff → VFIO open → channel → DMA roundtrip → GR init. CPUCTL_ALIAS breakthrough (Volta HS security-lock resolved). GR context buffer + scheduler cycle. Current frontier: FECS PENDING_CTX_RELOAD.
41-
- **Diesel Engine Migration** (S252) — `device.swap` + `device.warm_catch` JSON-RPC handlers. 6 MMIO/Falcon RPCs. `SysfsBar0Rw` read-write BAR0. `TOADSTOOL_RUN_DIR` socket layout.
42-
- **Deep Debt** (S240–S263) — All Duration literals extracted to named constants. `CORALREEF_*` env vars deprecated with `TOADSTOOL_*` primaries + deprecation warnings (S253). Zero `#[allow(deprecated)]` remaining. `ember.swap` + `sovereign.boot` semantic aliases. All lint attrs have `reason`. Zero production mocks/TODO/FIXME/unreachable!(). All unsafe SAFETY-documented. `cargo deny check bans` passes clean.
40+
- **Phase D: Sovereign dispatch validated** (S250–S263) — `try_local_dispatch()` via `ComputeDevice` trait before `coral_client` IPC forward. Full buffer lifecycle. AMD DRM dispatch live. **NV VFIO e2e dispatch validated on Titan V** (S263): warm handoff → VFIO open → channel → DMA roundtrip → GR init. Current frontier: FECS PENDING_CTX_RELOAD.
41+
- **Stale socket hygiene** (S264) — CLI daemon SIGTERM + socket cleanup. Display IPC Drop impl. UDS unlink-before-bind audited.
42+
- **sporePrint Wave 28** (S265) — `sporeprint/validation-summary.md` + CI dispatch to sporePrint.
43+
- **Sandbox working_dir production** (S266) — `data_dependencies` pre-dispatch validation with BLAKE3 integrity. `SandboxSpec.working_directory` wired into sandbox manager. 90+ upstream clippy errors absorbed.
44+
- **Deep Debt** (S240–S266) — All Duration literals extracted to named constants. `CORALREEF_*` env vars deprecated with `TOADSTOOL_*` primaries + deprecation warnings (S253). Zero `#[allow(deprecated)]` remaining. All lint attrs have `reason`. Zero production mocks/TODO/FIXME/unreachable!(). All unsafe SAFETY-documented. `cargo deny check bans` passes clean.
4345
- **Capability-based everywhere**: 0 hardcoded primal names, 0 production mocks, all primal references use capability identifiers. All production logging via `tracing`.
4446
- **ecoBin v3.0** — Zero C FFI deps. `deny.toml` ring + async-trait + zstd-sys bans active.
4547
- **46 unsafe blocks** (all in hw-safe/GPU/VFIO/display/plugin containment crates); all SAFETY-documented. Workspace `unsafe_code = "deny"`, **41 crates `forbid`**.
4648
- **Dual-socket IPC**`compute.sock` (JSON-RPC primary) + `compute-tarpc.sock` (tarpc hot-path).
4749

48-
See [CHANGELOG.md](CHANGELOG.md) for full session-by-session history (S43–S263).
50+
See [CHANGELOG.md](CHANGELOG.md) for full session-by-session history (S43–S266).
4951

5052
---
5153

0 commit comments

Comments
 (0)