You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Brings the Chapel metalayer from *scaffold-only, never compiled* to a
load-bearing CI signal.
- **Chapel sources compile** clean under `chpl 2.3.0` (CI) and `chpl
2.8.0` (local). Static lib only — see ADR for the CHPL_LIB_PIC=none
constraint on the apt-shipped Chapel.
- **L2.2 lands**: `parallelProofSearchSpeculative` (first-success-wins
atomic CAS) ships next to the existing best-of `parallelProofSearch`.
L2.3+ remain gated.
- **CI flipped strict**: `chapel-build` and `zig-ffi` drop
`continue-on-error`. `rust-chapel-real` stays allow-fail (Wave-2 work).
- **Aggregation invariants proved** in Agda with zero
`postulate`/`admit`/`believe_me`.
Closes#133.
## Sub-waves this PR closes
| Sub-wave | Status | Notes |
|---|---|---|
| L2.1 | **done (pre-PR)** | Rust↔Zig↔Chapel triple wired |
| L2.2 | **done (this PR)** | `parallelProofSearchSpeculative` w/ atomic
CAS |
| L2.3 | gated | Cancel-token through `tryProver` for mid-flight
preemption |
| L2.4 | gated | Mutation parallelism, hard-gated on L1 Cap'n Proto |
| L2.5 | gated | Multi-locale, needs cluster runtime |
| L2.6 | gated | Numeric hot paths |
| L2.7 | gated | Bench harness |
## Compile output (local, chpl 2.8.0)
```
$ just chapel-build
Compiling Chapel metalayer (static)...
cd src/chapel && chpl --library --static -I ../zig_ffi \
-o libechidna_chapel \
chapel_ffi_exports.chpl parallel_proof_search.chpl
parallel_proof_search.chpl:446: warning: 'main()' has no special meaning when compiling in --library mode
Built src/chapel/lib/libechidna_chapel.a
$ just chapel-smoke
cd src/chapel && chpl -o chapel_smoke smoke.chpl && ./chapel_smoke
Hello, Chapel — ECHIDNA metalayer smoke OK
parallel-CAS winner: 3 (expected 3)
reduction sum 1..100: 5050 (expected 5050)
elapsed: 1.1e-05 s
```
The only warning is the harmless `'main()' has no special meaning when
compiling in --library mode` — `main` is retained as the
standalone-binary entry point used by the (separate, non-`--library`)
smoke / dev workflow.
## Cargo + Agda
```
$ cargo test --features chapel --lib -- proof_search
running 6 tests
test proof_search::tests::test_sequential_always_available ... ok
test proof_search::tests::test_sequential_search ... ok
test proof_search::tests::test_proof_result_failure ... ok
test proof_search::tests::test_proof_result_fields ... ok
test proof_search::tests::test_sequential_search_name ... ok
test proof_search::tests::test_strategy_selector_has_sequential ... ok
test result: ok. 6 passed; 0 failed; ...
$ agda --safe proofs/agda/ParallelSoundness.agda
(exit 0, zero output — cached interfaces)
```
## Agda theorems
```agda
-- Soundness: portfolio verdict true → at least one prover succeeded.
speculative-sound : {n : ℕ} (xs : Vec Bool n)
→ IsTrue (speculative xs)
→ Any IsTrue xs
-- Completeness: any prover succeeded → portfolio verdict true.
speculative-complete : {n : ℕ} (xs : Vec Bool n)
→ Any IsTrue xs
→ IsTrue (speculative xs)
-- Cancellation-safety: a successful head wins regardless of tail.
cancellation-safety : {n : ℕ} (bs : Vec Bool n)
→ IsTrue (speculative (true ∷ bs))
```
All three discharged by structural recursion + the `Vec`-`Any` library.
Zero `postulate`/`admit`/`believe_me`; `agda --safe` passes.
## ADR
[`docs/decisions/2026-05-30-chapel-rehabilitation.md`](docs/decisions/2026-05-30-chapel-rehabilitation.md)
— rewrite-not-park decision, why static-only on apt Chapel, rollout
phasing (Wave 1 echidna → Wave 2 proven → Wave 3 docudactyl), and Wave-2
follow-ups.
## Eval / MRR
Deferred: `models/neural/` does not exist (CLAUDE.md §Train
GNN/Transformer on larger corpus) so there is no model to benchmark
against. The aggregation layer is the load-bearing piece in this PR;
per-prover-vs-portfolio MRR moves once a model lands.
## Breadcrumbs in proven + docudactyl
To be filed after this PR lands — they reference the merged PR by URL.
## Test plan
- [ ] CI `chapel-build` green (was `continue-on-error`, now strict)
- [ ] CI `zig-ffi` green (was `continue-on-error`, now strict)
- [ ] CI `rust-chapel-feature` green (was already strict)
- [ ] CI `rust-chapel-real` allow-fail (no regression vs main)
- [ ] No regression in non-chapel test paths
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| "Every important solver" |**128 ProverKind variants** (89 external prover bindings + 39 TypeChecker disciplines routed through TypedWasm); **91 / 91 with real `suggest_tactics`** (5 still heuristic-only; GNN-ranked is the end-state target per `docs/PROVER_COUNT.md`); **72 backends with empty native search but a cross-prover Verisim fallback at the dispatcher layer (CLI/REST/REPL)**|**All variants with real `suggest_tactics` (GNN‑ranked top‑k); per-backend search reflects each prover's native capability while cross-prover queries are served from Verisim by `goal_hash`**|
124
124
| "Vocab at 2.5 M" | 255 K |**~1 M canonical tokens** after Mathport + Iris + VST + Flyspeck + HoTT absorption, with **online growth** adding tokens during training |
125
-
| "Chapel fully supported" |2 files, POC only |**`dispatch.rs` picks Chapel‑parallel dispatch by config**; runtime init + cancellation + error propagation wired; ≥1 OoM speedup on portfolio solves |
125
+
| "Chapel fully supported" |**rewritten and CI-green 2026-05-30** — `src/chapel/` compiles under chpl 2.3.0 / 2.8.0 (static lib, apt Chapel ships `CHPL_LIB_PIC=none`only); L2.2 `parallelProofSearchSpeculative` (first-success-wins atomic CAS) shipped next to best-of `parallelProofSearch`; `chapel-ci.yml` chapel-build + zig-ffi strict; aggregation invariants proved in `proofs/agda/ParallelSoundness.agda` with zero postulate/admit/believe_me. L2.3 cancel-token preemption next|**`dispatch.rs` picks Chapel‑parallel dispatch by config**; runtime init + cancellation + error propagation wired; ≥1 OoM speedup on portfolio solves |
126
126
| "Cap'n Proto serialisation" | 0 `.capnp` files |**`crates/echidna-wire/`** contains schemas for ProofState / Goal / Tactic / EmbeddingRequest / RankingResponse; IPC on :8090 is Cap'n Proto; JSON retained only as debug fallback |
127
127
| "Vordr / Selur / Svalinn / Cerro‑Torre / Stapeln" | Not present | Each named as a versioned dependency in Cargo.toml or the container definition, wired into its role |
128
128
| "AffineScript‑TEA frontend" | Not present (10 `.res` files stub) |**`src/rescript/`** holds ≥33 AffineScript‑TEA modules, persistent Model → Msg → Update loop, talks to core over Cap'n Proto WebSocket |
0 commit comments