{"abstract":"The same batter is shown on strike for the first ball of the new over.","category":"Sports scoring and tiebreakers","checks":10,"contract":"Ball-by-ball innings tally. Events: \"0\"..\"6\" runs off the bat (legal ball); \"W\" wicket (legal ball, no runs, the new batter takes strike); \"wdK\" wide: 1 penalty + K run wides, all extras, not a legal ball, K runs completed; \"nbK\" no-ball: 1 penalty extra + K runs off the bat, not a legal ball; \"bK\"/\"lbK\" byes/leg byes: K extras on a legal ball. Batters change ends when an odd number of runs is completed, and again after the 6th legal ball of an over. Batters are numbered 1, 2 and then 3, 4, ... as they come in; batter 1 starts on strike. Return [total, wickets, overs \"O.B\", extras, batter on strike].","evaluation_group":"w2-sports-scoring-cricket-ball-by-ball","failed_approach":"Swapping whenever the legal count is a multiple of six also swaps on wides and no-balls bowled then.","family":"w2-sports-scoring-cricket-ball-by-ball-over-end-rotation","id":"FA-84001","implementations":{"attempt":{"sha256":"b833cd3b2a228ab6177c6899b2b82cfed41a31b6805e5754b985c4bef4995558","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    total = wickets = legal = extras = 0\n    striker, non = 1, 2\n    next_bat = 3\n    for e in events:\n        if e == 'W':\n            wickets += 1\n            legal += 1\n            striker = next_bat\n            next_bat += 1\n            ran = 0\n        elif e.startswith('wd'):\n            k = int(e[2:] or 0)\n            total += 1 + k\n            extras += 1 + k\n            ran = k\n        elif e.startswith('nb'):\n            k = int(e[2:] or 0)\n            total += 1 + k\n            extras += 1\n            ran = k\n        elif e[0] in 'bl':\n            k = int(e.lstrip('lb'))\n            total += k\n            extras += k\n            legal += 1\n            ran = k\n        else:\n            k = int(e)\n            total += k\n            legal += 1\n            ran = k\n        if ran % 2 == 1:\n            striker, non = non, striker\n        if legal % 6 == 0:\n            striker, non = non, striker\n    return [total, wickets, '%d.%d' % (legal // 6, legal % 6), extras, striker]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation', (['nb', '2', '0', '4'],), [7, 0, '0.3', 1, 1]),\n  ('regression: over end rotation', (['wd', '0', '1', '4', '0', '1', '0'],), [7, 0, '1.0', 1, 2]),\n  ('variant scenario 1', (['b1', '4', '1'],), [6, 0, '0.3', 1, 1]),\n  ('variant scenario 2',\n   (['1', '4', '4', '0', '0', '2', '4', 'b1', '0', 'wd1'],),\n   [18, 0, '1.3', 3, 1])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['nb4', '1', '0', 'nb1', '1', 'W', '0', '0', 'wd4', '1', 'b4', '1'],),\n   [20, 1, '1.3', 11, 1]),\n  ('variant scenario 1',\n   (['1', '3', '4', 'nb1', 'wd', '4', '0', '4', '1', '1', 'wd1', '1', 'nb', 'lb2'],),\n   [27, 0, '1.4', 7, 1]),\n  ('variant scenario 2', (['6', 'lb2', '1'],), [9, 0, '0.3', 2, 2])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['0', 'b1', 'b1', '0', '1', '1', 'b4', '0', 'nb4', '0'],),\n   [13, 0, '1.3', 7, 2]),\n  ('regression: over end rotation',\n   (['wd1',\n     '2',\n     'b1',\n     'wd1',\n     'nb',\n     '4',\n     '1',\n     'wd',\n     '1',\n     '0',\n     'wd1',\n     'wd',\n     '2',\n     '0',\n     'nb4',\n     '1',\n     '1',\n     'wd',\n     'wd1',\n     '6'],),\n   [36, 0, '1.5', 14, 1]),\n  ('variant scenario 1',\n   (['1', '2', 'nb1', '3', '1', 'nb', '0', 'W', '4', '0', '1', '0', 'b1', 'nb', '1', '3', 'lb1'],),\n   [22, 1, '2.2', 5, 2]),\n  ('variant scenario 2',\n   (['1', '0', '1', '1', '2', 'b1', '4', '1', 'nb', '2', '4', '4', '6', 'lb2', 'wd4', 'W'],),\n   [35, 1, '2.2', 9, 3])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['4',\n     'nb',\n     '4',\n     '3',\n     'b4',\n     '1',\n     '1',\n     'W',\n     'nb4',\n     '6',\n     '1',\n     '0',\n     'b4',\n     'nb4',\n     '2',\n     '1',\n     '0',\n     'W',\n     '2',\n     '0',\n     'lb1',\n     '1'],),\n   [46, 2, '3.1', 12, 3]),\n  ('regression: over end rotation',\n   (['wd',\n     '1',\n     'nb4',\n     'wd1',\n     '1',\n     'wd',\n     '2',\n     '1',\n     'nb4',\n     '1',\n     '1',\n     '4',\n     'wd4',\n     '4',\n     '6',\n     '0',\n     'wd1',\n     '6'],),\n   [48, 0, '1.5', 13, 1]),\n  ('variant scenario 1',\n   (['W', 'wd1', '3', 'wd4', '4', 'b1', '3', 'wd', 'b1'],),\n   [20, 1, '1.0', 10, 3]),\n  ('variant scenario 2',\n   (['0',\n     '6',\n     'b1',\n     'wd1',\n     'lb2',\n     'lb1',\n     'lb1',\n     'nb1',\n     '0',\n     'W',\n     '4',\n     'lb1',\n     '0',\n     '1',\n     'nb4',\n     '1',\n     '0'],),\n   [27, 1, '2.2', 10, 3])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['lb2',\n     '4',\n     '2',\n     '4',\n     '2',\n     'b4',\n     'wd',\n     '1',\n     'wd4',\n     '4',\n     'nb1',\n     '6',\n     '6',\n     'nb',\n     '1',\n     'nb4',\n     '0',\n     '1',\n     '4',\n     '1',\n     'nb1',\n     '2',\n     'nb'],),\n   [61, 0, '2.4', 17, 1]),\n  ('regression: over end rotation',\n   (['4', '4', 'W', '2', 'nb4', '0', 'nb4', '6'],),\n   [26, 1, '1.0', 2, 2]),\n  ('variant scenario 1',\n   (['lb1',\n     'wd4',\n     '0',\n     '6',\n     'W',\n     '1',\n     '2',\n     'b1',\n     '0',\n     '1',\n     'wd4',\n     '0',\n     '1',\n     '0',\n     '1',\n     'wd',\n     '1',\n     '3',\n     '6',\n     '2',\n     '0',\n     'W',\n     'wd',\n     'b4'],),\n   [42, 2, '3.2', 18, 4]),\n  ('variant scenario 2', (['0', '1', '4', 'wd', '1', 'b1'],), [8, 0, '0.5', 2, 2])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(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":"9afedf64a8f917190c573594274609e8a6489bdb29a03d908b3caf92e272b169","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    total = wickets = legal = extras = 0\n    striker, non = 1, 2\n    next_bat = 3\n    for e in events:\n        if e == 'W':\n            wickets += 1\n            legal += 1\n            striker = next_bat\n            next_bat += 1\n            ran = 0\n        elif e.startswith('wd'):\n            k = int(e[2:] or 0)\n            total += 1 + k\n            extras += 1 + k\n            ran = k\n        elif e.startswith('nb'):\n            k = int(e[2:] or 0)\n            total += 1 + k\n            extras += 1\n            ran = k\n        elif e[0] in 'bl':\n            k = int(e.lstrip('lb'))\n            total += k\n            extras += k\n            legal += 1\n            ran = k\n        else:\n            k = int(e)\n            total += k\n            legal += 1\n            ran = k\n        if ran % 2 == 1:\n            striker, non = non, striker\n    return [total, wickets, '%d.%d' % (legal // 6, legal % 6), extras, striker]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation', (['nb', '2', '0', '4'],), [7, 0, '0.3', 1, 1]),\n  ('regression: over end rotation', (['wd', '0', '1', '4', '0', '1', '0'],), [7, 0, '1.0', 1, 2]),\n  ('variant scenario 1', (['b1', '4', '1'],), [6, 0, '0.3', 1, 1]),\n  ('variant scenario 2',\n   (['1', '4', '4', '0', '0', '2', '4', 'b1', '0', 'wd1'],),\n   [18, 0, '1.3', 3, 1])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['nb4', '1', '0', 'nb1', '1', 'W', '0', '0', 'wd4', '1', 'b4', '1'],),\n   [20, 1, '1.3', 11, 1]),\n  ('variant scenario 1',\n   (['1', '3', '4', 'nb1', 'wd', '4', '0', '4', '1', '1', 'wd1', '1', 'nb', 'lb2'],),\n   [27, 0, '1.4', 7, 1]),\n  ('variant scenario 2', (['6', 'lb2', '1'],), [9, 0, '0.3', 2, 2])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['0', 'b1', 'b1', '0', '1', '1', 'b4', '0', 'nb4', '0'],),\n   [13, 0, '1.3', 7, 2]),\n  ('regression: over end rotation',\n   (['wd1',\n     '2',\n     'b1',\n     'wd1',\n     'nb',\n     '4',\n     '1',\n     'wd',\n     '1',\n     '0',\n     'wd1',\n     'wd',\n     '2',\n     '0',\n     'nb4',\n     '1',\n     '1',\n     'wd',\n     'wd1',\n     '6'],),\n   [36, 0, '1.5', 14, 1]),\n  ('variant scenario 1',\n   (['1', '2', 'nb1', '3', '1', 'nb', '0', 'W', '4', '0', '1', '0', 'b1', 'nb', '1', '3', 'lb1'],),\n   [22, 1, '2.2', 5, 2]),\n  ('variant scenario 2',\n   (['1', '0', '1', '1', '2', 'b1', '4', '1', 'nb', '2', '4', '4', '6', 'lb2', 'wd4', 'W'],),\n   [35, 1, '2.2', 9, 3])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['4',\n     'nb',\n     '4',\n     '3',\n     'b4',\n     '1',\n     '1',\n     'W',\n     'nb4',\n     '6',\n     '1',\n     '0',\n     'b4',\n     'nb4',\n     '2',\n     '1',\n     '0',\n     'W',\n     '2',\n     '0',\n     'lb1',\n     '1'],),\n   [46, 2, '3.1', 12, 3]),\n  ('regression: over end rotation',\n   (['wd',\n     '1',\n     'nb4',\n     'wd1',\n     '1',\n     'wd',\n     '2',\n     '1',\n     'nb4',\n     '1',\n     '1',\n     '4',\n     'wd4',\n     '4',\n     '6',\n     '0',\n     'wd1',\n     '6'],),\n   [48, 0, '1.5', 13, 1]),\n  ('variant scenario 1',\n   (['W', 'wd1', '3', 'wd4', '4', 'b1', '3', 'wd', 'b1'],),\n   [20, 1, '1.0', 10, 3]),\n  ('variant scenario 2',\n   (['0',\n     '6',\n     'b1',\n     'wd1',\n     'lb2',\n     'lb1',\n     'lb1',\n     'nb1',\n     '0',\n     'W',\n     '4',\n     'lb1',\n     '0',\n     '1',\n     'nb4',\n     '1',\n     '0'],),\n   [27, 1, '2.2', 10, 3])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['lb2',\n     '4',\n     '2',\n     '4',\n     '2',\n     'b4',\n     'wd',\n     '1',\n     'wd4',\n     '4',\n     'nb1',\n     '6',\n     '6',\n     'nb',\n     '1',\n     'nb4',\n     '0',\n     '1',\n     '4',\n     '1',\n     'nb1',\n     '2',\n     'nb'],),\n   [61, 0, '2.4', 17, 1]),\n  ('regression: over end rotation',\n   (['4', '4', 'W', '2', 'nb4', '0', 'nb4', '6'],),\n   [26, 1, '1.0', 2, 2]),\n  ('variant scenario 1',\n   (['lb1',\n     'wd4',\n     '0',\n     '6',\n     'W',\n     '1',\n     '2',\n     'b1',\n     '0',\n     '1',\n     'wd4',\n     '0',\n     '1',\n     '0',\n     '1',\n     'wd',\n     '1',\n     '3',\n     '6',\n     '2',\n     '0',\n     'W',\n     'wd',\n     'b4'],),\n   [42, 2, '3.2', 18, 4]),\n  ('variant scenario 2', (['0', '1', '4', 'wd', '1', 'b1'],), [8, 0, '0.5', 2, 2])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(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":"4286b015339345fb7e09ce29b0a5e3eb9b6704648ef54094f2c3f5b5e0513209","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    total = wickets = legal = extras = 0\n    striker, non = 1, 2\n    next_bat = 3\n    for e in events:\n        if e == 'W':\n            wickets += 1\n            legal += 1\n            striker = next_bat\n            next_bat += 1\n            ran = 0\n        elif e.startswith('wd'):\n            k = int(e[2:] or 0)\n            total += 1 + k\n            extras += 1 + k\n            ran = k\n        elif e.startswith('nb'):\n            k = int(e[2:] or 0)\n            total += 1 + k\n            extras += 1\n            ran = k\n        elif e[0] in 'bl':\n            k = int(e.lstrip('lb'))\n            total += k\n            extras += k\n            legal += 1\n            ran = k\n        else:\n            k = int(e)\n            total += k\n            legal += 1\n            ran = k\n        if ran % 2 == 1:\n            striker, non = non, striker\n        if e[:2] not in ('wd', 'nb') and legal % 6 == 0:\n            striker, non = non, striker\n    return [total, wickets, '%d.%d' % (legal // 6, legal % 6), extras, striker]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation', (['nb', '2', '0', '4'],), [7, 0, '0.3', 1, 1]),\n  ('regression: over end rotation', (['wd', '0', '1', '4', '0', '1', '0'],), [7, 0, '1.0', 1, 2]),\n  ('variant scenario 1', (['b1', '4', '1'],), [6, 0, '0.3', 1, 1]),\n  ('variant scenario 2',\n   (['1', '4', '4', '0', '0', '2', '4', 'b1', '0', 'wd1'],),\n   [18, 0, '1.3', 3, 1])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['nb4', '1', '0', 'nb1', '1', 'W', '0', '0', 'wd4', '1', 'b4', '1'],),\n   [20, 1, '1.3', 11, 1]),\n  ('variant scenario 1',\n   (['1', '3', '4', 'nb1', 'wd', '4', '0', '4', '1', '1', 'wd1', '1', 'nb', 'lb2'],),\n   [27, 0, '1.4', 7, 1]),\n  ('variant scenario 2', (['6', 'lb2', '1'],), [9, 0, '0.3', 2, 2])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['0', 'b1', 'b1', '0', '1', '1', 'b4', '0', 'nb4', '0'],),\n   [13, 0, '1.3', 7, 2]),\n  ('regression: over end rotation',\n   (['wd1',\n     '2',\n     'b1',\n     'wd1',\n     'nb',\n     '4',\n     '1',\n     'wd',\n     '1',\n     '0',\n     'wd1',\n     'wd',\n     '2',\n     '0',\n     'nb4',\n     '1',\n     '1',\n     'wd',\n     'wd1',\n     '6'],),\n   [36, 0, '1.5', 14, 1]),\n  ('variant scenario 1',\n   (['1', '2', 'nb1', '3', '1', 'nb', '0', 'W', '4', '0', '1', '0', 'b1', 'nb', '1', '3', 'lb1'],),\n   [22, 1, '2.2', 5, 2]),\n  ('variant scenario 2',\n   (['1', '0', '1', '1', '2', 'b1', '4', '1', 'nb', '2', '4', '4', '6', 'lb2', 'wd4', 'W'],),\n   [35, 1, '2.2', 9, 3])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['4',\n     'nb',\n     '4',\n     '3',\n     'b4',\n     '1',\n     '1',\n     'W',\n     'nb4',\n     '6',\n     '1',\n     '0',\n     'b4',\n     'nb4',\n     '2',\n     '1',\n     '0',\n     'W',\n     '2',\n     '0',\n     'lb1',\n     '1'],),\n   [46, 2, '3.1', 12, 3]),\n  ('regression: over end rotation',\n   (['wd',\n     '1',\n     'nb4',\n     'wd1',\n     '1',\n     'wd',\n     '2',\n     '1',\n     'nb4',\n     '1',\n     '1',\n     '4',\n     'wd4',\n     '4',\n     '6',\n     '0',\n     'wd1',\n     '6'],),\n   [48, 0, '1.5', 13, 1]),\n  ('variant scenario 1',\n   (['W', 'wd1', '3', 'wd4', '4', 'b1', '3', 'wd', 'b1'],),\n   [20, 1, '1.0', 10, 3]),\n  ('variant scenario 2',\n   (['0',\n     '6',\n     'b1',\n     'wd1',\n     'lb2',\n     'lb1',\n     'lb1',\n     'nb1',\n     '0',\n     'W',\n     '4',\n     'lb1',\n     '0',\n     '1',\n     'nb4',\n     '1',\n     '0'],),\n   [27, 1, '2.2', 10, 3])],\n [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),\n  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),\n  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),\n  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),\n  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),\n  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),\n  ('regression: over end rotation',\n   (['lb2',\n     '4',\n     '2',\n     '4',\n     '2',\n     'b4',\n     'wd',\n     '1',\n     'wd4',\n     '4',\n     'nb1',\n     '6',\n     '6',\n     'nb',\n     '1',\n     'nb4',\n     '0',\n     '1',\n     '4',\n     '1',\n     'nb1',\n     '2',\n     'nb'],),\n   [61, 0, '2.4', 17, 1]),\n  ('regression: over end rotation',\n   (['4', '4', 'W', '2', 'nb4', '0', 'nb4', '6'],),\n   [26, 1, '1.0', 2, 2]),\n  ('variant scenario 1',\n   (['lb1',\n     'wd4',\n     '0',\n     '6',\n     'W',\n     '1',\n     '2',\n     'b1',\n     '0',\n     '1',\n     'wd4',\n     '0',\n     '1',\n     '0',\n     '1',\n     'wd',\n     '1',\n     '3',\n     '6',\n     '2',\n     '0',\n     'W',\n     'wd',\n     'b4'],),\n   [42, 2, '3.2', 18, 4]),\n  ('variant scenario 2', (['0', '1', '4', 'wd', '1', 'b1'],), [8, 0, '0.5', 2, 2])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(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":"Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any governing body rulebook or operator house rules. 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-sports-scoring-cricket-ball-by-ball-over-end-rotation","generated_at":"2026-09-29T14:50:26.754212+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Scoring apps derive totals, overs and strike from ball events; extras and strike rotation are error-prone.","repair":"Swap strike after each sixth legal ball.","root_cause":"The end-of-over swap is missing.","sha256":"736ad96914b6158fe62fac0909feefff090feb14f09315bf612cce03e1cc6076","title":"Strike not rotated at the end of an over · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.947,"exit_code":1,"observations":[{"actual":[0,0,"1.0",0,2],"check":"control maiden over","expected":[0,0,"1.0",0,2],"passed":true},{"actual":[1,0,"0.1",0,2],"check":"boundary single rotates strike","expected":[1,0,"0.1",0,2],"passed":true},{"actual":[5,0,"0.1",1,2],"check":"boundary wide is not a legal ball","expected":[5,0,"0.1",1,1],"passed":false},{"actual":[5,0,"0.0",1,2],"check":"control no-ball boundary","expected":[5,0,"0.0",1,1],"passed":false},{"actual":[0,1,"0.2",0,3],"check":"boundary wicket brings new striker","expected":[0,1,"0.2",0,3],"passed":true},{"actual":[3,0,"0.2",1,2],"check":"control leg byes","expected":[3,0,"0.2",1,2],"passed":true},{"actual":[7,0,"0.3",1,2],"check":"regression: over end rotation","expected":[7,0,"0.3",1,1],"passed":false},{"actual":[7,0,"1.0",1,1],"check":"regression: over end rotation","expected":[7,0,"1.0",1,2],"passed":false},{"actual":[6,0,"0.3",1,1],"check":"variant scenario 1","expected":[6,0,"0.3",1,1],"passed":true},{"actual":[18,0,"1.3",3,1],"check":"variant scenario 2","expected":[18,0,"1.3",3,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control maiden over\", \"actual\": [0, 0, \"1.0\", 0, 2], \"expected\": [0, 0, \"1.0\", 0, 2], \"passed\": true}, {\"check\": \"boundary single rotates strike\", \"actual\": [1, 0, \"0.1\", 0, 2], \"expected\": [1, 0, \"0.1\", 0, 2], \"passed\": true}, {\"check\": \"boundary wide is not a legal ball\", \"actual\": [5, 0, \"0.1\", 1, 2], \"expected\": [5, 0, \"0.1\", 1, 1], \"passed\": false}, {\"check\": \"control no-ball boundary\", \"actual\": [5, 0, \"0.0\", 1, 2], \"expected\": [5, 0, \"0.0\", 1, 1], \"passed\": false}, {\"check\": \"boundary wicket brings new striker\", \"actual\": [0, 1, \"0.2\", 0, 3], \"expected\": [0, 1, \"0.2\", 0, 3], \"passed\": true}, {\"check\": \"control leg byes\", \"actual\": [3, 0, \"0.2\", 1, 2], \"expected\": [3, 0, \"0.2\", 1, 2], \"passed\": true}, {\"check\": \"regression: over end rotation\", \"actual\": [7, 0, \"0.3\", 1, 2], \"expected\": [7, 0, \"0.3\", 1, 1], \"passed\": false}, {\"check\": \"regression: over end rotation\", \"actual\": [7, 0, \"1.0\", 1, 1], \"expected\": [7, 0, \"1.0\", 1, 2], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [6, 0, \"0.3\", 1, 1], \"expected\": [6, 0, \"0.3\", 1, 1], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [18, 0, \"1.3\", 3, 1], \"expected\": [18, 0, \"1.3\", 3, 1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.85,"exit_code":1,"observations":[{"actual":[0,0,"1.0",0,1],"check":"control maiden over","expected":[0,0,"1.0",0,2],"passed":false},{"actual":[1,0,"0.1",0,2],"check":"boundary single rotates strike","expected":[1,0,"0.1",0,2],"passed":true},{"actual":[5,0,"0.1",1,1],"check":"boundary wide is not a legal ball","expected":[5,0,"0.1",1,1],"passed":true},{"actual":[5,0,"0.0",1,1],"check":"control no-ball boundary","expected":[5,0,"0.0",1,1],"passed":true},{"actual":[0,1,"0.2",0,3],"check":"boundary wicket brings new striker","expected":[0,1,"0.2",0,3],"passed":true},{"actual":[3,0,"0.2",1,2],"check":"control leg byes","expected":[3,0,"0.2",1,2],"passed":true},{"actual":[7,0,"0.3",1,1],"check":"regression: over end rotation","expected":[7,0,"0.3",1,1],"passed":true},{"actual":[7,0,"1.0",1,1],"check":"regression: over end rotation","expected":[7,0,"1.0",1,2],"passed":false},{"actual":[6,0,"0.3",1,1],"check":"variant scenario 1","expected":[6,0,"0.3",1,1],"passed":true},{"actual":[18,0,"1.3",3,2],"check":"variant scenario 2","expected":[18,0,"1.3",3,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control maiden over\", \"actual\": [0, 0, \"1.0\", 0, 1], \"expected\": [0, 0, \"1.0\", 0, 2], \"passed\": false}, {\"check\": \"boundary single rotates strike\", \"actual\": [1, 0, \"0.1\", 0, 2], \"expected\": [1, 0, \"0.1\", 0, 2], \"passed\": true}, {\"check\": \"boundary wide is not a legal ball\", \"actual\": [5, 0, \"0.1\", 1, 1], \"expected\": [5, 0, \"0.1\", 1, 1], \"passed\": true}, {\"check\": \"control no-ball boundary\", \"actual\": [5, 0, \"0.0\", 1, 1], \"expected\": [5, 0, \"0.0\", 1, 1], \"passed\": true}, {\"check\": \"boundary wicket brings new striker\", \"actual\": [0, 1, \"0.2\", 0, 3], \"expected\": [0, 1, \"0.2\", 0, 3], \"passed\": true}, {\"check\": \"control leg byes\", \"actual\": [3, 0, \"0.2\", 1, 2], \"expected\": [3, 0, \"0.2\", 1, 2], \"passed\": true}, {\"check\": \"regression: over end rotation\", \"actual\": [7, 0, \"0.3\", 1, 1], \"expected\": [7, 0, \"0.3\", 1, 1], \"passed\": true}, {\"check\": \"regression: over end rotation\", \"actual\": [7, 0, \"1.0\", 1, 1], \"expected\": [7, 0, \"1.0\", 1, 2], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [6, 0, \"0.3\", 1, 1], \"expected\": [6, 0, \"0.3\", 1, 1], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [18, 0, \"1.3\", 3, 2], \"expected\": [18, 0, \"1.3\", 3, 1], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.921,"exit_code":0,"observations":[{"actual":[0,0,"1.0",0,2],"check":"control maiden over","expected":[0,0,"1.0",0,2],"passed":true},{"actual":[1,0,"0.1",0,2],"check":"boundary single rotates strike","expected":[1,0,"0.1",0,2],"passed":true},{"actual":[5,0,"0.1",1,1],"check":"boundary wide is not a legal ball","expected":[5,0,"0.1",1,1],"passed":true},{"actual":[5,0,"0.0",1,1],"check":"control no-ball boundary","expected":[5,0,"0.0",1,1],"passed":true},{"actual":[0,1,"0.2",0,3],"check":"boundary wicket brings new striker","expected":[0,1,"0.2",0,3],"passed":true},{"actual":[3,0,"0.2",1,2],"check":"control leg byes","expected":[3,0,"0.2",1,2],"passed":true},{"actual":[7,0,"0.3",1,1],"check":"regression: over end rotation","expected":[7,0,"0.3",1,1],"passed":true},{"actual":[7,0,"1.0",1,2],"check":"regression: over end rotation","expected":[7,0,"1.0",1,2],"passed":true},{"actual":[6,0,"0.3",1,1],"check":"variant scenario 1","expected":[6,0,"0.3",1,1],"passed":true},{"actual":[18,0,"1.3",3,1],"check":"variant scenario 2","expected":[18,0,"1.3",3,1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control maiden over\", \"actual\": [0, 0, \"1.0\", 0, 2], \"expected\": [0, 0, \"1.0\", 0, 2], \"passed\": true}, {\"check\": \"boundary single rotates strike\", \"actual\": [1, 0, \"0.1\", 0, 2], \"expected\": [1, 0, \"0.1\", 0, 2], \"passed\": true}, {\"check\": \"boundary wide is not a legal ball\", \"actual\": [5, 0, \"0.1\", 1, 1], \"expected\": [5, 0, \"0.1\", 1, 1], \"passed\": true}, {\"check\": \"control no-ball boundary\", \"actual\": [5, 0, \"0.0\", 1, 1], \"expected\": [5, 0, \"0.0\", 1, 1], \"passed\": true}, {\"check\": \"boundary wicket brings new striker\", \"actual\": [0, 1, \"0.2\", 0, 3], \"expected\": [0, 1, \"0.2\", 0, 3], \"passed\": true}, {\"check\": \"control leg byes\", \"actual\": [3, 0, \"0.2\", 1, 2], \"expected\": [3, 0, \"0.2\", 1, 2], \"passed\": true}, {\"check\": \"regression: over end rotation\", \"actual\": [7, 0, \"0.3\", 1, 1], \"expected\": [7, 0, \"0.3\", 1, 1], \"passed\": true}, {\"check\": \"regression: over end rotation\", \"actual\": [7, 0, \"1.0\", 1, 2], \"expected\": [7, 0, \"1.0\", 1, 2], \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": [6, 0, \"0.3\", 1, 1], \"expected\": [6, 0, \"0.3\", 1, 1], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [18, 0, \"1.3\", 3, 1], \"expected\": [18, 0, \"1.3\", 3, 1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}