MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / test_non_overlapping_windows

Function test_non_overlapping_windows

tests/test_shadow.py:29–36  ·  view source on GitHub ↗

Evaluation fires once per eval_window batch, not on every request.

()

Source from the content-addressed store, hash-verified

27
28
29def test_non_overlapping_windows():
30 """Evaluation fires once per eval_window batch, not on every request."""
31 tracker = ShadowTracker(eval_window=5, promote_after=10, min_improvement=-1.0)
32 # Fill 12 records — should fire exactly 2 evaluations (at 5 and 10)
33 for i in range(12):
34 _record(tracker, a_pred=0, b_pred=0, c_pred=0, ens_tier=0, gold=0)
35 # After draining 2 batches of 5, 2 remain pending
36 assert tracker.record_count == 2
37
38
39def test_promotion_after_consecutive_wins():

Callers

nothing calls this directly

Calls 2

ShadowTrackerClass · 0.90
_recordFunction · 0.85

Tested by

no test coverage detected