{"abstract":"A 20-handicap player receives only one stroke on the hardest holes.","category":"Sports scoring and tiebreakers","checks":10,"contract":"Stableford points with stroke allocation. holes rows are [par, stroke_index, strokes] with stroke index 1-18 and strokes None for a hole with no score. A handicap H >= 0 receives H // 18 strokes on every hole plus one more on holes with stroke index <= H % 18. A plus handicap (H < 0) gives back one stroke on holes with stroke index > 18 + H. Points = max(0, 2 + par - (strokes - received)); a hole with no score earns 0. Return [total, per-hole points].","evaluation_group":"w2-sports-scoring-golf-stableford-allocation","failed_approach":"Allocating when si <= H caps the receipt at one stroke per hole.","family":"w2-sports-scoring-golf-stableford-allocation-multi-stroke-allocation","id":"FA-84171","implementations":{"attempt":{"sha256":"03238797f153c1bdc1ab3de32ce0612dcf635e048ee81dfb6945d90cf0bd9902","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes, handicap):\n    per = []\n    for par, si, strokes in holes:\n        if handicap >= 0:\n            received = (1 if si <= handicap else 0)\n        else:\n            received = -1 if si > 18 + handicap else 0\n        if strokes is None:\n            per.append(0)\n            continue\n        per.append(max(0, 2 + par - (strokes - received)))\n    return [sum(per), per]\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 scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 5, 4], [3, 11, 3], [3, 17, 3], [5, 10, 8], [5, 13, 9], [4, 6, 3], [3, 7, 2]], 18),\n   [16, [2, 3, 3, 0, 0, 4, 4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 15, 6], [4, 17, 3], [3, 7, 1], [5, 5, 9], [5, 4, 8]], 35),\n   [13, [1, 5, 6, 0, 1]]),\n  ('variant scenario 1', ([[5, 16, 9], [5, 14, 3], [4, 12, 6], [4, 8, 8]], 20), [6, [0, 5, 1, 0]]),\n  ('variant scenario 2',\n   ([[3, 13, 3],\n     [4, 6, 5],\n     [3, 7, 2],\n     [4, 11, 5],\n     [5, 12, 6],\n     [4, 9, 3],\n     [3, 1, 5],\n     [3, 17, 4],\n     [4, 15, 5],\n     [3, 3, 1]],\n    -2),\n   [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 13, 3], [5, 11, 7], [5, 16, 7]], 20),\n   [5, [3, 1, 1]]),\n  ('regression: multi stroke allocation',\n   ([[4, 13, 4], [4, 1, 4], [4, 5, 4], [5, 16, 6]], 20),\n   [12, [3, 4, 3, 2]]),\n  ('variant scenario 1',\n   ([[3, 17, 3], [4, 7, 3], [4, 4, 7], [4, 18, 2], [4, 6, 8]], -2),\n   [7, [1, 3, 0, 3, 0]]),\n  ('variant scenario 2',\n   ([[3, 2, 6], [4, 9, 4], [3, 4, 7], [4, 7, 5], [3, 14, 4], [4, 17, 5], [3, 13, 3]], 19),\n   [12, [0, 3, 0, 2, 2, 2, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[5, 11, 9], [5, 18, 5], [4, 4, 6], [3, 3, 4], [4, 16, 5], [4, 6, 2], [5, 14, 4], [3, 2, 3]],\n    18),\n   [20, [0, 3, 1, 2, 2, 5, 4, 3]]),\n  ('regression: multi stroke allocation',\n   ([[3, 2, 1],\n     [5, 18, 8],\n     [4, 10, 5],\n     [5, 5, 6],\n     [4, 6, 2],\n     [4, 1, 8],\n     [4, 17, 4],\n     [5, 9, 5],\n     [4, 7, 8],\n     [3, 3, 5],\n     [3, 4, 7],\n     [4, 14, 7]],\n    20),\n   [22, [6, 0, 2, 2, 5, 0, 3, 3, 0, 1, 0, 0]]),\n  ('variant scenario 1', ([[4, 1, None], [3, 7, 4], [5, 6, 5], [5, 2, 4]], 10), [9, [0, 2, 3, 4]]),\n  ('variant scenario 2',\n   ([[5, 2, 5],\n     [4, 9, 7],\n     [3, 14, 1],\n     [3, 4, 2],\n     [5, 8, 6],\n     [4, 18, 3],\n     [3, 15, 7],\n     [4, 6, 7],\n     [3, 5, 7],\n     [4, 12, 4],\n     [4, 16, 8],\n     [3, 11, 1]],\n    12),\n   [24, [3, 0, 4, 4, 2, 3, 0, 0, 0, 3, 0, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[5, 9, 5], [4, 2, 4], [3, 18, 6], [4, 10, 5], [5, 14, 5], [5, 3, 8], [5, 8, 5], [4, 1, 4]],\n    18),\n   [17, [3, 3, 0, 2, 3, 0, 3, 3]]),\n  ('regression: multi stroke allocation',\n   ([[5, 11, 9], [5, 2, 5], [3, 13, 5], [4, 15, 5], [3, 4, 3]], 20),\n   [10, [0, 4, 1, 2, 3]]),\n  ('variant scenario 1', ([[4, 9, 5], [5, 18, 8], [4, 12, 4], [4, 7, 8]], 12), [5, [2, 0, 3, 0]]),\n  ('variant scenario 2',\n   ([[3, 2, 7], [3, 4, 5], [4, 9, 4], [5, 11, 6], [5, 7, 9], [4, 18, 5], [5, 12, 4]], -2),\n   [6, [0, 0, 2, 1, 0, 0, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 13, 5],\n     [5, 5, 3],\n     [4, 16, 2],\n     [3, 1, 2],\n     [5, 17, 6],\n     [4, 10, 5],\n     [5, 8, 5],\n     [3, 3, 3],\n     [4, 7, 5],\n     [4, 12, 8],\n     [4, 15, 5],\n     [5, 9, 8]],\n    18),\n   [29, [1, 5, 5, 4, 2, 2, 3, 3, 2, 0, 2, 0]]),\n  ('regression: multi stroke allocation',\n   ([[5, 16, 8],\n     [3, 11, 3],\n     [5, 4, 3],\n     [4, 14, 4],\n     [4, 7, 2],\n     [3, 1, 1],\n     [3, 5, 4],\n     [4, 17, 4],\n     [3, 10, 3],\n     [4, 3, 2],\n     [4, 8, 6]],\n    20),\n   [36, [0, 3, 5, 3, 5, 6, 2, 3, 3, 5, 1]]),\n  ('variant scenario 1',\n   ([[3, 11, 3],\n     [3, 4, 4],\n     [4, 18, 5],\n     [4, 1, None],\n     [4, 15, 8],\n     [5, 3, None],\n     [4, 9, 5],\n     [4, 5, 5],\n     [5, 12, 7],\n     [4, 8, 4],\n     [4, 6, 5]],\n    18),\n   [17, [3, 2, 2, 0, 0, 0, 2, 2, 1, 3, 2]]),\n  ('variant scenario 2',\n   ([[4, 5, None], [4, 13, 4], [5, 12, 9], [4, 10, 7]], 20),\n   [3, [0, 3, 0, 0]])]]\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":"55b566b6f58523554159847cc03c6826139b64d659543e80c34810e370cb24fb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes, handicap):\n    per = []\n    for par, si, strokes in holes:\n        if handicap >= 0:\n            received = (1 if si <= handicap % 18 else 0)\n        else:\n            received = -1 if si > 18 + handicap else 0\n        if strokes is None:\n            per.append(0)\n            continue\n        per.append(max(0, 2 + par - (strokes - received)))\n    return [sum(per), per]\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 scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 5, 4], [3, 11, 3], [3, 17, 3], [5, 10, 8], [5, 13, 9], [4, 6, 3], [3, 7, 2]], 18),\n   [16, [2, 3, 3, 0, 0, 4, 4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 15, 6], [4, 17, 3], [3, 7, 1], [5, 5, 9], [5, 4, 8]], 35),\n   [13, [1, 5, 6, 0, 1]]),\n  ('variant scenario 1', ([[5, 16, 9], [5, 14, 3], [4, 12, 6], [4, 8, 8]], 20), [6, [0, 5, 1, 0]]),\n  ('variant scenario 2',\n   ([[3, 13, 3],\n     [4, 6, 5],\n     [3, 7, 2],\n     [4, 11, 5],\n     [5, 12, 6],\n     [4, 9, 3],\n     [3, 1, 5],\n     [3, 17, 4],\n     [4, 15, 5],\n     [3, 3, 1]],\n    -2),\n   [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 13, 3], [5, 11, 7], [5, 16, 7]], 20),\n   [5, [3, 1, 1]]),\n  ('regression: multi stroke allocation',\n   ([[4, 13, 4], [4, 1, 4], [4, 5, 4], [5, 16, 6]], 20),\n   [12, [3, 4, 3, 2]]),\n  ('variant scenario 1',\n   ([[3, 17, 3], [4, 7, 3], [4, 4, 7], [4, 18, 2], [4, 6, 8]], -2),\n   [7, [1, 3, 0, 3, 0]]),\n  ('variant scenario 2',\n   ([[3, 2, 6], [4, 9, 4], [3, 4, 7], [4, 7, 5], [3, 14, 4], [4, 17, 5], [3, 13, 3]], 19),\n   [12, [0, 3, 0, 2, 2, 2, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[5, 11, 9], [5, 18, 5], [4, 4, 6], [3, 3, 4], [4, 16, 5], [4, 6, 2], [5, 14, 4], [3, 2, 3]],\n    18),\n   [20, [0, 3, 1, 2, 2, 5, 4, 3]]),\n  ('regression: multi stroke allocation',\n   ([[3, 2, 1],\n     [5, 18, 8],\n     [4, 10, 5],\n     [5, 5, 6],\n     [4, 6, 2],\n     [4, 1, 8],\n     [4, 17, 4],\n     [5, 9, 5],\n     [4, 7, 8],\n     [3, 3, 5],\n     [3, 4, 7],\n     [4, 14, 7]],\n    20),\n   [22, [6, 0, 2, 2, 5, 0, 3, 3, 0, 1, 0, 0]]),\n  ('variant scenario 1', ([[4, 1, None], [3, 7, 4], [5, 6, 5], [5, 2, 4]], 10), [9, [0, 2, 3, 4]]),\n  ('variant scenario 2',\n   ([[5, 2, 5],\n     [4, 9, 7],\n     [3, 14, 1],\n     [3, 4, 2],\n     [5, 8, 6],\n     [4, 18, 3],\n     [3, 15, 7],\n     [4, 6, 7],\n     [3, 5, 7],\n     [4, 12, 4],\n     [4, 16, 8],\n     [3, 11, 1]],\n    12),\n   [24, [3, 0, 4, 4, 2, 3, 0, 0, 0, 3, 0, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[5, 9, 5], [4, 2, 4], [3, 18, 6], [4, 10, 5], [5, 14, 5], [5, 3, 8], [5, 8, 5], [4, 1, 4]],\n    18),\n   [17, [3, 3, 0, 2, 3, 0, 3, 3]]),\n  ('regression: multi stroke allocation',\n   ([[5, 11, 9], [5, 2, 5], [3, 13, 5], [4, 15, 5], [3, 4, 3]], 20),\n   [10, [0, 4, 1, 2, 3]]),\n  ('variant scenario 1', ([[4, 9, 5], [5, 18, 8], [4, 12, 4], [4, 7, 8]], 12), [5, [2, 0, 3, 0]]),\n  ('variant scenario 2',\n   ([[3, 2, 7], [3, 4, 5], [4, 9, 4], [5, 11, 6], [5, 7, 9], [4, 18, 5], [5, 12, 4]], -2),\n   [6, [0, 0, 2, 1, 0, 0, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 13, 5],\n     [5, 5, 3],\n     [4, 16, 2],\n     [3, 1, 2],\n     [5, 17, 6],\n     [4, 10, 5],\n     [5, 8, 5],\n     [3, 3, 3],\n     [4, 7, 5],\n     [4, 12, 8],\n     [4, 15, 5],\n     [5, 9, 8]],\n    18),\n   [29, [1, 5, 5, 4, 2, 2, 3, 3, 2, 0, 2, 0]]),\n  ('regression: multi stroke allocation',\n   ([[5, 16, 8],\n     [3, 11, 3],\n     [5, 4, 3],\n     [4, 14, 4],\n     [4, 7, 2],\n     [3, 1, 1],\n     [3, 5, 4],\n     [4, 17, 4],\n     [3, 10, 3],\n     [4, 3, 2],\n     [4, 8, 6]],\n    20),\n   [36, [0, 3, 5, 3, 5, 6, 2, 3, 3, 5, 1]]),\n  ('variant scenario 1',\n   ([[3, 11, 3],\n     [3, 4, 4],\n     [4, 18, 5],\n     [4, 1, None],\n     [4, 15, 8],\n     [5, 3, None],\n     [4, 9, 5],\n     [4, 5, 5],\n     [5, 12, 7],\n     [4, 8, 4],\n     [4, 6, 5]],\n    18),\n   [17, [3, 2, 2, 0, 0, 0, 2, 2, 1, 3, 2]]),\n  ('variant scenario 2',\n   ([[4, 5, None], [4, 13, 4], [5, 12, 9], [4, 10, 7]], 20),\n   [3, [0, 3, 0, 0]])]]\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":"ea5e0aa21fb0a2d7d9c67e8f86fb86ebac6b9b50723ffc99d17cf551f044b3e7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes, handicap):\n    per = []\n    for par, si, strokes in holes:\n        if handicap >= 0:\n            received = handicap // 18 + (1 if si <= handicap % 18 else 0)\n        else:\n            received = -1 if si > 18 + handicap else 0\n        if strokes is None:\n            per.append(0)\n            continue\n        per.append(max(0, 2 + par - (strokes - received)))\n    return [sum(per), per]\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 scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 5, 4], [3, 11, 3], [3, 17, 3], [5, 10, 8], [5, 13, 9], [4, 6, 3], [3, 7, 2]], 18),\n   [16, [2, 3, 3, 0, 0, 4, 4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 15, 6], [4, 17, 3], [3, 7, 1], [5, 5, 9], [5, 4, 8]], 35),\n   [13, [1, 5, 6, 0, 1]]),\n  ('variant scenario 1', ([[5, 16, 9], [5, 14, 3], [4, 12, 6], [4, 8, 8]], 20), [6, [0, 5, 1, 0]]),\n  ('variant scenario 2',\n   ([[3, 13, 3],\n     [4, 6, 5],\n     [3, 7, 2],\n     [4, 11, 5],\n     [5, 12, 6],\n     [4, 9, 3],\n     [3, 1, 5],\n     [3, 17, 4],\n     [4, 15, 5],\n     [3, 3, 1]],\n    -2),\n   [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 13, 3], [5, 11, 7], [5, 16, 7]], 20),\n   [5, [3, 1, 1]]),\n  ('regression: multi stroke allocation',\n   ([[4, 13, 4], [4, 1, 4], [4, 5, 4], [5, 16, 6]], 20),\n   [12, [3, 4, 3, 2]]),\n  ('variant scenario 1',\n   ([[3, 17, 3], [4, 7, 3], [4, 4, 7], [4, 18, 2], [4, 6, 8]], -2),\n   [7, [1, 3, 0, 3, 0]]),\n  ('variant scenario 2',\n   ([[3, 2, 6], [4, 9, 4], [3, 4, 7], [4, 7, 5], [3, 14, 4], [4, 17, 5], [3, 13, 3]], 19),\n   [12, [0, 3, 0, 2, 2, 2, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[5, 11, 9], [5, 18, 5], [4, 4, 6], [3, 3, 4], [4, 16, 5], [4, 6, 2], [5, 14, 4], [3, 2, 3]],\n    18),\n   [20, [0, 3, 1, 2, 2, 5, 4, 3]]),\n  ('regression: multi stroke allocation',\n   ([[3, 2, 1],\n     [5, 18, 8],\n     [4, 10, 5],\n     [5, 5, 6],\n     [4, 6, 2],\n     [4, 1, 8],\n     [4, 17, 4],\n     [5, 9, 5],\n     [4, 7, 8],\n     [3, 3, 5],\n     [3, 4, 7],\n     [4, 14, 7]],\n    20),\n   [22, [6, 0, 2, 2, 5, 0, 3, 3, 0, 1, 0, 0]]),\n  ('variant scenario 1', ([[4, 1, None], [3, 7, 4], [5, 6, 5], [5, 2, 4]], 10), [9, [0, 2, 3, 4]]),\n  ('variant scenario 2',\n   ([[5, 2, 5],\n     [4, 9, 7],\n     [3, 14, 1],\n     [3, 4, 2],\n     [5, 8, 6],\n     [4, 18, 3],\n     [3, 15, 7],\n     [4, 6, 7],\n     [3, 5, 7],\n     [4, 12, 4],\n     [4, 16, 8],\n     [3, 11, 1]],\n    12),\n   [24, [3, 0, 4, 4, 2, 3, 0, 0, 0, 3, 0, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[5, 9, 5], [4, 2, 4], [3, 18, 6], [4, 10, 5], [5, 14, 5], [5, 3, 8], [5, 8, 5], [4, 1, 4]],\n    18),\n   [17, [3, 3, 0, 2, 3, 0, 3, 3]]),\n  ('regression: multi stroke allocation',\n   ([[5, 11, 9], [5, 2, 5], [3, 13, 5], [4, 15, 5], [3, 4, 3]], 20),\n   [10, [0, 4, 1, 2, 3]]),\n  ('variant scenario 1', ([[4, 9, 5], [5, 18, 8], [4, 12, 4], [4, 7, 8]], 12), [5, [2, 0, 3, 0]]),\n  ('variant scenario 2',\n   ([[3, 2, 7], [3, 4, 5], [4, 9, 4], [5, 11, 6], [5, 7, 9], [4, 18, 5], [5, 12, 4]], -2),\n   [6, [0, 0, 2, 1, 0, 0, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: multi stroke allocation',\n   ([[3, 13, 5],\n     [5, 5, 3],\n     [4, 16, 2],\n     [3, 1, 2],\n     [5, 17, 6],\n     [4, 10, 5],\n     [5, 8, 5],\n     [3, 3, 3],\n     [4, 7, 5],\n     [4, 12, 8],\n     [4, 15, 5],\n     [5, 9, 8]],\n    18),\n   [29, [1, 5, 5, 4, 2, 2, 3, 3, 2, 0, 2, 0]]),\n  ('regression: multi stroke allocation',\n   ([[5, 16, 8],\n     [3, 11, 3],\n     [5, 4, 3],\n     [4, 14, 4],\n     [4, 7, 2],\n     [3, 1, 1],\n     [3, 5, 4],\n     [4, 17, 4],\n     [3, 10, 3],\n     [4, 3, 2],\n     [4, 8, 6]],\n    20),\n   [36, [0, 3, 5, 3, 5, 6, 2, 3, 3, 5, 1]]),\n  ('variant scenario 1',\n   ([[3, 11, 3],\n     [3, 4, 4],\n     [4, 18, 5],\n     [4, 1, None],\n     [4, 15, 8],\n     [5, 3, None],\n     [4, 9, 5],\n     [4, 5, 5],\n     [5, 12, 7],\n     [4, 8, 4],\n     [4, 6, 5]],\n    18),\n   [17, [3, 2, 2, 0, 0, 0, 2, 2, 1, 3, 2]]),\n  ('variant scenario 2',\n   ([[4, 5, None], [4, 13, 4], [5, 12, 9], [4, 10, 7]], 20),\n   [3, [0, 3, 0, 0]])]]\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-golf-stableford-allocation-multi-stroke-allocation","generated_at":"2026-09-29T14:50:28.495506+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Club competition software computes Stableford totals from gross cards and course handicaps.","repair":"Add H // 18 to every hole before the remainder allocation.","root_cause":"The base H // 18 strokes per hole are omitted.","sha256":"713df34b7b33bf18f69d568d6231cc18cdd727de4e513cca3e22d24c872da39c","title":"Handicaps above 18 capped at one stroke per hole · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.126,"exit_code":1,"observations":[{"actual":[4,[2,2]],"check":"control scratch par","expected":[4,[2,2]],"passed":true},{"actual":[3,[2,1]],"check":"boundary stroke index equals remainder","expected":[3,[2,1]],"passed":true},{"actual":[2,[1,1]],"check":"boundary second shot above 18","expected":[3,[2,1]],"passed":false},{"actual":[3,[1,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":true},{"actual":[0,[0,0]],"check":"control blob hole","expected":[0,[0,0]],"passed":true},{"actual":[4,[4]],"check":"control net albatross","expected":[4,[4]],"passed":true},{"actual":[16,[2,3,3,0,0,4,4]],"check":"regression: multi stroke allocation","expected":[16,[2,3,3,0,0,4,4]],"passed":true},{"actual":[9,[0,4,5,0,0]],"check":"regression: multi stroke allocation","expected":[13,[1,5,6,0,1]],"passed":false},{"actual":[6,[0,5,1,0]],"check":"variant scenario 1","expected":[6,[0,5,1,0]],"passed":true},{"actual":[16,[2,1,3,1,1,3,0,0,1,4]],"check":"variant scenario 2","expected":[16,[2,1,3,1,1,3,0,0,1,4]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control scratch par\", \"actual\": [4, [2, 2]], \"expected\": [4, [2, 2]], \"passed\": true}, {\"check\": \"boundary stroke index equals remainder\", \"actual\": [3, [2, 1]], \"expected\": [3, [2, 1]], \"passed\": true}, {\"check\": \"boundary second shot above 18\", \"actual\": [2, [1, 1]], \"expected\": [3, [2, 1]], \"passed\": false}, {\"check\": \"boundary plus handicap\", \"actual\": [3, [1, 2]], \"expected\": [3, [1, 2]], \"passed\": true}, {\"check\": \"control blob hole\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"control net albatross\", \"actual\": [4, [4]], \"expected\": [4, [4]], \"passed\": true}, {\"check\": \"regression: multi stroke allocation\", \"actual\": [16, [2, 3, 3, 0, 0, 4, 4]], \"expected\": [16, [2, 3, 3, 0, 0, 4, 4]], \"passed\": true}, {\"check\": \"regression: multi stroke allocation\", \"actual\": [9, [0, 4, 5, 0, 0]], \"expected\": [13, [1, 5, 6, 0, 1]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [6, [0, 5, 1, 0]], \"expected\": [6, [0, 5, 1, 0]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]], \"expected\": [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.784,"exit_code":1,"observations":[{"actual":[4,[2,2]],"check":"control scratch par","expected":[4,[2,2]],"passed":true},{"actual":[3,[2,1]],"check":"boundary stroke index equals remainder","expected":[3,[2,1]],"passed":true},{"actual":[1,[1,0]],"check":"boundary second shot above 18","expected":[3,[2,1]],"passed":false},{"actual":[3,[1,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":true},{"actual":[0,[0,0]],"check":"control blob hole","expected":[0,[0,0]],"passed":true},{"actual":[3,[3]],"check":"control net albatross","expected":[4,[4]],"passed":false},{"actual":[11,[1,2,2,0,0,3,3]],"check":"regression: multi stroke allocation","expected":[16,[2,3,3,0,0,4,4]],"passed":false},{"actual":[9,[0,4,5,0,0]],"check":"regression: multi stroke allocation","expected":[13,[1,5,6,0,1]],"passed":false},{"actual":[4,[0,4,0,0]],"check":"variant scenario 1","expected":[6,[0,5,1,0]],"passed":false},{"actual":[16,[2,1,3,1,1,3,0,0,1,4]],"check":"variant scenario 2","expected":[16,[2,1,3,1,1,3,0,0,1,4]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control scratch par\", \"actual\": [4, [2, 2]], \"expected\": [4, [2, 2]], \"passed\": true}, {\"check\": \"boundary stroke index equals remainder\", \"actual\": [3, [2, 1]], \"expected\": [3, [2, 1]], \"passed\": true}, {\"check\": \"boundary second shot above 18\", \"actual\": [1, [1, 0]], \"expected\": [3, [2, 1]], \"passed\": false}, {\"check\": \"boundary plus handicap\", \"actual\": [3, [1, 2]], \"expected\": [3, [1, 2]], \"passed\": true}, {\"check\": \"control blob hole\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"control net albatross\", \"actual\": [3, [3]], \"expected\": [4, [4]], \"passed\": false}, {\"check\": \"regression: multi stroke allocation\", \"actual\": [11, [1, 2, 2, 0, 0, 3, 3]], \"expected\": [16, [2, 3, 3, 0, 0, 4, 4]], \"passed\": false}, {\"check\": \"regression: multi stroke allocation\", \"actual\": [9, [0, 4, 5, 0, 0]], \"expected\": [13, [1, 5, 6, 0, 1]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [4, [0, 4, 0, 0]], \"expected\": [6, [0, 5, 1, 0]], \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]], \"expected\": [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.991,"exit_code":0,"observations":[{"actual":[4,[2,2]],"check":"control scratch par","expected":[4,[2,2]],"passed":true},{"actual":[3,[2,1]],"check":"boundary stroke index equals remainder","expected":[3,[2,1]],"passed":true},{"actual":[3,[2,1]],"check":"boundary second shot above 18","expected":[3,[2,1]],"passed":true},{"actual":[3,[1,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":true},{"actual":[0,[0,0]],"check":"control blob hole","expected":[0,[0,0]],"passed":true},{"actual":[4,[4]],"check":"control net albatross","expected":[4,[4]],"passed":true},{"actual":[16,[2,3,3,0,0,4,4]],"check":"regression: multi stroke allocation","expected":[16,[2,3,3,0,0,4,4]],"passed":true},{"actual":[13,[1,5,6,0,1]],"check":"regression: multi stroke allocation","expected":[13,[1,5,6,0,1]],"passed":true},{"actual":[6,[0,5,1,0]],"check":"variant scenario 1","expected":[6,[0,5,1,0]],"passed":true},{"actual":[16,[2,1,3,1,1,3,0,0,1,4]],"check":"variant scenario 2","expected":[16,[2,1,3,1,1,3,0,0,1,4]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control scratch par\", \"actual\": [4, [2, 2]], \"expected\": [4, [2, 2]], \"passed\": true}, {\"check\": \"boundary stroke index equals remainder\", \"actual\": [3, [2, 1]], \"expected\": [3, [2, 1]], \"passed\": true}, {\"check\": \"boundary second shot above 18\", \"actual\": [3, [2, 1]], \"expected\": [3, [2, 1]], \"passed\": true}, {\"check\": \"boundary plus handicap\", \"actual\": [3, [1, 2]], \"expected\": [3, [1, 2]], \"passed\": true}, {\"check\": \"control blob hole\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"control net albatross\", \"actual\": [4, [4]], \"expected\": [4, [4]], \"passed\": true}, {\"check\": \"regression: multi stroke allocation\", \"actual\": [16, [2, 3, 3, 0, 0, 4, 4]], \"expected\": [16, [2, 3, 3, 0, 0, 4, 4]], \"passed\": true}, {\"check\": \"regression: multi stroke allocation\", \"actual\": [13, [1, 5, 6, 0, 1]], \"expected\": [13, [1, 5, 6, 0, 1]], \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": [6, [0, 5, 1, 0]], \"expected\": [6, [0, 5, 1, 0]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]], \"expected\": [16, [2, 1, 3, 1, 1, 3, 0, 0, 1, 4]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}