Skip to content

Commit 55fe045

Browse files
BiomeOS Developercursoragent
andcommitted
S269: Wave 38 — compute.fan_out re-implementation + guest load types
Re-implement compute.fan_out handler from S263 wire contract for Tenaillon 590 GB batch (Wave 38). FanOutWorkUnit, SubstrateFilter, FanOutAssignment types. Direct + semantic dispatch routing. Wire L3 cost estimates. 10 tests. Add GuestLoadPolicy + YieldStrategy types on TenantQuota for power-cycle-aware scheduling on flockGate (Wave 38 horizon). Absorb 21+ upstream clippy errors from S268 rebase: guarded_sysfs, kernel_health, sovereign_handoff, sovereign_stages, module_patch, init_pipeline. Fix sovereign.rs redundant closure + needless borrow. 87 JSON-RPC methods. 9,122 lib tests. Zero clippy warnings. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d2a4364 commit 55fe045

27 files changed

Lines changed: 633 additions & 98 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,21 @@ 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-266)
8+
## [Unreleased] - May 22, 2026 (Sessions 43-269)
9+
10+
### Session S269 (May 22, 2026) — Wave 38: Fan-Out + Guest Load + Upstream Debt
11+
12+
primalSpring Wave 38 response: re-implement fan-out dispatch, add guest load yield types, absorb upstream clippy.
13+
14+
- ADDED: `compute.fan_out` handler re-implementation per S263 wire contract — `FanOutWorkUnit`, `SubstrateFilter`, `FanOutAssignment`, `FanOutUnitStatus` types
15+
- ADDED: `compute.fan_out` back to `DIRECT_JSONRPC_METHODS` + wire L3 cost estimates + direct routing in `handle_method`
16+
- ADDED: `compute_fan_out` arm in `dispatch_by_impl_name` for semantic alias dispatch
17+
- ADDED: `GuestLoadPolicy` + `YieldStrategy` types on `TenantQuota.max_guest_load` for power-cycle-aware scheduling
18+
- ADDED: 10 fan-out tests (`dispatch/tests/fan_out.rs`)
19+
- ADDED: Wave 38 items to NEXT_STEPS.md
20+
- FIXED: 21+ upstream clippy errors from S268 rebase (guarded_sysfs, kernel_health, sovereign_handoff, sovereign_stages, module_patch, init_pipeline)
21+
- FIXED: Redundant closure + needless borrow in sovereign.rs and CLI dispatch
22+
- METRICS: 87 JSON-RPC methods, 9,122 lib tests, 0 clippy warnings, deny clean
923

1024
### Session S266 (May 20, 2026) — Sandbox working_dir Production + Upstream Clippy
1125

CONTEXT.md

Lines changed: 2 additions & 2 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–D complete. NV VFIO e2e dispatch validated on Titan V (S263). **86 JSON-RPC methods.**
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). **87 JSON-RPC methods.**
3434
- **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)
35+
- **Tests**: 23,000+ (9,122+ 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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
# Active Technical Debt Register
22

3-
**Date**: May 2026 — S268
3+
**Date**: May 2026 — S269
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+
**S269 (Wave 38: Fan-Out + Guest Load + Upstream Debt)**:
12+
`compute.fan_out` re-implemented from S263 wire contract — handler, types,
13+
10 tests, wire L3, semantic alias dispatch. `GuestLoadPolicy` + `YieldStrategy`
14+
types on `TenantQuota` for flockGate power-cycle-aware scheduling. 21+ upstream
15+
clippy errors absorbed from S268 rebase (guarded_sysfs, kernel_health, sovereign_handoff).
16+
9,122 lib tests, 87 JSON-RPC methods, 0 clippy warnings.
17+
1118
**S266 (Sandbox working_dir Production + Upstream Clippy)**:
1219
`data_dependencies` validation wired into `execute_workload`: file existence
1320
check, optional dep degradation, BLAKE3 integrity verification (pure Rust).

DOCUMENTATION.md

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

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

55
---
66

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

3131
---
3232

33-
## Current State (S266 — May 2026)
33+
## Current State (S269 — 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-
- **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.
37+
- **23,000+ tests** (9,122+ lib-only), 0 failures, 0 clippy warnings, 0 fmt diffs. Full workspace concurrent test suite.
38+
- **87 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.
4040
- **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.
4141
- **Stale socket hygiene** (S264) — CLI daemon SIGTERM + socket cleanup. Display IPC Drop impl. UDS unlink-before-bind audited.
4242
- **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.
43+
- **Sandbox working_dir production** (S269) — `data_dependencies` pre-dispatch validation with BLAKE3 integrity. `SandboxSpec.working_directory` wired into sandbox manager. 90+ upstream clippy errors absorbed.
44+
- **Deep Debt** (S240–S269) — 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.
4545
- **Capability-based everywhere**: 0 hardcoded primal names, 0 production mocks, all primal references use capability identifiers. All production logging via `tracing`.
4646
- **ecoBin v3.0** — Zero C FFI deps. `deny.toml` ring + async-trait + zstd-sys bans active.
4747
- **46 unsafe blocks** (all in hw-safe/GPU/VFIO/display/plugin containment crates); all SAFETY-documented. Workspace `unsafe_code = "deny"`, **41 crates `forbid`**.
4848
- **Dual-socket IPC**`compute.sock` (JSON-RPC primary) + `compute-tarpc.sock` (tarpc hot-path).
4949

50-
See [CHANGELOG.md](CHANGELOG.md) for full session-by-session history (S43–S266).
50+
See [CHANGELOG.md](CHANGELOG.md) for full session-by-session history (S43–S269).
5151

5252
---
5353

NEXT_STEPS.md

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

33
**Updated**: May 2026 — S268 (Kernel Health Preflight: 3-layer `autoconf.h` mismatch detection in `cylinder::vfio::kernel_health`. Blocks warm handoff / DKMS builds on corrupted build env. `sovereign.kernel_health` RPC + `toadstool kernel-health` CLI. 700 cylinder tests.)
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,055+ lib-only) | **87 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** | **Phase C complete — all blocking items resolved (S253)** | **Phase D dispatch live — QMD-based VFIO PBDMA dispatch wired (S258–S263)** | **`OwnedFd` VFIO fd ownership (S253)** | **`toadstool device` CLI (S253)** | **CORALREEF_* env vars deprecated with TOADSTOOL_* primaries (S253)** | **Zero `#[allow(deprecated)]` remaining** | **700 cylinder tests** | **E2E sovereign dispatch VALIDATED on Titan V (warm handoff)**
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,122+ lib-only) | **87 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** | **Phase C complete — all blocking items resolved (S253)** | **Phase D dispatch live — QMD-based VFIO PBDMA dispatch wired (S258–S263)** | **`OwnedFd` VFIO fd ownership (S253)** | **`toadstool device` CLI (S253)** | **CORALREEF_* env vars deprecated with TOADSTOOL_* primaries (S253)** | **Zero `#[allow(deprecated)]` remaining** | **700 cylinder tests** | **E2E sovereign dispatch VALIDATED on Titan V (warm handoff)**
55
**Latest**: S268 — **Kernel Health Preflight**: `kernel_health.rs` 3-layer build env check (autoconf freshness, struct probe, RELA cross-check). Integrated into sovereign handoff step 0d, DKMS build guard, `sovereign.kernel_health` RPC, `toadstool kernel-health` CLI. Post-fix audit: all 20 DKMS + 10 installed modules clean. S267 — Sovereign driver rotation via diesel engine.
66
**Previous**: S266 — PLX keepalive root cause fix. S265r — Driver Lab + Containment. S264 — PCIe bridge keepalive. S263 — CPUCTL_ALIAS breakthrough, GR context scheduler, warm handoff on Titan V.
77

@@ -65,7 +65,14 @@ names directly. Deprecated API definitions retained for backward compatibility o
6565
| **Phase C: Multi-unit routing engine** | ✅ LANDED — `compute.route.multi_unit` handler, tolerance-based routing, heuristic fallback, shader-core fallback on every decision |
6666
| **Phase D: Mixed command streams** | Planned — blocked on coralReef FECS firmware loading; extends PBDMA with draw/RT/texture/tensor/framebuffer commands |
6767

68-
### Key Remaining Items (S265)
68+
### Wave 38 Horizon Items (S269)
69+
70+
| Item | Priority | Status |
71+
|------|----------|--------|
72+
| `compute.fan_out` at scale — Tenaillon 590 GB batch | MEDIUM | **RE-IMPLEMENTED** (S269) — handler, types, 10 tests, wire L3, semantic aliases. strandGate graph design pending upstream spec. |
73+
| `max_guest_load` yield semantics — power-cycle scheduling for flockGate | LOW | **TYPES SHIPPED** (S269) — `GuestLoadPolicy` + `YieldStrategy` on `TenantQuota`. Orchestrator enforcement pending flockGate integration spec. |
74+
75+
### Key Remaining Items (S268)
6976

7077
| Item | Status |
7178
|------|--------|

README.md

Lines changed: 3 additions & 3 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 | S266 | v0.2.0
3+
**Sovereign Compute Hardware** | Pure Rust | ecoBin | May 2026 | S269 | v0.2.0
44

55
---
66

@@ -42,7 +42,7 @@ Nest = Tower + Storage <- storage
4242
| `cargo fmt --all -- --check` | 0 diffs |
4343
| `cargo clippy --workspace --all-targets -- -D warnings` | 0 warnings |
4444
| `cargo doc --workspace --no-deps` (RUSTDOCFLAGS="-D warnings") | 0 warnings |
45-
| `cargo test --workspace` | **23,000+ tests, 0 failures** (9,055+ lib-only), **~222** ignored (hardware-gated); full workspace ~7m |
45+
| `cargo test --workspace` | **23,000+ tests, 0 failures** (9,122+ 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) |
4848
| `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) |
@@ -391,7 +391,7 @@ See [DEBT.md](DEBT.md) for full register and evolution paths.
391391

392392
---
393393

394-
**Last Updated**: May 2026 — S266. **23,000+** workspace tests, 0 failures (9,055+ lib-only). ~83.6% lib-only line coverage (target 90%). **86 JSON-RPC methods** (direct) + semantic registry (incl. `health.version`, `health.drain`, `device.vfio.open`, `device.vfio.roundtrip`, `device.gr.init`, `compute.context.init`, `primal.announce`, `ember.vfio.*`, `ember.gr.init`, `sovereign.gr.init`, `ember.swap`, `sovereign.boot` aliases) with **Wire Standard L3** (cost_estimates + operation_dependencies). AGPL-3.0-or-later. Zero C FFI deps (ecoBin v3.0). **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. Zero production `unreachable!()`. All files under 800 lines (production+examples). Zero library println/eprintln. IPC-first JSON-RPC (dual-socket: `compute.sock` + `compute-tarpc.sock`). Rust 1.85+ (edition 2024, MSRV). **Phase C complete** (S245–S253). **Phase D dispatch live** (S254–S263) — AMD DRM dispatch live, NV VFIO QMD-based dispatch wired via PBDMA. **`OwnedFd` VFIO fd ownership** (S253). **520 cylinder tests.** **Capability-based discovery compliant** per `CAPABILITY_BASED_DISCOVERY_STANDARD.md` v1.3. **Stale socket hygiene** (S264). **sporePrint Wave 28** (S265). **Sandbox working_dir production** (S266).
394+
**Last Updated**: May 2026 — S269. **23,000+** workspace tests, 0 failures (9,122+ lib-only). ~83.6% lib-only line coverage (target 90%). **87 JSON-RPC methods** (direct) + semantic registry (incl. `health.version`, `health.drain`, `device.vfio.open`, `device.vfio.roundtrip`, `device.gr.init`, `compute.context.init`, `primal.announce`, `ember.vfio.*`, `ember.gr.init`, `sovereign.gr.init`, `ember.swap`, `sovereign.boot` aliases) with **Wire Standard L3** (cost_estimates + operation_dependencies). AGPL-3.0-or-later. Zero C FFI deps (ecoBin v3.0). **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. Zero production `unreachable!()`. All files under 800 lines (production+examples). Zero library println/eprintln. IPC-first JSON-RPC (dual-socket: `compute.sock` + `compute-tarpc.sock`). Rust 1.85+ (edition 2024, MSRV). **Phase C complete** (S245–S253). **Phase D dispatch live** (S254–S263) — AMD DRM dispatch live, NV VFIO QMD-based dispatch wired via PBDMA. **`OwnedFd` VFIO fd ownership** (S253). **520 cylinder tests.** **Capability-based discovery compliant** per `CAPABILITY_BASED_DISCOVERY_STANDARD.md` v1.3. **Stale socket hygiene** (S264). **sporePrint Wave 28** (S265). **Sandbox working_dir production** (S266).
395395

396396
---
397397

crates/cli/src/commands/dispatch/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub async fn execute_command(cli: &Cli, ctx: &CliContext) -> Result<()> {
152152
}
153153

154154
Commands::KernelHealth { format, repair } => {
155-
super::kernel_health::execute_kernel_health(&format, *repair).await?;
155+
super::kernel_health::execute_kernel_health(format, *repair).await?;
156156
}
157157

158158
Commands::Server {

0 commit comments

Comments
 (0)