Commit graph

3 commits

Author SHA1 Message Date
Shay
2bb57a868f feat(adr-0243): Phase 4 falsifiability benchmark — metrics eval + CLI dispatcher
Completes ADR-0243 Phase 4 (plan §5). Adds the metrics benchmark scoring the
cognitive lifecycle against concrete falsifiable comparison classes, joining the
already-committed decisive propositional falsifier (bdf8146a) under one eval package.

evals/adr_0243_cognitive_lifecycle/benchmark.py — five falsifiable metrics, each
grounded in a live lifecycle primitive (no decorative numbers); typed
BenchmarkVerdict / MetricResult; deterministic, JSON-safe:
  - fidelity: decode overlap |<psi_steady, target>| after relax_to_ground on a
    quadratic well from a perturbed start (min >= 0.999; measured 1.0).
  - surprise separation: energy-above-ground of ID (small rotations of the
    identity axis) vs OOD (near-orthogonal rotations into distinct Cl(4,1)
    planes) against a fixed identity well; strict margined separation
    min_ood - max_id > 0.05 (measured 0.834); lam0 verified ~0, not assumed.
  - insertion cost: relaxation certificate.steps_taken — all certified, bounded
    (<= 256), real work (max_steps > 0; measured 22-23).
  - f32 drift over T=1000: unit versor iterated by a fixed rotor with no renorm;
    f64 holds versor closure to 1e-9 (~8e-14 measured) while f32 truncates to
    ~4.7e-5 (ratio ~5.9e8) — the gap motivating ADR-0244 §2.5/§2.6.
  - falsifier: run_propositional_falsifier wrong == 0 (1008 ID + 18 refusal-parity).

evals/adr_0243_cognitive_lifecycle/__main__.py — subcommand dispatcher
(benchmark [default] / corridor / falsifier); non-zero exit on falsification.

tests/test_adr_0243_benchmark.py — pins overall pass, each metric's falsifiable
claim, the genuine f32/f64 drift gap, CLI routing + exit codes, and the A-04
off-serving quarantine.

[Verification]: in-worktree smoke gate 176 passed; fast lane
(-m "not quarantine and not slow" -n auto) 11808 passed, 108 skipped;
serve-quarantine + third-door cohesion + dispatch hygiene 22 passed; Phase 4
tests (benchmark + falsifier) 17 passed; benchmark overall_passed True
(deterministic across runs).
2026-07-17 12:59:24 -07:00
Shay
bdf8146a2b feat(adr-0243): Phase 4 decisive falsifier — field decoder vs ROBDD gold (wrong=0)
The propositional slice of ADR-0243's falsifiability benchmark (plan §5 Phase 4),
the arc's load-bearing evidence. Two mechanism-disjoint engines decide the SAME
enumerated propositional problems:

- Field decoder: propositional_entails (Cl(4,1) wave-field ground energy).
- Gold: generate.proof_chain.entail.evaluate_entailment (exact ROBDD tautology
  check, ADR-0201 keystone) — genuinely independent, not the field checking itself.

A clause→string bridge (render_clause: `a | ~b | c`) lets both engines decide
byte-for-byte the same problem. Result over the enumerated panel (atoms a,b,c;
premise sets size ≤2):

- 1008 satisfiable-premise ID comparisons: field.entailed ⇔ gold is ENTAILED —
  wrong == 0.
- 18 inconsistent-premise cases: field discloses satisfiable_premises=False
  exactly where gold returns REFUSED — matched refusal, no ex-falso leak.
- OOD (>5 atoms): field decoder refuses by construction while gold still decides
  — the honest ID/OOD scope boundary in the propositional domain.

Deterministic (enumerated, no randomness/wall-clock); off-serving (evals/ only,
chat/runtime non-import pinned).

[Verification]: tests/test_adr_0243_propositional_falsifier.py — 6 passed;
run_propositional_falsifier() → wrong=0 over 1026 field-vs-gold decisions.
2026-07-17 12:00:47 -07:00
Shay
40db09b559 feat(adr-0243): Phase 3 Lane B — sensorium corridor eval (I-04 first live consumer)
New evals/adr_0243_cognitive_lifecycle/ composes AudioCompiler/VisionCompiler ->
sensorium_wave_feed -> relax_to_ground/CognitiveLifecycleEngine.egress ->
generate/realizer readback -> explicit GoldTetherMonitor.decide into one
deterministic fixed-replay corridor, per
docs/handoff/ADR-0243-PHASE3-BRIEF-PACK.md Brief B. Pure composition of
already-tested organs; no new core.physics module; OFF-SERVING (evals/ only,
never imported by chat/runtime.py).

Relaxation targets the full audio+vision integrated percept but starts from the
audio-only partial percept (engine.solve() is not used, since it ties start ==
target) so the relaxer decodes across real steps rather than starting
already-converged; stages are driven explicitly and reassembled into one
LifecycleOutcome keyed off the full percept.

[Verification]: uv run core test --suite smoke -q (176 passed); sensorium suite
(152 passed); algebra suite (82 passed, 50 skipped); new
tests/test_adr_0243_sensorium_corridor.py (6 passed, includes a
steps_taken > 0 pin against silent regression to a no-op relax, a cosine/ANN-free
static pin, and a chat/runtime.py non-import pin).
2026-07-17 11:26:19 -07:00