{"abstract":"Drawn and winning teams collect a losing bonus point.","category":"Sports scoring and tiebreakers","checks":9,"contract":"Rugby union league points. results rows are [team, tries, score, opponent, opp_tries, opp_score]. Win 4 points, draw 2, loss 0. A try bonus point is earned by any team scoring 4 or more tries, and a losing bonus point by a team that loses by 7 points or fewer (both can apply to a loser). Rank by points, then wins, then points difference, then name. Return [team, points, wins, points difference] rows for teams that appear.","contract_signature":"results","evaluation_group":"w2-sports-scoring-rugby-bonus-point-table","failed_approach":"Allowing s <= o still awards a losing bonus for a draw.","family":"w2-sports-scoring-rugby-bonus-point-table-losing-bonus-result-guard","id":"FA-84051","implementations":{"attempt":{"sha256":"17e8d4544b8f23e63b9f9ca63ebaa1326aef605a7dca3129bad03e3f9e05a0cb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(results):\n    table = {}\n    for t1, tr1, s1, t2, tr2, s2 in results:\n        for team, tries, s, o in ((t1, tr1, s1, s2), (t2, tr2, s2, s1)):\n            row = table.setdefault(team, [0, 0, 0])\n            if s > o:\n                row[0] += 4\n                row[1] += 1\n            elif s == o:\n                row[0] += 2\n            if tries >= 4:\n                row[0] += 1\n            if s <= o and o - s <= 7:\n                row[0] += 1\n            row[2] += s - o\n    order = sorted(table, key=lambda t: (-table[t][0], -table[t][1], -table[t][2], t))\n    return [[t] + table[t] for t in order]\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 plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 1, 24, 'Wasps', 4, 3],\n     ['Bath', 3, 30, 'Wasps', 6, 3],\n     ['Leeds', 0, 15, 'Wasps', 5, 30],\n     ['Wasps', 3, 22, 'Bath', 2, 7],\n     ['Sale', 5, 7, 'Bath', 3, 5]],),\n   [['Wasps', 11, 2, -18], ['Bath', 5, 1, 10], ['Sale', 5, 1, 2], ['Leeds', 4, 1, 6]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 2, 7, 'Wasps', 0, 5],\n     ['Bath', 4, 17, 'Sale', 6, 17],\n     ['Sale', 3, 15, 'Leeds', 1, 24],\n     ['Wasps', 0, 30, 'Leeds', 5, 20],\n     ['Leeds', 0, 3, 'Wasps', 2, 30]],),\n   [['Wasps', 9, 2, 35], ['Leeds', 9, 2, -26], ['Bath', 3, 0, 0], ['Sale', 3, 0, -9]]),\n  ('variant scenario 1',\n   ([['Bath', 2, 20, 'Sale', 1, 24],\n     ['Wasps', 1, 30, 'Leeds', 1, 3],\n     ['Leeds', 2, 15, 'Bath', 5, 12],\n     ['Bath', 0, 22, 'Leeds', 4, 7],\n     ['Bath', 1, 30, 'Leeds', 1, 20]],),\n   [['Bath', 11, 2, 18], ['Leeds', 5, 1, -49], ['Wasps', 4, 1, 27], ['Sale', 4, 1, 4]]),\n  ('variant scenario 2',\n   ([['Wasps', 6, 15, 'Sale', 2, 5], ['Leeds', 3, 20, 'Bath', 0, 17]],),\n   [['Wasps', 5, 1, 10], ['Leeds', 4, 1, 3], ['Bath', 1, 0, -3], ['Sale', 0, 0, -10]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Sale', 1, 24, 'Bath', 5, 5], ['Bath', 2, 15, 'Sale', 6, 5]],),\n   [['Sale', 5, 1, 9], ['Bath', 5, 1, -9]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 4, 12, 'Wasps', 2, 12],\n     ['Wasps', 5, 22, 'Sale', 2, 17],\n     ['Wasps', 2, 30, 'Leeds', 4, 24]],),\n   [['Wasps', 11, 2, 11], ['Leeds', 5, 0, -6], ['Sale', 1, 0, -5]]),\n  ('variant scenario 1',\n   ([['Sale', 6, 20, 'Bath', 6, 22],\n     ['Leeds', 1, 22, 'Wasps', 1, 20],\n     ['Wasps', 0, 17, 'Bath', 3, 10],\n     ['Leeds', 6, 15, 'Bath', 3, 30],\n     ['Leeds', 3, 33, 'Bath', 5, 22],\n     ['Wasps', 2, 3, 'Sale', 1, 5]],),\n   [['Bath', 11, 2, -1], ['Leeds', 9, 2, -2], ['Wasps', 6, 1, 3], ['Sale', 6, 1, 0]]),\n  ('variant scenario 2',\n   ([['Wasps', 1, 27, 'Sale', 0, 24],\n     ['Leeds', 1, 24, 'Bath', 1, 15],\n     ['Sale', 4, 10, 'Bath', 2, 27]],),\n   [['Leeds', 4, 1, 9], ['Bath', 4, 1, 8], ['Wasps', 4, 1, 3], ['Sale', 2, 0, -20]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Wasps', 3, 33, 'Bath', 5, 10],\n     ['Sale', 3, 5, 'Wasps', 5, 15],\n     ['Sale', 1, 22, 'Leeds', 4, 7],\n     ['Sale', 5, 10, 'Wasps', 1, 3],\n     ['Leeds', 0, 10, 'Wasps', 3, 30],\n     ['Leeds', 3, 17, 'Wasps', 4, 27]],),\n   [['Wasps', 19, 4, 56], ['Sale', 9, 2, 12], ['Bath', 1, 0, -23], ['Leeds', 1, 0, -45]]),\n  ('regression: losing bonus result guard',\n   ([['Wasps', 0, 7, 'Bath', 5, 22],\n     ['Bath', 2, 22, 'Leeds', 5, 27],\n     ['Bath', 3, 5, 'Wasps', 5, 30],\n     ['Bath', 0, 5, 'Wasps', 6, 3],\n     ['Sale', 1, 10, 'Bath', 1, 10],\n     ['Wasps', 5, 15, 'Sale', 2, 10]],),\n   [['Wasps', 12, 2, 13], ['Bath', 12, 2, -13], ['Leeds', 5, 1, 5], ['Sale', 3, 0, -5]]),\n  ('variant scenario 1',\n   ([['Sale', 5, 24, 'Wasps', 1, 17],\n     ['Sale', 2, 24, 'Wasps', 6, 27],\n     ['Leeds', 2, 24, 'Wasps', 3, 30]],),\n   [['Wasps', 10, 2, 2], ['Sale', 6, 1, 4], ['Leeds', 1, 0, -6]]),\n  ('variant scenario 2',\n   ([['Leeds', 4, 30, 'Bath', 5, 3],\n     ['Wasps', 3, 5, 'Bath', 6, 30],\n     ['Leeds', 2, 27, 'Wasps', 1, 12],\n     ['Leeds', 3, 17, 'Sale', 1, 7]],),\n   [['Leeds', 13, 3, 52], ['Bath', 6, 1, -2], ['Sale', 0, 0, -10], ['Wasps', 0, 0, -40]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Bath', 1, 5, 'Leeds', 1, 10],\n     ['Sale', 0, 30, 'Bath', 4, 5],\n     ['Leeds', 3, 5, 'Wasps', 1, 17],\n     ['Bath', 4, 15, 'Leeds', 3, 7],\n     ['Bath', 5, 27, 'Wasps', 0, 7]],),\n   [['Bath', 12, 2, -2], ['Sale', 4, 1, 25], ['Wasps', 4, 1, -8], ['Leeds', 4, 1, -15]]),\n  ('regression: losing bonus result guard',\n   ([['Wasps', 6, 12, 'Sale', 1, 12],\n     ['Bath', 3, 12, 'Wasps', 1, 24],\n     ['Wasps', 6, 27, 'Bath', 2, 10],\n     ['Bath', 3, 33, 'Wasps', 5, 3]],),\n   [['Wasps', 13, 2, -1], ['Bath', 4, 1, 1], ['Sale', 2, 0, 0]]),\n  ('variant scenario 1',\n   ([['Leeds', 0, 33, 'Wasps', 5, 30],\n     ['Leeds', 1, 22, 'Sale', 2, 12],\n     ['Leeds', 3, 22, 'Wasps', 0, 10],\n     ['Wasps', 5, 17, 'Bath', 1, 24],\n     ['Wasps', 3, 7, 'Sale', 2, 10],\n     ['Bath', 5, 17, 'Leeds', 3, 3],\n     ['Wasps', 2, 10, 'Leeds', 5, 30],\n     ['Leeds', 4, 12, 'Bath', 2, 30]],),\n   [['Leeds', 18, 4, 13], ['Bath', 13, 3, 39], ['Wasps', 5, 0, -45], ['Sale', 4, 1, -7]]),\n  ('variant scenario 2',\n   ([['Leeds', 0, 3, 'Bath', 1, 10],\n     ['Sale', 5, 5, 'Wasps', 3, 20],\n     ['Bath', 6, 20, 'Sale', 3, 10],\n     ['Sale', 4, 17, 'Bath', 5, 7],\n     ['Sale', 6, 15, 'Leeds', 0, 10],\n     ['Wasps', 3, 22, 'Bath', 0, 27]],),\n   [['Bath', 14, 3, 12], ['Sale', 11, 2, -10], ['Wasps', 5, 1, 10], ['Leeds', 2, 0, -12]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 3, 20, 'Bath', 1, 22],\n     ['Sale', 1, 3, 'Leeds', 0, 20],\n     ['Wasps', 4, 5, 'Bath', 1, 12],\n     ['Sale', 3, 22, 'Leeds', 0, 20]],),\n   [['Bath', 8, 2, 9], ['Leeds', 6, 1, 13], ['Sale', 4, 1, -15], ['Wasps', 2, 0, -7]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 1, 33, 'Wasps', 6, 27],\n     ['Sale', 3, 7, 'Bath', 3, 30],\n     ['Sale', 0, 5, 'Wasps', 2, 5],\n     ['Leeds', 6, 7, 'Sale', 5, 7],\n     ['Bath', 0, 5, 'Wasps', 4, 10]],),\n   [['Wasps', 9, 1, -1], ['Leeds', 7, 1, 6], ['Bath', 5, 1, 18], ['Sale', 5, 0, -23]]),\n  ('variant scenario 1',\n   ([['Sale', 1, 22, 'Bath', 1, 3],\n     ['Bath', 0, 15, 'Leeds', 1, 22],\n     ['Wasps', 3, 5, 'Bath', 3, 17],\n     ['Leeds', 5, 12, 'Wasps', 0, 3],\n     ['Sale', 2, 24, 'Bath', 3, 20],\n     ['Sale', 0, 27, 'Leeds', 2, 15],\n     ['Wasps', 6, 20, 'Bath', 6, 24]],),\n   [['Sale', 12, 3, 35], ['Bath', 11, 2, -14], ['Leeds', 9, 2, 4], ['Wasps', 2, 0, -25]]),\n  ('variant scenario 2',\n   ([['Bath', 2, 33, 'Wasps', 2, 27], ['Bath', 3, 12, 'Leeds', 1, 20]],),\n   [['Leeds', 4, 1, 8], ['Bath', 4, 1, -2], ['Wasps', 1, 0, -6]])]]\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":"cbd62f9afcad064f5651a678ea2e51dc671bf4b168693ba9feec8718d81e6fbd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(results):\n    table = {}\n    for t1, tr1, s1, t2, tr2, s2 in results:\n        for team, tries, s, o in ((t1, tr1, s1, s2), (t2, tr2, s2, s1)):\n            row = table.setdefault(team, [0, 0, 0])\n            if s > o:\n                row[0] += 4\n                row[1] += 1\n            elif s == o:\n                row[0] += 2\n            if tries >= 4:\n                row[0] += 1\n            if o - s <= 7:\n                row[0] += 1\n            row[2] += s - o\n    order = sorted(table, key=lambda t: (-table[t][0], -table[t][1], -table[t][2], t))\n    return [[t] + table[t] for t in order]\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 plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 1, 24, 'Wasps', 4, 3],\n     ['Bath', 3, 30, 'Wasps', 6, 3],\n     ['Leeds', 0, 15, 'Wasps', 5, 30],\n     ['Wasps', 3, 22, 'Bath', 2, 7],\n     ['Sale', 5, 7, 'Bath', 3, 5]],),\n   [['Wasps', 11, 2, -18], ['Bath', 5, 1, 10], ['Sale', 5, 1, 2], ['Leeds', 4, 1, 6]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 2, 7, 'Wasps', 0, 5],\n     ['Bath', 4, 17, 'Sale', 6, 17],\n     ['Sale', 3, 15, 'Leeds', 1, 24],\n     ['Wasps', 0, 30, 'Leeds', 5, 20],\n     ['Leeds', 0, 3, 'Wasps', 2, 30]],),\n   [['Wasps', 9, 2, 35], ['Leeds', 9, 2, -26], ['Bath', 3, 0, 0], ['Sale', 3, 0, -9]]),\n  ('variant scenario 1',\n   ([['Bath', 2, 20, 'Sale', 1, 24],\n     ['Wasps', 1, 30, 'Leeds', 1, 3],\n     ['Leeds', 2, 15, 'Bath', 5, 12],\n     ['Bath', 0, 22, 'Leeds', 4, 7],\n     ['Bath', 1, 30, 'Leeds', 1, 20]],),\n   [['Bath', 11, 2, 18], ['Leeds', 5, 1, -49], ['Wasps', 4, 1, 27], ['Sale', 4, 1, 4]]),\n  ('variant scenario 2',\n   ([['Wasps', 6, 15, 'Sale', 2, 5], ['Leeds', 3, 20, 'Bath', 0, 17]],),\n   [['Wasps', 5, 1, 10], ['Leeds', 4, 1, 3], ['Bath', 1, 0, -3], ['Sale', 0, 0, -10]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Sale', 1, 24, 'Bath', 5, 5], ['Bath', 2, 15, 'Sale', 6, 5]],),\n   [['Sale', 5, 1, 9], ['Bath', 5, 1, -9]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 4, 12, 'Wasps', 2, 12],\n     ['Wasps', 5, 22, 'Sale', 2, 17],\n     ['Wasps', 2, 30, 'Leeds', 4, 24]],),\n   [['Wasps', 11, 2, 11], ['Leeds', 5, 0, -6], ['Sale', 1, 0, -5]]),\n  ('variant scenario 1',\n   ([['Sale', 6, 20, 'Bath', 6, 22],\n     ['Leeds', 1, 22, 'Wasps', 1, 20],\n     ['Wasps', 0, 17, 'Bath', 3, 10],\n     ['Leeds', 6, 15, 'Bath', 3, 30],\n     ['Leeds', 3, 33, 'Bath', 5, 22],\n     ['Wasps', 2, 3, 'Sale', 1, 5]],),\n   [['Bath', 11, 2, -1], ['Leeds', 9, 2, -2], ['Wasps', 6, 1, 3], ['Sale', 6, 1, 0]]),\n  ('variant scenario 2',\n   ([['Wasps', 1, 27, 'Sale', 0, 24],\n     ['Leeds', 1, 24, 'Bath', 1, 15],\n     ['Sale', 4, 10, 'Bath', 2, 27]],),\n   [['Leeds', 4, 1, 9], ['Bath', 4, 1, 8], ['Wasps', 4, 1, 3], ['Sale', 2, 0, -20]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Wasps', 3, 33, 'Bath', 5, 10],\n     ['Sale', 3, 5, 'Wasps', 5, 15],\n     ['Sale', 1, 22, 'Leeds', 4, 7],\n     ['Sale', 5, 10, 'Wasps', 1, 3],\n     ['Leeds', 0, 10, 'Wasps', 3, 30],\n     ['Leeds', 3, 17, 'Wasps', 4, 27]],),\n   [['Wasps', 19, 4, 56], ['Sale', 9, 2, 12], ['Bath', 1, 0, -23], ['Leeds', 1, 0, -45]]),\n  ('regression: losing bonus result guard',\n   ([['Wasps', 0, 7, 'Bath', 5, 22],\n     ['Bath', 2, 22, 'Leeds', 5, 27],\n     ['Bath', 3, 5, 'Wasps', 5, 30],\n     ['Bath', 0, 5, 'Wasps', 6, 3],\n     ['Sale', 1, 10, 'Bath', 1, 10],\n     ['Wasps', 5, 15, 'Sale', 2, 10]],),\n   [['Wasps', 12, 2, 13], ['Bath', 12, 2, -13], ['Leeds', 5, 1, 5], ['Sale', 3, 0, -5]]),\n  ('variant scenario 1',\n   ([['Sale', 5, 24, 'Wasps', 1, 17],\n     ['Sale', 2, 24, 'Wasps', 6, 27],\n     ['Leeds', 2, 24, 'Wasps', 3, 30]],),\n   [['Wasps', 10, 2, 2], ['Sale', 6, 1, 4], ['Leeds', 1, 0, -6]]),\n  ('variant scenario 2',\n   ([['Leeds', 4, 30, 'Bath', 5, 3],\n     ['Wasps', 3, 5, 'Bath', 6, 30],\n     ['Leeds', 2, 27, 'Wasps', 1, 12],\n     ['Leeds', 3, 17, 'Sale', 1, 7]],),\n   [['Leeds', 13, 3, 52], ['Bath', 6, 1, -2], ['Sale', 0, 0, -10], ['Wasps', 0, 0, -40]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Bath', 1, 5, 'Leeds', 1, 10],\n     ['Sale', 0, 30, 'Bath', 4, 5],\n     ['Leeds', 3, 5, 'Wasps', 1, 17],\n     ['Bath', 4, 15, 'Leeds', 3, 7],\n     ['Bath', 5, 27, 'Wasps', 0, 7]],),\n   [['Bath', 12, 2, -2], ['Sale', 4, 1, 25], ['Wasps', 4, 1, -8], ['Leeds', 4, 1, -15]]),\n  ('regression: losing bonus result guard',\n   ([['Wasps', 6, 12, 'Sale', 1, 12],\n     ['Bath', 3, 12, 'Wasps', 1, 24],\n     ['Wasps', 6, 27, 'Bath', 2, 10],\n     ['Bath', 3, 33, 'Wasps', 5, 3]],),\n   [['Wasps', 13, 2, -1], ['Bath', 4, 1, 1], ['Sale', 2, 0, 0]]),\n  ('variant scenario 1',\n   ([['Leeds', 0, 33, 'Wasps', 5, 30],\n     ['Leeds', 1, 22, 'Sale', 2, 12],\n     ['Leeds', 3, 22, 'Wasps', 0, 10],\n     ['Wasps', 5, 17, 'Bath', 1, 24],\n     ['Wasps', 3, 7, 'Sale', 2, 10],\n     ['Bath', 5, 17, 'Leeds', 3, 3],\n     ['Wasps', 2, 10, 'Leeds', 5, 30],\n     ['Leeds', 4, 12, 'Bath', 2, 30]],),\n   [['Leeds', 18, 4, 13], ['Bath', 13, 3, 39], ['Wasps', 5, 0, -45], ['Sale', 4, 1, -7]]),\n  ('variant scenario 2',\n   ([['Leeds', 0, 3, 'Bath', 1, 10],\n     ['Sale', 5, 5, 'Wasps', 3, 20],\n     ['Bath', 6, 20, 'Sale', 3, 10],\n     ['Sale', 4, 17, 'Bath', 5, 7],\n     ['Sale', 6, 15, 'Leeds', 0, 10],\n     ['Wasps', 3, 22, 'Bath', 0, 27]],),\n   [['Bath', 14, 3, 12], ['Sale', 11, 2, -10], ['Wasps', 5, 1, 10], ['Leeds', 2, 0, -12]])],\n [('control plain win',\n   ([['Bath', 2, 20, 'Leeds', 1, 10]],),\n   [['Bath', 4, 1, 10], ['Leeds', 0, 0, -10]]),\n  ('boundary losing by seven',\n   ([['Bath', 1, 17, 'Leeds', 2, 10]],),\n   [['Bath', 4, 1, 7], ['Leeds', 1, 0, -7]]),\n  ('boundary four tries in defeat',\n   ([['Bath', 3, 30, 'Leeds', 4, 24]],),\n   [['Bath', 4, 1, 6], ['Leeds', 2, 0, -6]]),\n  ('control draw', ([['Bath', 1, 10, 'Leeds', 1, 10]],), [['Bath', 2, 0, 0], ['Leeds', 2, 0, 0]]),\n  ('boundary losing by eight',\n   ([['Sale', 2, 18, 'Wasps', 1, 10]],),\n   [['Sale', 4, 1, 8], ['Wasps', 0, 0, -8]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 3, 20, 'Bath', 1, 22],\n     ['Sale', 1, 3, 'Leeds', 0, 20],\n     ['Wasps', 4, 5, 'Bath', 1, 12],\n     ['Sale', 3, 22, 'Leeds', 0, 20]],),\n   [['Bath', 8, 2, 9], ['Leeds', 6, 1, 13], ['Sale', 4, 1, -15], ['Wasps', 2, 0, -7]]),\n  ('regression: losing bonus result guard',\n   ([['Leeds', 1, 33, 'Wasps', 6, 27],\n     ['Sale', 3, 7, 'Bath', 3, 30],\n     ['Sale', 0, 5, 'Wasps', 2, 5],\n     ['Leeds', 6, 7, 'Sale', 5, 7],\n     ['Bath', 0, 5, 'Wasps', 4, 10]],),\n   [['Wasps', 9, 1, -1], ['Leeds', 7, 1, 6], ['Bath', 5, 1, 18], ['Sale', 5, 0, -23]]),\n  ('variant scenario 1',\n   ([['Sale', 1, 22, 'Bath', 1, 3],\n     ['Bath', 0, 15, 'Leeds', 1, 22],\n     ['Wasps', 3, 5, 'Bath', 3, 17],\n     ['Leeds', 5, 12, 'Wasps', 0, 3],\n     ['Sale', 2, 24, 'Bath', 3, 20],\n     ['Sale', 0, 27, 'Leeds', 2, 15],\n     ['Wasps', 6, 20, 'Bath', 6, 24]],),\n   [['Sale', 12, 3, 35], ['Bath', 11, 2, -14], ['Leeds', 9, 2, 4], ['Wasps', 2, 0, -25]]),\n  ('variant scenario 2',\n   ([['Bath', 2, 33, 'Wasps', 2, 27], ['Bath', 3, 12, 'Leeds', 1, 20]],),\n   [['Leeds', 4, 1, 8], ['Bath', 4, 1, -2], ['Wasps', 1, 0, -6]])]]\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-rugby-bonus-point-table-losing-bonus-result-guard","generated_at":"2026-09-29T14:50:27.214907+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Bonus-point tables are tight; each threshold changes qualification.","root_cause":"The losing bonus only checks the margin, not that the team lost.","sha256":"41b39f7f7007df353d46637c126ccb8dd6a5bfcab02044944e95d8870651fb23","title":"Losing bonus granted to winners or drawn sides · 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":42.12,"exit_code":1,"observations":[{"actual":[["Bath",4,1,10],["Leeds",0,0,-10]],"check":"control plain win","expected":[["Bath",4,1,10],["Leeds",0,0,-10]],"passed":true},{"actual":[["Bath",4,1,7],["Leeds",1,0,-7]],"check":"boundary losing by seven","expected":[["Bath",4,1,7],["Leeds",1,0,-7]],"passed":true},{"actual":[["Bath",4,1,6],["Leeds",2,0,-6]],"check":"boundary four tries in defeat","expected":[["Bath",4,1,6],["Leeds",2,0,-6]],"passed":true},{"actual":[["Bath",3,0,0],["Leeds",3,0,0]],"check":"control draw","expected":[["Bath",2,0,0],["Leeds",2,0,0]],"passed":false},{"actual":[["Sale",4,1,8],["Wasps",0,0,-8]],"check":"boundary losing by eight","expected":[["Sale",4,1,8],["Wasps",0,0,-8]],"passed":true},{"actual":[["Wasps",11,2,-18],["Bath",5,1,10],["Sale",5,1,2],["Leeds",4,1,6]],"check":"regression: losing bonus result guard","expected":[["Wasps",11,2,-18],["Bath",5,1,10],["Sale",5,1,2],["Leeds",4,1,6]],"passed":true},{"actual":[["Wasps",9,2,35],["Leeds",9,2,-26],["Bath",4,0,0],["Sale",4,0,-9]],"check":"regression: losing bonus result guard","expected":[["Wasps",9,2,35],["Leeds",9,2,-26],["Bath",3,0,0],["Sale",3,0,-9]],"passed":false},{"actual":[["Bath",11,2,18],["Leeds",5,1,-49],["Wasps",4,1,27],["Sale",4,1,4]],"check":"variant scenario 1","expected":[["Bath",11,2,18],["Leeds",5,1,-49],["Wasps",4,1,27],["Sale",4,1,4]],"passed":true},{"actual":[["Wasps",5,1,10],["Leeds",4,1,3],["Bath",1,0,-3],["Sale",0,0,-10]],"check":"variant scenario 2","expected":[["Wasps",5,1,10],["Leeds",4,1,3],["Bath",1,0,-3],["Sale",0,0,-10]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control plain win\", \"actual\": [[\"Bath\", 4, 1, 10], [\"Leeds\", 0, 0, -10]], \"expected\": [[\"Bath\", 4, 1, 10], [\"Leeds\", 0, 0, -10]], \"passed\": true}, {\"check\": \"boundary losing by seven\", \"actual\": [[\"Bath\", 4, 1, 7], [\"Leeds\", 1, 0, -7]], \"expected\": [[\"Bath\", 4, 1, 7], [\"Leeds\", 1, 0, -7]], \"passed\": true}, {\"check\": \"boundary four tries in defeat\", \"actual\": [[\"Bath\", 4, 1, 6], [\"Leeds\", 2, 0, -6]], \"expected\": [[\"Bath\", 4, 1, 6], [\"Leeds\", 2, 0, -6]], \"passed\": true}, {\"check\": \"control draw\", \"actual\": [[\"Bath\", 3, 0, 0], [\"Leeds\", 3, 0, 0]], \"expected\": [[\"Bath\", 2, 0, 0], [\"Leeds\", 2, 0, 0]], \"passed\": false}, {\"check\": \"boundary losing by eight\", \"actual\": [[\"Sale\", 4, 1, 8], [\"Wasps\", 0, 0, -8]], \"expected\": [[\"Sale\", 4, 1, 8], [\"Wasps\", 0, 0, -8]], \"passed\": true}, {\"check\": \"regression: losing bonus result guard\", \"actual\": [[\"Wasps\", 11, 2, -18], [\"Bath\", 5, 1, 10], [\"Sale\", 5, 1, 2], [\"Leeds\", 4, 1, 6]], \"expected\": [[\"Wasps\", 11, 2, -18], [\"Bath\", 5, 1, 10], [\"Sale\", 5, 1, 2], [\"Leeds\", 4, 1, 6]], \"passed\": true}, {\"check\": \"regression: losing bonus result guard\", \"actual\": [[\"Wasps\", 9, 2, 35], [\"Leeds\", 9, 2, -26], [\"Bath\", 4, 0, 0], [\"Sale\", 4, 0, -9]], \"expected\": [[\"Wasps\", 9, 2, 35], [\"Leeds\", 9, 2, -26], [\"Bath\", 3, 0, 0], [\"Sale\", 3, 0, -9]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [[\"Bath\", 11, 2, 18], [\"Leeds\", 5, 1, -49], [\"Wasps\", 4, 1, 27], [\"Sale\", 4, 1, 4]], \"expected\": [[\"Bath\", 11, 2, 18], [\"Leeds\", 5, 1, -49], [\"Wasps\", 4, 1, 27], [\"Sale\", 4, 1, 4]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [[\"Wasps\", 5, 1, 10], [\"Leeds\", 4, 1, 3], [\"Bath\", 1, 0, -3], [\"Sale\", 0, 0, -10]], \"expected\": [[\"Wasps\", 5, 1, 10], [\"Leeds\", 4, 1, 3], [\"Bath\", 1, 0, -3], [\"Sale\", 0, 0, -10]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.335,"exit_code":1,"observations":[{"actual":[["Bath",5,1,10],["Leeds",0,0,-10]],"check":"control plain win","expected":[["Bath",4,1,10],["Leeds",0,0,-10]],"passed":false},{"actual":[["Bath",5,1,7],["Leeds",1,0,-7]],"check":"boundary losing by seven","expected":[["Bath",4,1,7],["Leeds",1,0,-7]],"passed":false},{"actual":[["Bath",5,1,6],["Leeds",2,0,-6]],"check":"boundary four tries in defeat","expected":[["Bath",4,1,6],["Leeds",2,0,-6]],"passed":false},{"actual":[["Bath",3,0,0],["Leeds",3,0,0]],"check":"control draw","expected":[["Bath",2,0,0],["Leeds",2,0,0]],"passed":false},{"actual":[["Sale",5,1,8],["Wasps",0,0,-8]],"check":"boundary losing by eight","expected":[["Sale",4,1,8],["Wasps",0,0,-8]],"passed":false},{"actual":[["Wasps",13,2,-18],["Bath",6,1,10],["Sale",6,1,2],["Leeds",5,1,6]],"check":"regression: losing bonus result guard","expected":[["Wasps",11,2,-18],["Bath",5,1,10],["Sale",5,1,2],["Leeds",4,1,6]],"passed":false},{"actual":[["Wasps",11,2,35],["Leeds",11,2,-26],["Bath",4,0,0],["Sale",4,0,-9]],"check":"regression: losing bonus result guard","expected":[["Wasps",9,2,35],["Leeds",9,2,-26],["Bath",3,0,0],["Sale",3,0,-9]],"passed":false},{"actual":[["Bath",13,2,18],["Leeds",6,1,-49],["Wasps",5,1,27],["Sale",5,1,4]],"check":"variant scenario 1","expected":[["Bath",11,2,18],["Leeds",5,1,-49],["Wasps",4,1,27],["Sale",4,1,4]],"passed":false},{"actual":[["Wasps",6,1,10],["Leeds",5,1,3],["Bath",1,0,-3],["Sale",0,0,-10]],"check":"variant scenario 2","expected":[["Wasps",5,1,10],["Leeds",4,1,3],["Bath",1,0,-3],["Sale",0,0,-10]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control plain win\", \"actual\": [[\"Bath\", 5, 1, 10], [\"Leeds\", 0, 0, -10]], \"expected\": [[\"Bath\", 4, 1, 10], [\"Leeds\", 0, 0, -10]], \"passed\": false}, {\"check\": \"boundary losing by seven\", \"actual\": [[\"Bath\", 5, 1, 7], [\"Leeds\", 1, 0, -7]], \"expected\": [[\"Bath\", 4, 1, 7], [\"Leeds\", 1, 0, -7]], \"passed\": false}, {\"check\": \"boundary four tries in defeat\", \"actual\": [[\"Bath\", 5, 1, 6], [\"Leeds\", 2, 0, -6]], \"expected\": [[\"Bath\", 4, 1, 6], [\"Leeds\", 2, 0, -6]], \"passed\": false}, {\"check\": \"control draw\", \"actual\": [[\"Bath\", 3, 0, 0], [\"Leeds\", 3, 0, 0]], \"expected\": [[\"Bath\", 2, 0, 0], [\"Leeds\", 2, 0, 0]], \"passed\": false}, {\"check\": \"boundary losing by eight\", \"actual\": [[\"Sale\", 5, 1, 8], [\"Wasps\", 0, 0, -8]], \"expected\": [[\"Sale\", 4, 1, 8], [\"Wasps\", 0, 0, -8]], \"passed\": false}, {\"check\": \"regression: losing bonus result guard\", \"actual\": [[\"Wasps\", 13, 2, -18], [\"Bath\", 6, 1, 10], [\"Sale\", 6, 1, 2], [\"Leeds\", 5, 1, 6]], \"expected\": [[\"Wasps\", 11, 2, -18], [\"Bath\", 5, 1, 10], [\"Sale\", 5, 1, 2], [\"Leeds\", 4, 1, 6]], \"passed\": false}, {\"check\": \"regression: losing bonus result guard\", \"actual\": [[\"Wasps\", 11, 2, 35], [\"Leeds\", 11, 2, -26], [\"Bath\", 4, 0, 0], [\"Sale\", 4, 0, -9]], \"expected\": [[\"Wasps\", 9, 2, 35], [\"Leeds\", 9, 2, -26], [\"Bath\", 3, 0, 0], [\"Sale\", 3, 0, -9]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [[\"Bath\", 13, 2, 18], [\"Leeds\", 6, 1, -49], [\"Wasps\", 5, 1, 27], [\"Sale\", 5, 1, 4]], \"expected\": [[\"Bath\", 11, 2, 18], [\"Leeds\", 5, 1, -49], [\"Wasps\", 4, 1, 27], [\"Sale\", 4, 1, 4]], \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": [[\"Wasps\", 6, 1, 10], [\"Leeds\", 5, 1, 3], [\"Bath\", 1, 0, -3], [\"Sale\", 0, 0, -10]], \"expected\": [[\"Wasps\", 5, 1, 10], [\"Leeds\", 4, 1, 3], [\"Bath\", 1, 0, -3], [\"Sale\", 0, 0, -10]], \"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."}}