FA-74816 / Experiment statistics / Open access
Switchback carryover washout: Events are assigned to the nearest block · case 01
Events late in a block are credited to the next block's arm.
ROOT CAUSE
The block index is round(minute / block_len).
VERIFIED REPAIR
Use floor division minute // block_len.
Unsuccessful approach: Shifting by one minute moves block-start events into the previous block.
Case contract
Time is split into blocks of block_len minutes; block b runs schedule[b % len(schedule)]. Events [minute, value] in the first washout minutes of a block are excluded only when that block's arm differs from the previous block's arm (block 0 has no previous block). Return [mean A, mean B, excluded count] with None for an arm without events.
Why this case matters
Switchback experiments on marketplaces must discard carryover right after each switch.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events, block_len, washout, schedule):
sums = {'A': 0.0, 'B': 0.0}
counts = {'A': 0, 'B': 0}
excluded = 0
for minute, value in events:
b = round(minute / block_len)
arm = schedule[b % len(schedule)]
prev = schedule[(b - 1) % len(schedule)] if b > 0 else arm
if prev != arm and minute - b * block_len < washout:
excluded += 1
continue
sums[arm] += value
counts[arm] += 1
means = [round(sums[k] / counts[k], 6) if counts[k] else None for k in ('A', 'B')]
return means + [excluded]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),
('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),
('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 1',
[[[99, 2], [56, 1], [112, 1], [41, 10], [149, 2], [27, 1], [159, 1]], 60, 5, ['B', 'A', 'A', 'B']],
[1.5, 4.0, 0]),
('switchback sample 2',
[[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],
[7.666667, None, 2])],
[('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),
('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 6',
[[[208, 2], [14, 10], [126, 1], [28, 10], [215, 2], [149, 3], [156, 2]], 60, 10, ['A', 'A', 'B']],
[6.0, 2.5, 1]),
('switchback sample 52',
[[[2, 2], [3, 3], [25, 1], [10, 10], [7, 3], [17, 3]], 10, 0, ['A', 'B', 'B']],
[2.666667, 4.666667, 0])],
[('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('switchback sample 11',
[[[1, 1], [35, 3], [7, 10], [11, 2], [26, 3]], 10, 10, ['A', 'B']],
[5.5, None, 3]),
('switchback sample 15',
[[[94, 2], [33, 3], [40, 3], [77, 2]], 30, 0, ['B', 'A', 'A', 'B']],
[2.666667, 2.0, 0]),
('switchback sample 23',
[[[14, 3], [37, 2], [5, 2], [0, 3]], 10, 10, ['A', 'A', 'B']],
[2.666667, None, 1])],
[('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 16', [[[104, 10], [75, 1], [9, 3]], 30, 10, ['A', 'A', 'B']], [6.5, 1.0, 0]),
('switchback sample 25',
[[[3, 1], [68, 10], [66, 2], [84, 10], [10, 2], [11, 10]], 30, 0, ['A', 'B', 'B']],
[4.333333, 7.333333, 0]),
('switchback sample 59',
[[[20, 3], [23, 1], [39, 3], [2, 1], [7, 1], [30, 1], [27, 10]], 10, 5, ['A', 'A', 'B']],
[1.666667, 10.0, 3])],
[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),
('switchback sample 35',
[[[31, 10], [15, 10], [71, 10], [211, 3], [196, 10], [195, 1], [59, 2], [108, 3]],
60,
10,
['A', 'A', 'B']],
[6.125, None, 0]),
('switchback sample 46',
[[[30, 1], [12, 2], [34, 3], [34, 1]], 10, 10, ['B', 'A', 'A', 'B']],
[None, None, 4])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| no washout when the arm repeats | [5.0, None, 1] | [5.0, None, 1] | Passed |
| washout after a switch | [None, None, 2] | [None, 2.0, 1] | Failed |
| washout boundary is exclusive | [None, 7.0, 1] | [None, 7.0, 1] | Passed |
| block boundary minute starts the new block | [None, 4.0, 1] | [3.0, 4.0, 0] | Failed |
| opening minutes are kept when the schedule ends on the other arm | [4.0, 6.0, 0] | [4.0, 6.0, 0] | Passed |
| late minute in a block rounds down | [None, None, 1] | [None, 6.0, 0] | Failed |
| switchback sample 1 | [1.666667, 1.0, 3] | [1.5, 4.0, 0] | Failed |
| switchback sample 2 | [6.5, None, 3] | [7.666667, None, 2] | Failed |
SHA-256 / a804f1889e133ae10831ed04b6b824ee5260526a413c76dfd2cdf4b217d0d5f6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events, block_len, washout, schedule):
sums = {'A': 0.0, 'B': 0.0}
counts = {'A': 0, 'B': 0}
excluded = 0
for minute, value in events:
b = (minute - 1) // block_len
arm = schedule[b % len(schedule)]
prev = schedule[(b - 1) % len(schedule)] if b > 0 else arm
if prev != arm and minute - b * block_len < washout:
excluded += 1
continue
sums[arm] += value
counts[arm] += 1
means = [round(sums[k] / counts[k], 6) if counts[k] else None for k in ('A', 'B')]
return means + [excluded]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),
('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),
('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 1',
[[[99, 2], [56, 1], [112, 1], [41, 10], [149, 2], [27, 1], [159, 1]], 60, 5, ['B', 'A', 'A', 'B']],
[1.5, 4.0, 0]),
('switchback sample 2',
[[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],
[7.666667, None, 2])],
[('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),
('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 6',
[[[208, 2], [14, 10], [126, 1], [28, 10], [215, 2], [149, 3], [156, 2]], 60, 10, ['A', 'A', 'B']],
[6.0, 2.5, 1]),
('switchback sample 52',
[[[2, 2], [3, 3], [25, 1], [10, 10], [7, 3], [17, 3]], 10, 0, ['A', 'B', 'B']],
[2.666667, 4.666667, 0])],
[('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('switchback sample 11',
[[[1, 1], [35, 3], [7, 10], [11, 2], [26, 3]], 10, 10, ['A', 'B']],
[5.5, None, 3]),
('switchback sample 15',
[[[94, 2], [33, 3], [40, 3], [77, 2]], 30, 0, ['B', 'A', 'A', 'B']],
[2.666667, 2.0, 0]),
('switchback sample 23',
[[[14, 3], [37, 2], [5, 2], [0, 3]], 10, 10, ['A', 'A', 'B']],
[2.666667, None, 1])],
[('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 16', [[[104, 10], [75, 1], [9, 3]], 30, 10, ['A', 'A', 'B']], [6.5, 1.0, 0]),
('switchback sample 25',
[[[3, 1], [68, 10], [66, 2], [84, 10], [10, 2], [11, 10]], 30, 0, ['A', 'B', 'B']],
[4.333333, 7.333333, 0]),
('switchback sample 59',
[[[20, 3], [23, 1], [39, 3], [2, 1], [7, 1], [30, 1], [27, 10]], 10, 5, ['A', 'A', 'B']],
[1.666667, 10.0, 3])],
[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),
('switchback sample 35',
[[[31, 10], [15, 10], [71, 10], [211, 3], [196, 10], [195, 1], [59, 2], [108, 3]],
60,
10,
['A', 'A', 'B']],
[6.125, None, 0]),
('switchback sample 46',
[[[30, 1], [12, 2], [34, 3], [34, 1]], 10, 10, ['B', 'A', 'A', 'B']],
[None, None, 4])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| no washout when the arm repeats | [5.0, None, 1] | [5.0, None, 1] | Passed |
| washout after a switch | [None, 2.0, 1] | [None, 2.0, 1] | Passed |
| washout boundary is exclusive | [None, 7.0, 1] | [None, 7.0, 1] | Passed |
| block boundary minute starts the new block | [3.5, None, 0] | [3.0, 4.0, 0] | Failed |
| opening minutes are kept when the schedule ends on the other arm | [4.0, 6.0, 0] | [4.0, 6.0, 0] | Passed |
| late minute in a block rounds down | [None, 6.0, 0] | [None, 6.0, 0] | Passed |
| switchback sample 1 | [1.5, 4.0, 0] | [1.5, 4.0, 0] | Passed |
| switchback sample 2 | [10.0, 3.0, 2] | [7.666667, None, 2] | Failed |
SHA-256 / 3da0b1c0b1fa907ed164f2a8ce62f4321426a5d8d3bf460a0c599b4c67e587ee
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events, block_len, washout, schedule):
sums = {'A': 0.0, 'B': 0.0}
counts = {'A': 0, 'B': 0}
excluded = 0
for minute, value in events:
b = minute // block_len
arm = schedule[b % len(schedule)]
prev = schedule[(b - 1) % len(schedule)] if b > 0 else arm
if prev != arm and minute - b * block_len < washout:
excluded += 1
continue
sums[arm] += value
counts[arm] += 1
means = [round(sums[k] / counts[k], 6) if counts[k] else None for k in ('A', 'B')]
return means + [excluded]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),
('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),
('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 1',
[[[99, 2], [56, 1], [112, 1], [41, 10], [149, 2], [27, 1], [159, 1]], 60, 5, ['B', 'A', 'A', 'B']],
[1.5, 4.0, 0]),
('switchback sample 2',
[[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],
[7.666667, None, 2])],
[('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),
('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 6',
[[[208, 2], [14, 10], [126, 1], [28, 10], [215, 2], [149, 3], [156, 2]], 60, 10, ['A', 'A', 'B']],
[6.0, 2.5, 1]),
('switchback sample 52',
[[[2, 2], [3, 3], [25, 1], [10, 10], [7, 3], [17, 3]], 10, 0, ['A', 'B', 'B']],
[2.666667, 4.666667, 0])],
[('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),
('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('switchback sample 11',
[[[1, 1], [35, 3], [7, 10], [11, 2], [26, 3]], 10, 10, ['A', 'B']],
[5.5, None, 3]),
('switchback sample 15',
[[[94, 2], [33, 3], [40, 3], [77, 2]], 30, 0, ['B', 'A', 'A', 'B']],
[2.666667, 2.0, 0]),
('switchback sample 23',
[[[14, 3], [37, 2], [5, 2], [0, 3]], 10, 10, ['A', 'A', 'B']],
[2.666667, None, 1])],
[('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 16', [[[104, 10], [75, 1], [9, 3]], 30, 10, ['A', 'A', 'B']], [6.5, 1.0, 0]),
('switchback sample 25',
[[[3, 1], [68, 10], [66, 2], [84, 10], [10, 2], [11, 10]], 30, 0, ['A', 'B', 'B']],
[4.333333, 7.333333, 0]),
('switchback sample 59',
[[[20, 3], [23, 1], [39, 3], [2, 1], [7, 1], [30, 1], [27, 10]], 10, 5, ['A', 'A', 'B']],
[1.666667, 10.0, 3])],
[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),
('opening minutes are kept when the schedule ends on the other arm',
[[[1, 4], [40, 6]], 30, 5, ['A', 'B']],
[4.0, 6.0, 0]),
('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),
('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),
('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),
('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),
('switchback sample 35',
[[[31, 10], [15, 10], [71, 10], [211, 3], [196, 10], [195, 1], [59, 2], [108, 3]],
60,
10,
['A', 'A', 'B']],
[6.125, None, 0]),
('switchback sample 46',
[[[30, 1], [12, 2], [34, 3], [34, 1]], 10, 10, ['B', 'A', 'A', 'B']],
[None, None, 4])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| no washout when the arm repeats | [5.0, None, 1] | [5.0, None, 1] | Passed |
| washout after a switch | [None, 2.0, 1] | [None, 2.0, 1] | Passed |
| washout boundary is exclusive | [None, 7.0, 1] | [None, 7.0, 1] | Passed |
| block boundary minute starts the new block | [3.0, 4.0, 0] | [3.0, 4.0, 0] | Passed |
| opening minutes are kept when the schedule ends on the other arm | [4.0, 6.0, 0] | [4.0, 6.0, 0] | Passed |
| late minute in a block rounds down | [None, 6.0, 0] | [None, 6.0, 0] | Passed |
| switchback sample 1 | [1.5, 4.0, 0] | [1.5, 4.0, 0] | Passed |
| switchback sample 2 | [7.666667, None, 2] | [7.666667, None, 2] | Passed |
SHA-256 / ed9cf3a427bc6d76d1acedfa4e3b1082965f47cfa189be6e0f869894f000c58a
Verification & scope
A deterministic toy experiment-analysis model with a stipulated contract; results are rounded and are not a substitute for a validated statistics package. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:49:00.283600+00:00.
Case digest / 71eb0058c1eee6f792fa7f9296e040078c3d6a6f90b105327e848e092d4771c3