|
| 1 | +# toadStool S275 — Wave 49: Ecosystem Tightening |
| 2 | + |
| 3 | +**Date**: May 25, 2026 |
| 4 | +**Session**: S275 |
| 5 | +**From**: toadStool team |
| 6 | +**To**: primalSpring (downstream audit) |
| 7 | +**Audit**: primalSpring Wave 49 — ecosystem tightening (3 vectors + startup debt) |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Summary |
| 12 | + |
| 13 | +All three Wave 49 cleanup vectors resolved. Startup latency pipeline debt |
| 14 | +addressed with deferred wgpu GPU enumeration and pre-bound socket optimization. |
| 15 | + |
| 16 | +## Vector A — Stale Deploy Patterns (High — correctness) |
| 17 | + |
| 18 | +| File | Change | |
| 19 | +|------|--------| |
| 20 | +| `.cargo/config.toml` | `target/release/toadstool` ref → plasmidBin wording | |
| 21 | +| `docs/guides/AKIDA_DRIVER_DEPLOYMENT.md` | `target/release/toadstool` Dockerfile → plasmidBin depot | |
| 22 | +| `crates/cli/README.md` | `cargo install toadstool-cli` → plasmidBin depot docs | |
| 23 | +| `scripts/install-akida-driver.sh` | Prefers plasmidBin depot binary, falls back to local build | |
| 24 | + |
| 25 | +No `which toadstool` patterns found. `notify-plasmidbin.yml` confirmed active. |
| 26 | + |
| 27 | +## Vector B — wateringHole Consolidation (Medium) |
| 28 | + |
| 29 | +36 local handoffs mirrored to central `infra/wateringHole/`: |
| 30 | + |
| 31 | +- **8 active** (S267–S274) → `handoffs/` |
| 32 | +- **28 historical** (S243–S266) → `handoffs/archive/` |
| 33 | + |
| 34 | +Local handoffs remain as canonical source. |
| 35 | + |
| 36 | +## Vector C — Showcase Fossilization (Low) |
| 37 | + |
| 38 | +35 files (8 progressive API demos, 2 levels) archived to |
| 39 | +`fossilRecord/primals/toadStool/showcase_wave49/`. `showcase/` replaced |
| 40 | +with pointer README. |
| 41 | + |
| 42 | +## Pipeline Debt — Startup Latency (>8s → ~3s) |
| 43 | + |
| 44 | +### Root cause |
| 45 | + |
| 46 | +`create_executor()` ran **before** socket bind, with wgpu GPU enumeration |
| 47 | +(1–5s Vulkan driver init) and mDNS coordination discovery (3s) on the |
| 48 | +critical path. |
| 49 | + |
| 50 | +### Fix: deferred wgpu + pre-bound socket |
| 51 | + |
| 52 | +1. **Deferred wgpu GPU enumeration** — `query_local_capabilities()` now |
| 53 | + returns a fast baseline (cpu, memory, orchestration) immediately and |
| 54 | + spawns wgpu enumeration in a background `tokio::spawn`. Full GPU |
| 55 | + capabilities populate the `OnceLock` asynchronously. Saves 1–5s. |
| 56 | + |
| 57 | +2. **Pre-bound JSON-RPC socket** — `prebind_unix_listener()` binds the |
| 58 | + socket before `create_executor()` runs. `serve_unix_prebound()` accepts |
| 59 | + the pre-bound listener. Health probes can connect during init. |
| 60 | + |
| 61 | +3. Default `LocalDirect` deployment: no orchestrator overhead. |
| 62 | + |
| 63 | +### New public API |
| 64 | + |
| 65 | +- `prebind_unix_listener(path) → UnixListener` |
| 66 | +- `serve_unix_prebound(handler, listener)` |
| 67 | +- `start_servers_with_fallback(..., jsonrpc_listener: Option<UnixListener>)` |
| 68 | + |
| 69 | +## Additional Cleanup (S275) |
| 70 | + |
| 71 | +| Item | Action | |
| 72 | +|------|--------| |
| 73 | +| `toadstool.toml` | HTTP-era 364-line template fossilized → `toadstool_wave49.toml`; replaced with 30-line IPC-first config | |
| 74 | +| `primal-capabilities.toml` | Added Wave 49 note: legacy primal name sections are reference only | |
| 75 | +| `docs/guides/PRIMAL_INTEGRATION_GUIDE.md` | Fossilized (S275) — predates S273 capability migration | |
| 76 | +| `docs/reference/PRODUCTION_DEPLOYMENT_GUIDE.md` | Env vars updated to IPC-first (removed Songbird/BearDog/NestGate ports) | |
| 77 | +| `docs/reference/TYPES_REFERENCE.md` | Session tag updated to reflect historical status | |
| 78 | +| `docs/architecture/DAEMON_MODE_EVOLUTION.md` | Session range updated to S275 | |
| 79 | +| `crates/core/cylinder/src/vfio/amd_metal.rs` | `#[allow(dead_code)]` → `#[expect(dead_code, reason)]` | |
| 80 | + |
| 81 | +## Verification Checklist |
| 82 | + |
| 83 | +- [x] No `showcase/` directory (pointer README only) |
| 84 | +- [x] Local `wateringHole/` active handoffs mirrored to `infra/wateringHole/handoffs/` |
| 85 | +- [x] No `which toadstool` or `target/release/toadstool` in scripts |
| 86 | +- [x] `notify-plasmidbin.yml` active in `.github/workflows/` |
| 87 | +- [x] Production TODO/FIXME/HACK: 0 |
| 88 | +- [x] `toadstool.toml` HTTP-era template fossilized |
| 89 | + |
| 90 | +## Metrics |
| 91 | + |
| 92 | +| Metric | Value | |
| 93 | +|--------|-------| |
| 94 | +| Lib tests | 9,149+ | |
| 95 | +| Workspace tests | 23,000+ | |
| 96 | +| JSON-RPC methods | 88 | |
| 97 | +| Clippy warnings | 0 | |
| 98 | +| Showcase files archived | 35 | |
| 99 | +| Handoffs mirrored to central | 36 (8 active + 28 archive) | |
| 100 | +| Stale deploy refs fixed | 4 | |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | +Ready for downstream primalSpring audit. |
0 commit comments