Repository navigation
v0.5.24 — Benchmark regression gate for CI (Loop 5) - #136
Merged
Merged
Conversation
Add CI benchmark gate that fails PRs when AUROC drops > 0.02 vs committed baseline. New: - scripts/benchmark_gate.py: standalone script that runs all 6 benchmarks via build_metrics_snapshot(), compares standard/phase3 AUROC against committed baseline, exits 0 (PASS) / 1 (FAIL) / 2 (no baseline) - tests/test_benchmark_gate.py: 13 tests covering pass/fail/report/CLI paths - Makefile bench-gate target: make bench-gate runs the gate with tolerance 0.02 CI changes (.github/workflows/ci.yml): - New step 'Benchmark regression gate' between leakage and hidden-active checks - Runs 'make bench-gate' — fails CI if standard.auroc drops > 0.02 Total tests: 1682 passing (+13 from v0.5.23) docs/50_LOOP_PLAN.md: Loop 5 marked complete, position advanced to Loop 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chosen bottleneck
Bottleneck: No CI benchmark regression gate — AUROC can silently degrade as scorers or weights change. The committed
outputs/metrics_snapshot.jsonexisted but was never compared against in CI.Why it matters
The scratch-built scoring pipeline's headline metric is
standard.auroc = 0.7832. Without a regression gate, any PR that changes scorers, weights, or defaults can silently degrade this without being caught. The hidden-active gate (EF >= 1.5) catches a different failure mode. The AUROC gate catches general scoring quality regression.Changes
New:
scripts/benchmark_gate.pybuild_metrics_snapshot()(same asmake metrics-snapshot)standard.aurocandphase3.aurocagainst committed baselinemake bench-gatewith tolerance 0.02New:
tests/test_benchmark_gate.py(13 tests)run_benchmark_gate()comparison logic (9 tests)Updated:
.github/workflows/ci.ymlmake bench-gatebetween leakage check and hidden-active gateUpdated:
docs/50_LOOP_PLAN.mdUpdated:
Makefilebench-gatetarget addedhelptext includes bench-gate descriptionVerification
make bench-gateexits 0 (AUROC matches baseline exactly: 0.7832 → 0.7832)Risks / uncertainties
n_bootstrap=200(default) in CI; the committed baseline uses 2000. This is fine — the AUROC point estimate is stable at 200 iterations for this dataset size.outputs/metrics_snapshot.json). This is by design.Recommended next loop
Loop 6: Deterministic
make regenerate-allscript that rebuilds all derived outputs from versioned inputs.