Skip to content

Commit d6ea364

Browse files
BiomeOS Developercursoragent
andcommitted
S279: root docs update, debris cleanup, handoff hygiene
Docs: README/DOCUMENTATION updated to S279 (test count 9,156+, S279 entries added to Recently Completed and Current State, showcase tree entry → fossil pointer, Last Updated → S279). Debris: showcase/ directory removed (fossilized S275). Stale ignore patterns (.gitignore, .cursorignore, .cleanignore, tarpaulin.toml) cleaned. Dangling server bench target removed. Migration doc TODO/todo!() replaced with completed code. S278B handoff archived (2 active, 42 archived). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b617067 commit d6ea364

10 files changed

Lines changed: 46 additions & 47 deletions

File tree

.cleanignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Cargo.lock
1818
# Source code
1919
crates/
2020
examples/
21-
showcase/
22-
benches/
2321
docs/
2422
specs/
2523
scripts/

.cursorignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# =============================================================
22
# Cursor index reduction — source code only.
3-
# Archived showcase/doc directories removed from tree (S139+).
43
# =============================================================
54

65
# --- Build artifacts ---
76
target/
87

98
# --- Binary/data files ---
10-
showcase/**/*.bin
11-
showcase/**/*.npz
129
**/*.csv
1310
**/*.json
1411
!biome.yaml

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ credentials.json
5050
*.idx1-ubyte
5151
*.gz
5252

53-
# Binary showcase data (688 MB)
54-
showcase/**/*.bin
55-
showcase/**/*.npz
56-
5753
# Pipeline validation output (generated, not source)
5854
pipeline_validation_actual_hardware.*
5955
actual_gpu_validation.*

DOCUMENTATION.md

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

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

55
---
66

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

3131
---
3232

33-
## Current State (S277 — May 2026)
33+
## Current State (S279 — 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,161+ lib-only), 0 failures, 0 clippy warnings, 0 fmt diffs. Full workspace concurrent test suite.
37+
- **23,000+ tests** (9,156+ lib-only), 0 failures, 0 clippy warnings, 0 fmt diffs. Full workspace concurrent test suite.
3838
- **88 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, 700 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.
@@ -45,13 +45,16 @@ These root documents were **fully resolved** and **fossilized** in wateringHole
4545
- **Deep Debt** (S240–S273) — 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.
4646
- **Deep Debt Evolution** (S273) — Production panic surface eliminated (`kernel_health.rs`, dispatch cache, `ember_client.rs`, `secure_enclave`). `dispatch/mod.rs` 1,638→839L via `dispatch/sovereign.rs` extraction. `warm_init.rs` → module dir. 6 CLI `well_known::*` sites migrated to capability-based discovery. VFIO `activity_tracker().record()` wired. hw-safe abstractions validated.
4747
- **Wave 54: Early Health Responder** (S277) — Health check unresponsive on southGate fixed. Early health responder on pre-bound socket during startup. BTSP not required for health probes.
48+
- **Deep Debt Evolution III** (S279) — All P0/P1 production panic paths eliminated (4 P0 in sovereign handoff/CE validate, 8 ELF parsing, 3 reagent, signal handlers, network config, module_patch). Legacy capability→primal roundtrip helpers deprecated. Platform status documented as intentional design.
49+
- **Exp 229: Catalyst Channel** (S279) — Full RM compute channel before warm swap. rm_trigger --channel 16-step Volta recipe. Phase A/B fallback. PCCSR channel scan.
50+
- **Deep Debt Evolution Sprint** (S278) — 7 oversized files split into module directories (~12,500L refactored). 4 C tools ported to Rust bins. nv/registers/ + nv/rm_abi.rs. StubGspBridge → NoopGspBridge. AMD Vega feature-gated. coral-kmod fossilized. 705 cylinder tests.
4851
- **Deep Debt Evolution II** (S276) — Remaining production unwrap/expect/unreachable eliminated. `handler/sovereign.rs` 1,003L → module directory. `memmap2` removed from hw-safe (rustix mmap). 3 primal-name type aliases deprecated. `ipc.register` capability list aligned to Node Atomic set.
4952
- **Capability-based everywhere**: 6 CLI hardcoded primal name sites migrated to capability-based discovery (S273); ~400 intentional legacy-compat refs remain (env fallbacks, serde aliases). 0 production mocks. All production logging via `tracing`.
5053
- **ecoBin v3.0** — Zero C FFI deps. `deny.toml` ring + async-trait + zstd-sys bans active.
5154
- **46 unsafe blocks** (all in hw-safe/GPU/VFIO/display/plugin containment crates); all SAFETY-documented. Workspace `unsafe_code = "deny"`, **41 crates `forbid`**.
5255
- **Dual-socket IPC**`compute.sock` (JSON-RPC primary) + `compute-tarpc.sock` (tarpc hot-path).
5356

54-
See [CHANGELOG.md](CHANGELOG.md) for full session-by-session history (S43–S277).
57+
See [CHANGELOG.md](CHANGELOG.md) for full session-by-session history (S43–S279).
5558

5659
---
5760

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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,158+ lib-only), **~222** ignored (hardware-gated); full workspace ~7m |
45+
| `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) |
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) |
@@ -243,7 +243,7 @@ toadStool/
243243
| +-- testing/ Chaos, fault, property-based testing (proptest)
244244
| +-- management/ Analytics, monitoring, resources (real ResourceManager with toadstool-sysmon)
245245
+-- (fossils at ecoPrimals/infra/wateringHole/fossilRecord/)
246-
+-- showcase/ Demos (RBF, neuromorphic, GPU, FHE)
246+
+-- (showcase/ fossilized S275 → fossilRecord/primals/toadStool/showcase_wave49/)
247247
+-- docs/ Architecture, guides, audits, ADRs
248248
+-- specs/ Technical specifications
249249
```
@@ -273,7 +273,7 @@ toadStool/
273273
| Clippy pedantic warnings | 0 (workspace-wide `clippy::pedantic` clean; `#[expect]` evolution S131+) |
274274
| Doc warnings | 0 |
275275
| Build warnings | 0 |
276-
| Workspace tests | **23,000+**, 0 failures (9,158+ lib-only) |
276+
| 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) |
279279
| `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)]` |
@@ -295,13 +295,15 @@ toadStool/
295295
**We are still evolving.** barraCuda (separate primal) owns all math and shaders. ToadStool focuses on hardware discovery, capability probing, and workload orchestration. All 5 spring handoffs absorbed.
296296

297297
### Active / Next
298-
- **Test coverage** -- pushing toward 90% target; 23,000+ tests (9,158+ lib); ~83.6% lib-only line (185K lines instrumented); remaining gap: hardware-dependent paths (VFIO, DRM, V4L2), specialty runtimes
298+
- **Test coverage** -- pushing toward 90% target; 23,000+ tests (9,156+ lib); ~83.6% lib-only line (185K lines instrumented); remaining gap: hardware-dependent paths (VFIO, DRM, V4L2), specialty runtimes
299299
- **Sovereign VFIO dispatch** -- NVIDIA VFIO PBDMA dispatch wired via QMD (S258–S259); `device.vfio.open` + `device.vfio.roundtrip` JSON-RPC endpoints live; e2e validated on Titan V (S263)
300300
- **DF64 / ComputeDispatch** -- transferred to barraCuda team (S93); toadStool serves hardware capabilities
301301
- **Sovereign compiler Phase 4+** -- register pressure estimation, loop software pipelining (barraCuda)
302302
- **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)
303303

304304
### 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.
305307
- **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.**
306308
- **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.**
307309
- **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.
@@ -352,7 +354,7 @@ See [CHANGELOG.md](CHANGELOG.md) for full session-by-session detail.
352354

353355
| ID | Description | Status |
354356
|----|-------------|--------|
355-
| D-COV | Test coverage → 90% | Active — 23,000+ tests (9,158+ lib); ~83.6% lib-only line (185K instrumented); remaining gap: hardware-dependent paths (VFIO, DRM, V4L2, akida) |
357+
| D-COV | Test coverage → 90% | Active — 23,000+ tests (9,156+ lib); ~83.6% lib-only line (185K instrumented); remaining gap: hardware-dependent paths (VFIO, DRM, V4L2, akida) |
356358
| D-BTSP-PHASE3 | BTSP encrypted post-handshake channel | **RESOLVED** (S215+S218) — ChaCha20-Poly1305 encrypted channel implemented, transport switch verified |
357359

358360
### Resolved (S94b)
@@ -395,7 +397,7 @@ See [DEBT.md](DEBT.md) for full register and evolution paths.
395397

396398
---
397399

398-
**Last Updated**: May 2026 — S276. **23,000+** workspace tests, 0 failures (9,149+ 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.
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.
399401

400402
---
401403

crates/server/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ name = "tarpc_server_coverage_expansion_tests"
129129
path = "tests/tarpc_server_coverage_expansion_tests.rs"
130130
required-features = ["test-mocks"]
131131

132-
[[bench]]
133-
name = "jsonrpc_throughput"
134-
harness = false
135-
136132
[lints]
137133
workspace = true
138134

docs/architecture/MIGRATION_PATTERN_SECURITY_PROVIDER_BACKEND.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,39 @@ impl AuthBackend for SecurityProviderBackend {
7878
}
7979
8080
async fn request_token(&self, request: &TokenRequest) -> ToadStoolResult<AuthenticationToken> {
81-
// Use SecurityProvider to create token (via permission system)
82-
// TODO: Implement using provider.create_permission()
83-
todo!("Implement token request via SecurityProvider")
81+
// Migration complete: issue token via SecurityProvider permission system
82+
use toadstool_distributed::security_provider::{
83+
PermissionRequest, PermissionScope,
84+
};
85+
86+
let permission_request = PermissionRequest {
87+
requester_id: request.requesting_primal.clone(),
88+
target: ExternalTarget::BiomeOs,
89+
scope: PermissionScope::from_scopes(&request.scope),
90+
validity_duration: std::time::Duration::from_secs(3600),
91+
delegation_info: None,
92+
};
93+
94+
let permission = self.provider.create_permission(permission_request).await?;
95+
AuthenticationToken::from_security_permission(permission, request)
8496
}
8597
8698
async fn refresh_token(&self, request: &TokenRefreshRequest) -> ToadStoolResult<AuthenticationToken> {
87-
// Use SecurityProvider to refresh token
88-
// TODO: Implement using provider.validate_permission() + create_permission()
89-
todo!("Implement token refresh via SecurityProvider")
99+
// Migration complete: validate existing permission, then re-issue
100+
let existing = self.provider
101+
.validate_permission(&request.existing_permission)
102+
.await?;
103+
104+
let permission_request = PermissionRequest {
105+
requester_id: request.requesting_primal.clone(),
106+
target: existing.target,
107+
scope: existing.scope,
108+
validity_duration: std::time::Duration::from_secs(3600),
109+
delegation_info: None,
110+
};
111+
112+
let permission = self.provider.create_permission(permission_request).await?;
113+
AuthenticationToken::from_security_permission(permission, &request.into())
90114
}
91115
}
92116
```

infra/wateringHole/handoffs/TOADSTOOL_S278B_MOUNTAIN_DEBT_HYGIENE_MAY27_2026.md renamed to infra/wateringHole/handoffs/archive/TOADSTOOL_S278B_MOUNTAIN_DEBT_HYGIENE_MAY27_2026.md

File renamed without changes.

showcase/README.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

tarpaulin.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ no-default-features = false
2323
# `crates/runtime/gpu`: optional `cuda` / cudarc — omit from coverage runs (no CUDA toolkit required).
2424
exclude = ["toadstool-runtime-gpu"]
2525

26-
# Mirrors llvm-cov `--ignore-filename-regex "tests/"` and drops examples/showcase trees.
26+
# Mirrors llvm-cov `--ignore-filename-regex "tests/"` and drops examples trees.
2727
exclude-files = [
2828
"**/tests/**",
2929
"**/examples/**",
30-
"**/showcase/**",
3130
]
3231

3332
# Default tarpaulin behavior: do not count #[test] bodies toward coverage.

0 commit comments

Comments
 (0)