Skip to content

Commit 7197d3e

Browse files
hyperpolymathclaude
andcommitted
docs: handoff guide for Sonnet 4.7 (container isolation + GNN training)
Two execution-ready tasks detailed in docs/IMPLEMENTATION-SPECS.md: 1. Container Isolation (🔴 CRITICAL - Stage 1 blocker) - Wrap all 105 prover backends with SandboxedExecutor - Currently: all provers run unsandboxed via Command::new() - Timeline: 2-3 weeks (parallelizable) 2. GNN Training (🟡 HIGH - Stage 3 blocker) - Train model on 553MB corpus; achieve MRR≥0.66, nDCG≥0.60 - Currently: scaffolds exist, model never trained - Timeline: 2-3 weeks (parallel to isolation work) Both specs include gap analysis, file lists, success criteria, and parallelization strategy. Recommend executing in order: container isolation first, GNN in parallel. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent ec14fe9 commit 7197d3e

1 file changed

Lines changed: 181 additions & 0 deletions

File tree

HANDOFF-TO-SONNET.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# Handoff to Sonnet 4.7: Container Isolation + GNN Training
2+
3+
**From**: Haiku (2026-04-25 session)
4+
**To**: Sonnet 4.7
5+
**Priority**: 🔴 CRITICAL (Stage 1 production blocker) + 🟡 HIGH (Stage 3 quality gate)
6+
7+
---
8+
9+
## What Haiku Just Completed
10+
11+
This session restructured echidna as a full tooling server and documented two major implementation gaps:
12+
13+
1. **Repo reorganization** (DONE)
14+
- Echidna moved to top-level (was in verification-ecosystem)
15+
- Echidnabot moved to gitbot-fleet (resolved dual-truth repo)
16+
- Echidna-llm-mcp extracted to standalone repo (can be pushed once GitHub repo created)
17+
- Contractiles 6/6 complete (intend/bust/adjust added; all A2ML + .ncl runners)
18+
19+
2. **A2ML Conformance** (DONE)
20+
- `AGENTIC.a2ml`: full spec compliance (426 lines; gating, entropy, risk thresholds, overrides, audit)
21+
- `NEUROSYM.a2ml`: full spec compliance (342 lines; operations, composition, obligations, types)
22+
- `ROADMAP.a2ml`: 8-stage service roadmap (Stage 1–8 with blockers and timelines)
23+
24+
3. **Implementation Specs** (DONE — ready for you to execute)
25+
- `docs/IMPLEMENTATION-SPECS.md` — two detailed, execution-ready specs
26+
27+
---
28+
29+
## Two Critical Tasks (Ready for You)
30+
31+
### TASK 1: Container Isolation (🔴 CRITICAL)
32+
33+
**File**: `docs/IMPLEMENTATION-SPECS.md` § SPEC 1
34+
35+
**Problem**: All 105 prover implementations directly execute solver binaries without sandboxing.
36+
```rust
37+
// Current (UNSAFE):
38+
let mut cmd = Command::new(self.binary());
39+
cmd.arg("--version").output().await
40+
```
41+
42+
**Gap**: Sandbox infrastructure exists (`src/rust/executor/sandbox.rs` — fully implemented) but isn't wired into any prover backend.
43+
44+
**Fix**: Wrap all 105 `Command::new()` calls with `SandboxedExecutor`.
45+
46+
**Why Critical**: Stage 1 production release is gated on this. Unsandboxed solver execution = arbitrary code execution risk.
47+
48+
**Effort**: 2–3 weeks (parallelizable by prover family)
49+
50+
**Files to Modify** (from spec):
51+
- `src/rust/provers/mod.rs` — trait update (1 day)
52+
- `src/rust/provers/*.rs` — 105 implementations (batched commits, ~5–7 days)
53+
- `src/rust/executor/wrapper.rs` — new wrapper (1 day)
54+
- `src/rust/dispatch.rs` — route sandbox config (2 days)
55+
- `tests/e2e_security_isolation.rs` — new security test (2 days)
56+
57+
**Success**: All 105 provers sandboxed, 638+ tests green, security test passing.
58+
59+
---
60+
61+
### TASK 2: GNN Model Training (🟡 HIGH)
62+
63+
**File**: `docs/IMPLEMENTATION-SPECS.md` § SPEC 2
64+
65+
**Problem**: GNN training scaffolds exist (`src/julia/training/`, `models/`) but model was never trained on corpus. Currently using cosine-similarity fallback (works, but suboptimal).
66+
67+
**Gap**:
68+
- Corpus ready (553 MB, 66,674 proofs, 4.7M premises) but untouched
69+
- Training code is stubs (~1.4k LoC)
70+
- Model metadata shows "0 words, 0 classes" (never trained)
71+
72+
**Fix**: Run full training pipeline → achieve MRR ≥ 0.66 + nDCG ≥ 0.60 → integrate into dispatch.
73+
74+
**Why Important**: Stage 3 quality gate. GNN can improve premise ranking semantics; cosine is acceptable but suboptimal.
75+
76+
**Effort**: 2–3 weeks (can run in parallel with container isolation)
77+
78+
**Files to Modify/Create** (from spec):
79+
- `src/julia/training/data_pipeline.jl` — new
80+
- `src/julia/training/train_gnn.jl` — new (replaces stub)
81+
- `src/julia/training/eval_gnn.jl` — new
82+
- `models/gnn_model.jl` — new
83+
- `src/rust/gnn/model.rs` — load trained weights
84+
- `src/abi/GnnIntegration.idr` — new formal proof (Idris2)
85+
- `tests/gnn_ranking.rs` — new integration test
86+
87+
**Success**: Model trained (MRR ≥ 0.66, nDCG ≥ 0.60), integrated, formal proof verified, benchmarks < 100ms.
88+
89+
---
90+
91+
## Execution Strategy
92+
93+
**Recommended order:**
94+
1. **Container Isolation first** (Stage 1 gate is critical for production)
95+
2. **GNN in parallel** (no dependencies; independent workstream)
96+
97+
**Why parallel:**
98+
- Isolation touches 105 prover backends (file-level parallelization possible)
99+
- GNN is self-contained (Julia training + Rust integration + Idris2 proof)
100+
- Both can be merged simultaneously when ready
101+
102+
---
103+
104+
## Context: Where Echidna Stands
105+
106+
**What Works** (mature):
107+
- ✅ 113 prover backends (105 active + 8 type-checker variants)
108+
- ✅ 3.0 GB training corpus (66K proofs, 4.7M premises)
109+
- ✅ 1.43M vocabulary (premise + tactic)
110+
- ✅ REST/gRPC/GraphQL APIs (fully operational)
111+
- ✅ Trust pipeline: portfolio solvers, certificate verification, axiom tracking, confidence scoring
112+
- ✅ Zig FFI layer, Idris2 ABI proofs (zero believe_me)
113+
- ✅ 638+ tests passing (528 unit + 38 integration + 21 property)
114+
- ✅ A2ML conformance (AGENTIC, NEUROSYM fully spec-compliant as of this session)
115+
116+
**What's Missing** (your work):
117+
- 🔴 Container isolation (105 provers unsandboxed)
118+
- 🟡 GNN training (scaffolds only, never converged)
119+
120+
---
121+
122+
## Key Files for Reference
123+
124+
**Specs** (read these first):
125+
- `docs/IMPLEMENTATION-SPECS.md` — your execution playbook
126+
- `.machine_readable/6a2/AGENTIC.a2ml` — gating/entropy/audit config
127+
- `.machine_readable/6a2/NEUROSYM.a2ml` — operation semantics
128+
- `.machine_readable/ROADMAP.a2ml` — 8-stage service architecture
129+
130+
**Code to Understand**:
131+
- `src/rust/executor/sandbox.rs` — SandboxedExecutor (fully implemented, just not wired)
132+
- `src/rust/provers/mod.rs` — ProverBackend trait (where to add sandbox param)
133+
- `src/rust/provers/athena.rs`, `cameleer.rs`, `kissat.rs` — example implementations (105 variations on same pattern)
134+
- `src/julia/training/train.jl` — GNN training scaffold
135+
- `models/premise_vocab.txt`, `tactic_vocab.txt` — ready to use
136+
137+
**Tests to Maintain**:
138+
- `tests/e2e_proof_pipeline.rs` — must keep passing post-sandbox
139+
- All 638+ tests in `Cargo.toml` test suite
140+
141+
---
142+
143+
## Critical Invariants
144+
145+
1. **All 105 provers must be wrapped** (not just SMT solvers; includes Lean, Coq, Agda, etc.)
146+
2. **Default sandbox mode = Podman** (not None; None is dev-only with explicit opt-in)
147+
3. **Sandbox config flows from AGENTIC.a2ml** (entropy level → sandbox strictness)
148+
4. **GNN model achieved nDCG ≥ 0.60 before integration** (fallback to cosine if not met)
149+
5. **Formal Idris2 proof required for GNN integration** (M11 Parameter axiom pattern acceptable for training convergence)
150+
151+
---
152+
153+
## Questions for Sonnet
154+
155+
1. **Parallelization strategy for 105 provers**: Batch by prover family (ATPs, SMTs, Interactive, etc.) or by similarity?
156+
2. **GNN convergence risk**: If training doesn't converge to nDCG ≥ 0.60, roll back to cosine or investigate architecture?
157+
3. **Formal proof scope**: Full proof of nDCG guarantee or just integration contract?
158+
159+
---
160+
161+
## Success Definition
162+
163+
**Container Isolation**: All 105 provers sandboxed, 638+ tests green, security integration test passing, no performance regression.
164+
165+
**GNN Training**: Model trained (MRR ≥ 0.66, nDCG ≥ 0.60), integrated into dispatch, formal proof verified, query latency < 100ms.
166+
167+
**Both together**: Stage 1 production-ready (container isolation) + Stage 3 quality baseline (GNN).
168+
169+
---
170+
171+
## Branch & Commits
172+
173+
All of Haiku's work is on `main`:
174+
- Latest commits: AGENTIC/NEUROSYM/ROADMAP A2ML + implementation specs
175+
- All reorganization work (echidnabot move, cartridge extract, contractiles) merged and pushed
176+
177+
You can start from `main` immediately. Create a feature branch for your work (e.g., `feat/container-isolation` and `feat/gnn-training` in parallel).
178+
179+
---
180+
181+
**Ready to start?** Read `docs/IMPLEMENTATION-SPECS.md` first. Both specs are detailed and execution-ready.

0 commit comments

Comments
 (0)