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
feat(dispatch): wire ChapelParallelSearch into ProverDispatcher (L2.1)
Activates L2 Wave 1 of the Chapel integration plan (docs/handover/TODO.md).
Adds `ProverDispatcher::verify_proof_parallel(content)` which, under
`--features chapel` plus a live Chapel runtime, fans out to up to 30
prover backends via the Zig FFI bridge (echidna_prove_parallel) and
routes the first successful result through the standard trust pipeline
(axiom tracker, integrity check, trust-level scoring) before returning
a DispatchResult.
Falls back to the sequential `verify_proof` path (selected by the
existing content-sniff heuristic) whenever:
- the `chapel` Cargo feature is not compiled in, or
- `ChapelParallelSearch::new()` reports the runtime unavailable, or
- the parallel search errors out, or
- parallel search returns no winner (so callers still get a real
pipeline answer instead of a bare failure).
Trust level for a Chapel-parallel win is computed as a single
confirming prover (PortfolioConfidence::SingleSolver) — parallel
first-wins is a dispatch speedup, not cross-checking. Cross-checked
portfolios remain on `verify_proof_cross_checked`; Wave 2 will extend
Chapel to portfolio quorum.
Tests:
- `test_verify_proof_parallel_falls_back_without_chapel` exercises the
no-feature path end-to-end (runs in default CI).
- `test_verify_proof_parallel_chapel_path` exercises the feature-gated
path; runs under `cargo test --features chapel` (chapel-ci.yml job 3).
Verified:
- `cargo check --lib` clean on pristine main + this change.
- `cargo check --lib --features chapel` clean (one pre-existing
dead_code warning on echidna_chapel_is_prover_available, unrelated).
- `cargo test --lib dispatch::` — 15/15 pass including the new
fallback test.
Per the Hyperpolymath "wire everything" rule, this removes the
ChapelParallelSearch orphan code path: proof_search.rs had the
strategy implemented but nothing in dispatch.rs called it. The L2.1
gap identified in TODO.md ("dispatch.rs still bypasses the
feature-gated ChapelParallelSearch strategy") is now closed.
SPDX-License-Identifier: PMPL-1.0-or-later
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments