Wave 5.3 — premise-expiry checks for quality_tolerance and cost-as-tiebreak #97

Merged
alee merged 1 commits from feat/wave53-premise-expiry into main 2026-09-19 15:57:02 +00:00

1 Commits

Author SHA1 Message Date
adlee-was-taken
3400c3ca73 feat(metrics): premise-expiry checks for quality_tolerance and cost-as-tiebreak
Two new /metrics detector pairs following the Wave 1.4 cache-rate precedent
(series + warning with a minimum-observation floor, wired into
scoring_coverage):

- proficiency_sample_depth_series/_warnings: average proficiency sample
  depth (outcome_samples + self_eval_samples) per category and overall.
  Warns 'quality_tolerance premise expired:' once depth crosses
  objective.proficiency_depth_warn_min_samples with enough rows on the
  table — the '2-3 samples per category' justification for the loose
  tolerance is now enforced by the check, not memory.
- cumulative_spend_series/_warnings: all-time SUM(cost_usd) from
  energy_observations excluding seed_reference rows, with per-provider
  breakdown. Warns 'cost-as-tiebreak premise expired:' once spend passes
  objective.cumulative_spend_warn_usd — the '$0.07 / fractions of a cent'
  figure in the blend comment was off by orders of magnitude.

Four objective knobs (Optional, >0 validators, real values + comments in
config.yaml, deliberate-absent entries in the admin-knob gate) and three
config.yaml comment rewrites: the two stale justifications now reference
the live check function names instead of hardcoded numbers, and the
pinch.relevance.enabled comment now describes the actual ON-by-default
state and its budget-gate rationale (commit 69662f0) instead of the
pre-decision text.

Full suite: 2163 passed, 0 failed.
2026-09-18 23:46:48 -04:00