{"abstract":"Opening minutes of the experiment are washed out as if a switch had occurred.","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.","contract_signature":"events, block_len, washout, schedule","evaluation_group":"w2-experiment-statistics-switchback-washout","failed_approach":"Comparing against the next block looks forward instead of backward.","family":"w2-experiment-statistics-switchback-washout-first-block-previous","id":"FA-74821","implementations":{"attempt":{"sha256":"98ee2dc95592796fc7980b06310af6328b92f902149c1d2af5fc5a31bcb4683d","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)]\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  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.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  ('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 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),\n  ('switchback sample 41',\n   [[[96, 3], [9, 1], [43, 2], [66, 3], [91, 2], [7, 10], [4, 1], [9, 3]], 30, 10, ['A', 'B', 'B']],\n   [3.75, 2.5, 2])],\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 2',\n   [[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],\n   [7.666667, None, 2]),\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 44', [[[11, 3], [37, 10], [38, 10], [16, 1]], 10, 5, ['A', 'B', 'B']], [10.0, 1.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  ('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 42',\n   [[[8, 1], [37, 2], [27, 1], [1, 10], [27, 3], [38, 10]], 10, 5, ['A', 'B', 'B']],\n   [5.75, 2.0, 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 9',\n   [[[91, 10], [112, 10], [87, 10], [7, 3], [110, 1], [37, 10], [43, 2]], 30, 10, ['A', 'B']],\n   [6.5, 4.333333, 2]),\n  ('switchback sample 18', [[[5, 3], [24, 1], [24, 10], [38, 1]], 10, 10, ['A', 'B']], [3.0, None, 3]),\n  ('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1])]]\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":"7026146a27cd949b0ed4b9edc66b7dcb421d90b1948fb96ebdcaf6d78c0db392","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)]\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  ('first block has no carryover', [[[2, 3], [35, 9]], 30, 5, ['B', 'A', 'A', 'B']], [9.0, 3.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  ('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 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1]),\n  ('switchback sample 41',\n   [[[96, 3], [9, 1], [43, 2], [66, 3], [91, 2], [7, 10], [4, 1], [9, 3]], 30, 10, ['A', 'B', 'B']],\n   [3.75, 2.5, 2])],\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 2',\n   [[[0, 3], [104, 10], [69, 3], [65, 10], [45, 10]], 30, 10, ['A', 'A', 'B']],\n   [7.666667, None, 2]),\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 44', [[[11, 3], [37, 10], [38, 10], [16, 1]], 10, 5, ['A', 'B', 'B']], [10.0, 1.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  ('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 42',\n   [[[8, 1], [37, 2], [27, 1], [1, 10], [27, 3], [38, 10]], 10, 5, ['A', 'B', 'B']],\n   [5.75, 2.0, 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 9',\n   [[[91, 10], [112, 10], [87, 10], [7, 3], [110, 1], [37, 10], [43, 2]], 30, 10, ['A', 'B']],\n   [6.5, 4.333333, 2]),\n  ('switchback sample 18', [[[5, 3], [24, 1], [24, 10], [38, 1]], 10, 10, ['A', 'B']], [3.0, None, 3]),\n  ('switchback sample 21', [[[14, 10]], 10, 10, ['B', 'A', 'A', 'B']], [None, None, 1])]]\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-first-block-previous","generated_at":"2026-09-29T14:49:00.284184+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.","root_cause":"Block 0 wraps around to schedule[-1] as its previous arm.","sha256":"439703a342119381216a2d5f8d564c3906e509e1321da66b979ba1497014b8f8","title":"Switchback carryover washout: The first block inherits the last scheduled arm · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.426,"exit_code":1,"observations":[{"actual":[null,null,2],"check":"no washout when the arm repeats","expected":[5.0,null,1],"passed":false},{"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":[null,6.0,1],"check":"opening minutes are kept when the schedule ends on the other arm","expected":[4.0,6.0,0],"passed":false},{"actual":[9.0,null,1],"check":"first block has no carryover","expected":[9.0,3.0,0],"passed":false},{"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":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"no washout when the arm repeats\", \"actual\": [null, null, 2], \"expected\": [5.0, null, 1], \"passed\": false}, {\"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\": [null, 6.0, 1], \"expected\": [4.0, 6.0, 0], \"passed\": false}, {\"check\": \"first block has no carryover\", \"actual\": [9.0, null, 1], \"expected\": [9.0, 3.0, 0], \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":44.536,"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.0,4.0,0],"check":"block boundary minute starts the new block","expected":[3.0,4.0,0],"passed":true},{"actual":[null,6.0,1],"check":"opening minutes are kept when the schedule ends on the other arm","expected":[4.0,6.0,0],"passed":false},{"actual":[9.0,3.0,0],"check":"first block has no carryover","expected":[9.0,3.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,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, 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\": [null, 6.0, 1], \"expected\": [4.0, 6.0, 0], \"passed\": false}, {\"check\": \"first block has no carryover\", \"actual\": [9.0, 3.0, 0], \"expected\": [9.0, 3.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, null, 3], \"expected\": [7.666667, null, 2], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}