Wave 5.3 — premise-expiry checks for quality_tolerance and cost-as-tiebreak #97
Reference in New Issue
Block a user
Delete Branch "feat/wave53-premise-expiry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Wave 5.3 — premise-expiry checks for
quality_toleranceand cost-as-tiebreakTwo new
/metricsdetector pairs following the Wave 1.4 cache-rate precedent (series + warning with a minimum-observation floor, wired intoscoring_coverage), plus three config.yaml comment rewrites.Changes
src/metrics.py:proficiency_sample_depth_series/proficiency_sample_depth_warnings: average proficiency sample depth (outcome_samples + self_eval_samples) per category and overall. Warns"quality_tolerance premise expired:"once depth crossesobjective.proficiency_depth_warn_min_sampleswith 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/cumulative_spend_warnings: all-timeSUM(cost_usd)fromenergy_observations(excluding seed_reference rows, per-provider breakdown). Warns"cost-as-tiebreak premise expired:"once spend passesobjective.cumulative_spend_warn_usd— the "$0.07 / fractions of a cent" figure in the blend comment was off by orders of magnitude.scoring_coverage()in the same assembly pattern as the cache-rate pair.src/config.py:Optionalknobs on theObjectiveStrictModel:proficiency_depth_warn_min_samples,proficiency_depth_warn_min_rows,cumulative_spend_warn_usd,cumulative_spend_warn_min_rows, with> 0validators.config/config.yaml:objective:with values and comments.quality_toleranceand the cost-as-tiebreak/blend section now reference the live check function names instead of embedding a stale snapshot number;pinch.relevance.enablednow describes its actual ON-by-default state and the budget-gate rationale from commit69662f0, correcting the old "off by default... then decide the default" text that was never updated when the decision was made.tests/test_metrics.py:scoring_coverage.tests/test_admin_knob_coverage.py:_CONFIG_ALLOWLIST— the gate requires every scalar leaf of the config to be reachable.Verification against live production DB
Both checks correctly fire against real data (read-only probe to the shared checkout's
router.db):coding_generalavg 42.3,coding_refactor21.6,tool_use_agentic21.9) exceed the 20-sample threshold, firing per-category warnings.neuralwatt$119.11) warnings — 1,771× the "$0.07" the old comment cited.Suite
Full suite: 2163 passed, 0 failed.