You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(review): gate the zero-error label floor at the Bonferroni split delta (#9922)
calibrateActThreshold compared the label count against a floor computed at
the raw delta, but the scan itself tests each candidate at delta/K after
#9066's Bonferroni split. A zero-error calibration set that clears the raw
floor but falls short of the split-delta floor fell through the whole scan
and was misreported as no_certifiable_threshold (an error-rate shortfall)
instead of insufficient_labels (a label-count shortfall), losing #9048's
status split. Also stop reporting a recalibration infra failure as
insufficient_labels in runRiskControlRecalibration's catch.
Co-authored-by: bitfathers94 <237535319+bitfathers94@users.noreply.github.com>
it("REGRESSION (#9048): NO CERTIFIABLE THRESHOLD — ample labels but no λ clears α reports the true total, not a residual stratum, under a distinct event_type",async()=>{
it("a throwing arm recalibration is contained: the OTHER arm still runs and the summary reports insufficient",async()=>{
161
+
it("REGRESSION (#9637): a throwing arm recalibration reports 'error', never a statistical status — an infra failure is not a label shortfall",async()=>{
it("REGRESSION (#9066): does not over-certify across many observed confidence candidates — Bonferroni-splits delta across the K distinct thresholds actually tested",()=>{
92
-
// Same shape the pre-fix code certified at lambda=0.9 (700 clean pairs, 10 distinct confidences, zero
92
+
// Same shape the pre-#9066 code certified at lambda=0.9 (700 clean pairs, 10 distinct confidences, zero
93
93
// errors, alpha=0.005): the RAW zero-error bound at n=700, delta=0.05 is ≈0.0043 (<=0.005, would certify),
94
-
// but split across K=10 candidates (delta/10=0.005) the bound is ≈0.0075 (>0.005) — correctly refuses,
95
-
// because reporting whichever of 10 tested candidates passes first is a selection, not a single test.
94
+
// but split across K=10 candidates (delta/10=0.005) the bound is ≈0.0075 (>0.005) — over-certification is
95
+
// refused. #9637: the label floor at that split delta (1058) is now also enforced up front, so 700 pairs —
96
+
// genuinely short of what 10 candidates need — refuses as `insufficient_labels`, not the pre-#9637
97
+
// `no_certifiable_threshold` (which would have wrongly implied the error rate, not the label count, was
98
+
// the shortfall). Either way `calibrated` must never be reached.
it("REGRESSION (#9637): the split-delta floor, not the raw floor, gates a zero-error set — 59 clean labels across 59 distinct confidences is insufficient, not uncertifiable",()=>{
110
+
// Exactly the raw floor (minimumCalibrationLabels(0.05, 0.05) = 59), so the pre-scan check alone would
111
+
// let this through — but every pair is a distinct confidence (K=59 candidates), so the scan actually
112
+
// tests each candidate at delta/59. The effective floor at that split delta is 138: below it, a
113
+
// ZERO-ERROR set must still refuse as insufficient_labels, not fall through the whole scan into a
114
+
// misleading no_certifiable_threshold (#9048's status split, reintroduced by #9066's Bonferroni
0 commit comments