Signal B promoted after enough consecutive positive windows (via replay). For B to tip the replay, A and C must be close. We use A=0(conf=0.51), C=1(conf=0.49) so 2-sig picks tier 0. With B=1(conf=0.9), 3-sig tips to tier 1.
()
| 37 | |
| 38 | |
| 39 | def test_promotion_after_consecutive_wins(): |
| 40 | """Signal B promoted after enough consecutive positive windows (via replay). |
| 41 | |
| 42 | For B to tip the replay, A and C must be close. We use A=0(conf=0.51), |
| 43 | C=1(conf=0.49) so 2-sig picks tier 0. With B=1(conf=0.9), 3-sig tips to tier 1. |
| 44 | """ |
| 45 | tracker = ShadowTracker(eval_window=10, promote_after=2, min_improvement=0.0) |
| 46 | |
| 47 | for _window in range(2): |
| 48 | for _ in range(5): |
| 49 | # 2-sig: tier 0 (A barely wins). 3-sig: B tips to tier 1. gold=1 → B helps. |
| 50 | _record(tracker, a_pred=0, b_pred=1, c_pred=1, ens_tier=0, gold=1, |
| 51 | a_conf=0.51, b_conf=0.9, c_conf=0.49) |
| 52 | for _ in range(5): |
| 53 | # All agree, no impact |
| 54 | _record(tracker, a_pred=0, b_pred=0, c_pred=0, ens_tier=0, gold=0) |
| 55 | |
| 56 | assert tracker.promoted |
| 57 | |
| 58 | |
| 59 | def test_no_promotion_when_b_hurts(): |
nothing calls this directly
no test coverage detected