{"abstract":"Events late in a block are credited to the next block's arm.","category":"Experiment statistics","checks":8,"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.","evaluation_group":"w2-experiment-statistics-switchback-washout","failed_approach":"Shifting by one minute moves block-start events into the previous block.","family":"w2-experiment-statistics-switchback-washout-block-index","id":"FA-74816","implementations":{"attempt":{"sha256":"3da0b1c0b1fa907ed164f2a8ce62f4321426a5d8d3bf460a0c599b4c67e587ee","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, block_len, washout, schedule):\n    sums = {'A': 0.0, 'B': 0.0}\n    counts = {'A': 0, 'B': 0}\n    excluded = 0\n    for minute, value in events:\n        b = (minute - 1) // block_len\n        arm = schedule[b % len(schedule)]\n        prev = schedule[(b - 1) % len(schedule)] if b > 0 else arm\n        if prev != arm and minute - b * block_len < washout:\n            excluded += 1\n            continue\n        sums[arm] += value\n        counts[arm] += 1\n    means = [round(sums[k] / counts[k], 6) if counts[k] else None for k in ('A', 'B')]\n    return means + [excluded]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),\n  ('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),\n  ('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 1',\n   [[[99, 2], [56, 1], [112, 1], [41, 10], [149, 2], [27, 1], [159, 1]], 60, 5, ['B', 'A', 'A', 'B']],\n   [1.5, 4.0, 0]),\n  ('switchback sample 2',\n   [[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],\n   [7.666667, None, 2])],\n [('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),\n  ('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 6',\n   [[[208, 2], [14, 10], [126, 1], [28, 10], [215, 2], [149, 3], [156, 2]], 60, 10, ['A', 'A', 'B']],\n   [6.0, 2.5, 1]),\n  ('switchback sample 52',\n   [[[2, 2], [3, 3], [25, 1], [10, 10], [7, 3], [17, 3]], 10, 0, ['A', 'B', 'B']],\n   [2.666667, 4.666667, 0])],\n [('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('switchback sample 11',\n   [[[1, 1], [35, 3], [7, 10], [11, 2], [26, 3]], 10, 10, ['A', 'B']],\n   [5.5, None, 3]),\n  ('switchback sample 15',\n   [[[94, 2], [33, 3], [40, 3], [77, 2]], 30, 0, ['B', 'A', 'A', 'B']],\n   [2.666667, 2.0, 0]),\n  ('switchback sample 23',\n   [[[14, 3], [37, 2], [5, 2], [0, 3]], 10, 10, ['A', 'A', 'B']],\n   [2.666667, None, 1])],\n [('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 16', [[[104, 10], [75, 1], [9, 3]], 30, 10, ['A', 'A', 'B']], [6.5, 1.0, 0]),\n  ('switchback sample 25',\n   [[[3, 1], [68, 10], [66, 2], [84, 10], [10, 2], [11, 10]], 30, 0, ['A', 'B', 'B']],\n   [4.333333, 7.333333, 0]),\n  ('switchback sample 59',\n   [[[20, 3], [23, 1], [39, 3], [2, 1], [7, 1], [30, 1], [27, 10]], 10, 5, ['A', 'A', 'B']],\n   [1.666667, 10.0, 3])],\n [('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),\n  ('switchback sample 35',\n   [[[31, 10], [15, 10], [71, 10], [211, 3], [196, 10], [195, 1], [59, 2], [108, 3]],\n    60,\n    10,\n    ['A', 'A', 'B']],\n   [6.125, None, 0]),\n  ('switchback sample 46',\n   [[[30, 1], [12, 2], [34, 3], [34, 1]], 10, 10, ['B', 'A', 'A', 'B']],\n   [None, None, 4])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a804f1889e133ae10831ed04b6b824ee5260526a413c76dfd2cdf4b217d0d5f6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, block_len, washout, schedule):\n    sums = {'A': 0.0, 'B': 0.0}\n    counts = {'A': 0, 'B': 0}\n    excluded = 0\n    for minute, value in events:\n        b = round(minute / block_len)\n        arm = schedule[b % len(schedule)]\n        prev = schedule[(b - 1) % len(schedule)] if b > 0 else arm\n        if prev != arm and minute - b * block_len < washout:\n            excluded += 1\n            continue\n        sums[arm] += value\n        counts[arm] += 1\n    means = [round(sums[k] / counts[k], 6) if counts[k] else None for k in ('A', 'B')]\n    return means + [excluded]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),\n  ('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),\n  ('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 1',\n   [[[99, 2], [56, 1], [112, 1], [41, 10], [149, 2], [27, 1], [159, 1]], 60, 5, ['B', 'A', 'A', 'B']],\n   [1.5, 4.0, 0]),\n  ('switchback sample 2',\n   [[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],\n   [7.666667, None, 2])],\n [('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),\n  ('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 6',\n   [[[208, 2], [14, 10], [126, 1], [28, 10], [215, 2], [149, 3], [156, 2]], 60, 10, ['A', 'A', 'B']],\n   [6.0, 2.5, 1]),\n  ('switchback sample 52',\n   [[[2, 2], [3, 3], [25, 1], [10, 10], [7, 3], [17, 3]], 10, 0, ['A', 'B', 'B']],\n   [2.666667, 4.666667, 0])],\n [('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('switchback sample 11',\n   [[[1, 1], [35, 3], [7, 10], [11, 2], [26, 3]], 10, 10, ['A', 'B']],\n   [5.5, None, 3]),\n  ('switchback sample 15',\n   [[[94, 2], [33, 3], [40, 3], [77, 2]], 30, 0, ['B', 'A', 'A', 'B']],\n   [2.666667, 2.0, 0]),\n  ('switchback sample 23',\n   [[[14, 3], [37, 2], [5, 2], [0, 3]], 10, 10, ['A', 'A', 'B']],\n   [2.666667, None, 1])],\n [('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 16', [[[104, 10], [75, 1], [9, 3]], 30, 10, ['A', 'A', 'B']], [6.5, 1.0, 0]),\n  ('switchback sample 25',\n   [[[3, 1], [68, 10], [66, 2], [84, 10], [10, 2], [11, 10]], 30, 0, ['A', 'B', 'B']],\n   [4.333333, 7.333333, 0]),\n  ('switchback sample 59',\n   [[[20, 3], [23, 1], [39, 3], [2, 1], [7, 1], [30, 1], [27, 10]], 10, 5, ['A', 'A', 'B']],\n   [1.666667, 10.0, 3])],\n [('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),\n  ('switchback sample 35',\n   [[[31, 10], [15, 10], [71, 10], [211, 3], [196, 10], [195, 1], [59, 2], [108, 3]],\n    60,\n    10,\n    ['A', 'A', 'B']],\n   [6.125, None, 0]),\n  ('switchback sample 46',\n   [[[30, 1], [12, 2], [34, 3], [34, 1]], 10, 10, ['B', 'A', 'A', 'B']],\n   [None, None, 4])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"ed9cf3a427bc6d76d1acedfa4e3b1082965f47cfa189be6e0f869894f000c58a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events, block_len, washout, schedule):\n    sums = {'A': 0.0, 'B': 0.0}\n    counts = {'A': 0, 'B': 0}\n    excluded = 0\n    for minute, value in events:\n        b = minute // block_len\n        arm = schedule[b % len(schedule)]\n        prev = schedule[(b - 1) % len(schedule)] if b > 0 else arm\n        if prev != arm and minute - b * block_len < washout:\n            excluded += 1\n            continue\n        sums[arm] += value\n        counts[arm] += 1\n    means = [round(sums[k] / counts[k], 6) if counts[k] else None for k in ('A', 'B')]\n    return means + [excluded]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),\n  ('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),\n  ('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 1',\n   [[[99, 2], [56, 1], [112, 1], [41, 10], [149, 2], [27, 1], [159, 1]], 60, 5, ['B', 'A', 'A', 'B']],\n   [1.5, 4.0, 0]),\n  ('switchback sample 2',\n   [[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],\n   [7.666667, None, 2])],\n [('washout after a switch', [[[31, 5], [45, 2]], 30, 10, ['A', 'B']], [None, 2.0, 1]),\n  ('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 6',\n   [[[208, 2], [14, 10], [126, 1], [28, 10], [215, 2], [149, 3], [156, 2]], 60, 10, ['A', 'A', 'B']],\n   [6.0, 2.5, 1]),\n  ('switchback sample 52',\n   [[[2, 2], [3, 3], [25, 1], [10, 10], [7, 3], [17, 3]], 10, 0, ['A', 'B', 'B']],\n   [2.666667, 4.666667, 0])],\n [('washout boundary is exclusive', [[[40, 7], [39, 1]], 30, 10, ['A', 'B']], [None, 7.0, 1]),\n  ('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('switchback sample 11',\n   [[[1, 1], [35, 3], [7, 10], [11, 2], [26, 3]], 10, 10, ['A', 'B']],\n   [5.5, None, 3]),\n  ('switchback sample 15',\n   [[[94, 2], [33, 3], [40, 3], [77, 2]], 30, 0, ['B', 'A', 'A', 'B']],\n   [2.666667, 2.0, 0]),\n  ('switchback sample 23',\n   [[[14, 3], [37, 2], [5, 2], [0, 3]], 10, 10, ['A', 'A', 'B']],\n   [2.666667, None, 1])],\n [('block boundary minute starts the new block', [[[30, 4], [29, 3]], 30, 0, ['A', 'B']], [3.0, 4.0, 0]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 16', [[[104, 10], [75, 1], [9, 3]], 30, 10, ['A', 'A', 'B']], [6.5, 1.0, 0]),\n  ('switchback sample 25',\n   [[[3, 1], [68, 10], [66, 2], [84, 10], [10, 2], [11, 10]], 30, 0, ['A', 'B', 'B']],\n   [4.333333, 7.333333, 0]),\n  ('switchback sample 59',\n   [[[20, 3], [23, 1], [39, 3], [2, 1], [7, 1], [30, 1], [27, 10]], 10, 5, ['A', 'A', 'B']],\n   [1.666667, 10.0, 3])],\n [('no washout when the arm repeats', [[[31, 5], [65, 1]], 30, 10, ['A', 'A', 'B']], [5.0, None, 1]),\n  ('opening minutes are kept when the schedule ends on the other arm',\n   [[[1, 4], [40, 6]], 30, 5, ['A', 'B']],\n   [4.0, 6.0, 0]),\n  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.0, 0]),\n  ('second cycle wraps the schedule', [[[61, 8], [95, 2]], 30, 5, ['A', 'B']], [None, 2.0, 1]),\n  ('late minute in a block rounds down', [[[59, 6]], 30, 0, ['A', 'B']], [None, 6.0, 0]),\n  ('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),\n  ('switchback sample 35',\n   [[[31, 10], [15, 10], [71, 10], [211, 3], [196, 10], [195, 1], [59, 2], [108, 3]],\n    60,\n    10,\n    ['A', 'A', 'B']],\n   [6.125, None, 0]),\n  ('switchback sample 46',\n   [[[30, 1], [12, 2], [34, 3], [34, 1]], 10, 10, ['B', 'A', 'A', 'B']],\n   [None, None, 4])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-experiment-statistics-switchback-washout-block-index","generated_at":"2026-09-29T14:49:00.283600+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Switchback experiments on marketplaces must discard carryover right after each switch.","repair":"Use floor division minute // block_len.","root_cause":"The block index is round(minute / block_len).","sha256":"71eb0058c1eee6f792fa7f9296e040078c3d6a6f90b105327e848e092d4771c3","title":"Switchback carryover washout: Events are assigned to the nearest block · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.659,"exit_code":1,"observations":[{"actual":[5.0,null,1],"check":"no washout when the arm repeats","expected":[5.0,null,1],"passed":true},{"actual":[null,2.0,1],"check":"washout after a switch","expected":[null,2.0,1],"passed":true},{"actual":[null,7.0,1],"check":"washout boundary is exclusive","expected":[null,7.0,1],"passed":true},{"actual":[3.5,null,0],"check":"block boundary minute starts the new block","expected":[3.0,4.0,0],"passed":false},{"actual":[4.0,6.0,0],"check":"opening minutes are kept when the schedule ends on the other arm","expected":[4.0,6.0,0],"passed":true},{"actual":[null,6.0,0],"check":"late minute in a block rounds down","expected":[null,6.0,0],"passed":true},{"actual":[1.5,4.0,0],"check":"switchback sample 1","expected":[1.5,4.0,0],"passed":true},{"actual":[10.0,3.0,2],"check":"switchback sample 2","expected":[7.666667,null,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"no washout when the arm repeats\", \"actual\": [5.0, null, 1], \"expected\": [5.0, null, 1], \"passed\": true}, {\"check\": \"washout after a switch\", \"actual\": [null, 2.0, 1], \"expected\": [null, 2.0, 1], \"passed\": true}, {\"check\": \"washout boundary is exclusive\", \"actual\": [null, 7.0, 1], \"expected\": [null, 7.0, 1], \"passed\": true}, {\"check\": \"block boundary minute starts the new block\", \"actual\": [3.5, null, 0], \"expected\": [3.0, 4.0, 0], \"passed\": false}, {\"check\": \"opening minutes are kept when the schedule ends on the other arm\", \"actual\": [4.0, 6.0, 0], \"expected\": [4.0, 6.0, 0], \"passed\": true}, {\"check\": \"late minute in a block rounds down\", \"actual\": [null, 6.0, 0], \"expected\": [null, 6.0, 0], \"passed\": true}, {\"check\": \"switchback sample 1\", \"actual\": [1.5, 4.0, 0], \"expected\": [1.5, 4.0, 0], \"passed\": true}, {\"check\": \"switchback sample 2\", \"actual\": [10.0, 3.0, 2], \"expected\": [7.666667, null, 2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":49.953,"exit_code":1,"observations":[{"actual":[5.0,null,1],"check":"no washout when the arm repeats","expected":[5.0,null,1],"passed":true},{"actual":[null,null,2],"check":"washout after a switch","expected":[null,2.0,1],"passed":false},{"actual":[null,7.0,1],"check":"washout boundary is exclusive","expected":[null,7.0,1],"passed":true},{"actual":[null,4.0,1],"check":"block boundary minute starts the new block","expected":[3.0,4.0,0],"passed":false},{"actual":[4.0,6.0,0],"check":"opening minutes are kept when the schedule ends on the other arm","expected":[4.0,6.0,0],"passed":true},{"actual":[null,null,1],"check":"late minute in a block rounds down","expected":[null,6.0,0],"passed":false},{"actual":[1.666667,1.0,3],"check":"switchback sample 1","expected":[1.5,4.0,0],"passed":false},{"actual":[6.5,null,3],"check":"switchback sample 2","expected":[7.666667,null,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"no washout when the arm repeats\", \"actual\": [5.0, null, 1], \"expected\": [5.0, null, 1], \"passed\": true}, {\"check\": \"washout after a switch\", \"actual\": [null, null, 2], \"expected\": [null, 2.0, 1], \"passed\": false}, {\"check\": \"washout boundary is exclusive\", \"actual\": [null, 7.0, 1], \"expected\": [null, 7.0, 1], \"passed\": true}, {\"check\": \"block boundary minute starts the new block\", \"actual\": [null, 4.0, 1], \"expected\": [3.0, 4.0, 0], \"passed\": false}, {\"check\": \"opening minutes are kept when the schedule ends on the other arm\", \"actual\": [4.0, 6.0, 0], \"expected\": [4.0, 6.0, 0], \"passed\": true}, {\"check\": \"late minute in a block rounds down\", \"actual\": [null, null, 1], \"expected\": [null, 6.0, 0], \"passed\": false}, {\"check\": \"switchback sample 1\", \"actual\": [1.666667, 1.0, 3], \"expected\": [1.5, 4.0, 0], \"passed\": false}, {\"check\": \"switchback sample 2\", \"actual\": [6.5, null, 3], \"expected\": [7.666667, null, 2], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.921,"exit_code":0,"observations":[{"actual":[5.0,null,1],"check":"no washout when the arm repeats","expected":[5.0,null,1],"passed":true},{"actual":[null,2.0,1],"check":"washout after a switch","expected":[null,2.0,1],"passed":true},{"actual":[null,7.0,1],"check":"washout boundary is exclusive","expected":[null,7.0,1],"passed":true},{"actual":[3.0,4.0,0],"check":"block boundary minute starts the new block","expected":[3.0,4.0,0],"passed":true},{"actual":[4.0,6.0,0],"check":"opening minutes are kept when the schedule ends on the other arm","expected":[4.0,6.0,0],"passed":true},{"actual":[null,6.0,0],"check":"late minute in a block rounds down","expected":[null,6.0,0],"passed":true},{"actual":[1.5,4.0,0],"check":"switchback sample 1","expected":[1.5,4.0,0],"passed":true},{"actual":[7.666667,null,2],"check":"switchback sample 2","expected":[7.666667,null,2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"no washout when the arm repeats\", \"actual\": [5.0, null, 1], \"expected\": [5.0, null, 1], \"passed\": true}, {\"check\": \"washout after a switch\", \"actual\": [null, 2.0, 1], \"expected\": [null, 2.0, 1], \"passed\": true}, {\"check\": \"washout boundary is exclusive\", \"actual\": [null, 7.0, 1], \"expected\": [null, 7.0, 1], \"passed\": true}, {\"check\": \"block boundary minute starts the new block\", \"actual\": [3.0, 4.0, 0], \"expected\": [3.0, 4.0, 0], \"passed\": true}, {\"check\": \"opening minutes are kept when the schedule ends on the other arm\", \"actual\": [4.0, 6.0, 0], \"expected\": [4.0, 6.0, 0], \"passed\": true}, {\"check\": \"late minute in a block rounds down\", \"actual\": [null, 6.0, 0], \"expected\": [null, 6.0, 0], \"passed\": true}, {\"check\": \"switchback sample 1\", \"actual\": [1.5, 4.0, 0], \"expected\": [1.5, 4.0, 0], \"passed\": true}, {\"check\": \"switchback sample 2\", \"actual\": [7.666667, null, 2], \"expected\": [7.666667, null, 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}