core/evals/obligation_6_depth_curve
Shay 1f90cb6cf6
feat(ADR-0114a.6): depth-curve auditor — Obligation #6 wired for B3 (assertion holds, coverage gap named) (#190)
Implements the external auditor for ADR-0114a Obligation #6:
"depth_curve.py produces a per-bucket curve;
accuracy(N) >= accuracy(depth_1) * (1 - eps)^(N - 1) for eps = 0.05."

Mirrors PR #189's auditor pattern (re-runs lane via the candidate-
graph pipeline, aggregates over committed cases, emits deterministic
report). Uses len(trace.steps) as the authoritative depth — the
engine's actually-executed reasoning, not the case's declared depth.

New module core/capability/depth_curve.py:
  - Bucket schema mirrors ADR-0119.6: depth_1, depth_2-3,
    depth_4-5, depth_6-8. Depth > 8 raises rather than silently
    extending. Depth == 0 (initial-only problems) skipped — nothing
    to decay.
  - representative_depth = min(bucket) — most permissive bound
    convention; tightening requires an ADR amendment.
  - epsilon = 0.05 pinned per ADR-0120 §Threshold rationale.
  - Two-axis verdict: obligation_6_mechanism_wired (always true if
    auditor ran), obligation_6_assertion_holds (every populated
    bucket satisfies the decay bound), coverage_sufficient (>=2
    buckets populated AND >=3 cases each — required for the
    assertion to be statistically meaningful).

CLI: core capability depth-curve (added to core/cli.py).
Writes evals/obligation_6_depth_curve/<lane_id>.json.

Empirical verdict on current main:
  lane:                B3_bounded_grammar
  cases_total:         50
  cases_solved:        22
  mechanism_wired:     True
  assertion_holds:     True
  coverage_sufficient: False
  populated:           [depth_1 (21/21=1.0000), depth_2-3 (1/1=1.0000)]

Both populated buckets satisfy the decay bound. Coverage gap is
honestly named in the refusal_reason: depth_2-3 has only 1 case,
depth_4-5 and depth_6-8 have none. This is B3-owner work (case
authoring under the existing grammar contract), not auditor work;
reserved as a B3 v1.1 follow-up PR.

Honest scope-limit: B3 only. B1 (algebra, no trace) and B2 (chain
validation, not problem-solving) need different metrics — separate
sub-ADRs.

Trust boundary: read-only access to B3 cases + transitive pack
reads via the pipeline; single deterministic write to artifact path.

Tests: 24/24 covering bucket schema closure (depth 1..8 + raise on
9+), decay bound math (epsilon pinned, formula correct, depth_1 has
no bound), coverage-sufficient policy (thresholds pinned), lane
evaluation (passes on real B3 + refuses on missing cases),
coverage-sufficient distinction (B3 today vs synthetic 5+5 fixture
showing both pass), determinism (report identical + artifact
byte-equal).
2026-05-23 16:19:58 -07:00
..
B3_bounded_grammar.json feat(ADR-0114a.6): depth-curve auditor — Obligation #6 wired for B3 (assertion holds, coverage gap named) (#190) 2026-05-23 16:19:58 -07:00