Skip to content

Commit 83bc21b

Browse files
hyperpolymathclaude
andcommitted
feat(meta-controller): Phase 7 — Pareto + Bayesian routing across (prover × coprocessor × aspect)
Closes the architectural loop: 11 coprocessor backends + 100+ provers existed before this commit but the routing brain only knew about Math and 3 aspects. Phase 7 wires: **Full coprocessor registry** — `MetaController::new()` iterates the known `CoprocessorKind` variants and asks `CoprocessorFactory::native` for each, registering whatever's available. 10 always-on (Math / Vector / Tensor / Crypto / Physics / Dsp / Io / Graphics / Audio / Fpga) + FlintMath when `--features flint`. **Broad aspect taxonomy** — 22 aspect → coprocessor-op mappings cover: - Arithmetic (gcd/lcm/modexp/modinv/primality/factor) - Polynomial algebra (FLINT) - Linear algebra (Vector dot/norm, Tensor matmul/det) - Crypto (sha256/blake3/ed25519-verify) - Physics (RK4 step, harmonic energy) - Signal (FFT, Hann window) - IO (file hash, line count) - Visualisation (proof-graph SVG) - Audio (completion chime) - Hardware (yosys synth) FLINT-routed aspects gracefully filter to empty when the backend isn't linked — no failure path; controller routes around. **Pareto + Bayesian** — `plan_with_pareto(goal, candidates, default_timeout, default_trust)` builds a `ProofCandidate` per prover, populates predicted proof_time from the StatisticsTracker mean (or default when absent), runs `ParetoFrontier::compute`, picks from frontier via weighted_rank favouring time. Falls back to `plan` when no candidates supplied. Reuses the existing pareto.rs + statistics.rs surfaces — no new infra invented. **Outcome recording** — `record_outcome(plan, goal, outcome, elapsed_ms)` flows Success/Timeout/Failure back to the StatisticsTracker keyed by (prover, primary-aspect-as-domain). No-op when stats absent. **Plan enrichment** — `Plan` now carries: - `estimated_timeout_ms` (Bayesian per-tuple, falls back to default) - `rationale` (human-readable diagnostic — pareto vs heuristic vs preferred) Tests (all green): - registers_all_native_coprocessors (10 or 11 depending on feature) - aspect_routing_covers_each_kind_at_least_once (10 spot-checks) - plan_with_pareto_picks_from_candidates - plan_with_pareto_falls_back_when_no_candidates - record_outcome_with_no_stats_is_noop - record_outcome_updates_stats_when_present (success rate 2/3 verified) - estimate_timeout_uses_stats_when_present (Bayesian estimate < 5 s after ten 100 ms successes; was hitting 30 s default before stats) - flint_aspect_hint_filtered_when_backend_absent panic-attack assail clean (0 weak points). Pre-existing prover-side trust pipeline + 700+ lib tests unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 603cda5 commit 83bc21b

2 files changed

Lines changed: 551 additions & 105 deletions

File tree

.machine_readable/6a2/STATE.a2ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ notes = "5 new CoprocessorKind variants (Dsp/Io/Graphics/Audio/Fpga) with full R
8787
[[expansion-roadmap.phase]]
8888
id = "phase-7"
8989
title = "Meta-control — Pareto over (prover × coprocessor × aspect), Bayesian timeout per-tuple"
90-
status = "blocked-on-phases-1-6"
90+
status = "complete"
91+
landed = "2026-04-27"
9192
adds-backends = []
92-
notes = "Extension to existing MetaController Plan + run_preconditions seam."
93+
notes = "MetaController extended: registers all 11 native coprocessors at construction; aspect routing taxonomy expanded from 3 entries to 22 covering arithmetic / polynomial-algebra / linalg / crypto / physics / signal / IO / visualisation / audio / hardware. Reuses existing `verification::pareto::ParetoFrontier` and `verification::statistics::StatisticsTracker` (no new infra invented). New API: `MetaController::with_stats(tracker)` plugs in a shared StatisticsTracker; `plan_with_pareto(goal, candidate_provers, default_timeout, default_trust)` ranks candidates by predicted (proof_time, trust, memory, steps) and picks from the Pareto frontier; `record_outcome(plan, goal, outcome, elapsed_ms)` flows results back to the tracker. `Plan` now carries `estimated_timeout_ms` (Bayesian per-tuple) and a `rationale` string for trust-pipeline diagnostics. FlintMath aspect-hints filtered when backend absent (graceful no-feature fallback). 8 new tests, all green; full lib still compiles cleanly."
9394

9495
# ═══════════════════════════════════════════════════════════════════════════════
9596
# CRG (Critical Reception Grade) advancement — D→C→B

0 commit comments

Comments
 (0)