{"abstract":"Boxes far apart on x are reported as candidates.","category":"Collision detection broadphase","checks":8,"contract":"solve(boxes): boxes [id,minx,miny,maxx,maxy] with closed intervals (touching overlaps). Sweep x endpoints sorted by (coord, begin-before-end); on each begin, test y against every active box. Return sorted [min id, max id] pairs overlapping on both axes.","contract_signature":"boxes","evaluation_group":"w2-collision_detection_broadphase-sort-and-sweep-2d","failed_approach":"Popping the oldest active entry removes the wrong box when intervals end out of order.","family":"w2-collision_detection_broadphase-sort-and-sweep-2d-active-list-removal","id":"FA-87356","implementations":{"attempt":{"sha256":"95a1af6aada7d79fb76652e5d8f979b16a3e7b0f6db00d45f950ebd3e9a2c86a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    ev = []\n    for b in boxes:\n        ev.append((b[1], 0, b[0]))\n        ev.append((b[3], 1, b[0]))\n    ev.sort()\n    byid = {b[0]: b for b in boxes}\n    active = []\n    pairs = []\n    for x, kind, i in ev:\n        if kind == 0:\n            bi = byid[i]\n            for j in active:\n                bj = byid[j]\n                if bi[2] <= bj[4] and bj[2] <= bi[4]:\n                    pairs.append([min(i, j), max(i, j)])\n            active.append(i)\n        else:\n            active.pop(0)\n    pairs.sort()\n    return pairs\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[6, -1.0, -4.0, 2.0, -3.0], [25, -5.0, 0.0, -5.0, 0.0]]], []], [[[[14, 1.0, -4.0, 4.0, -1.0], [6, 0.0, -1.0, 4.0, 3.0], [32, -2.0, -3.0, 2.0, -1.0], [15, -4.0, 0.0, -4.0, 4.0], [7, -4.0, -2.0, -1.0, -2.0]]], [[6, 14], [6, 32], [7, 32], [14, 32]]], [[[[28, -3.0, 6.0, -1.0, 6.0], [15, 4.0, 5.0, 4.0, 5.0], [5, -5.0, 4.0, -3.0, 4.0], [23, -3.0, 0.0, 1.0, 2.0], [37, 2.0, -6.0, 6.0, -2.0]]], []], [[[[5, 0.0, 3.0, 2.0, 5.0], [15, -2.0, 3.0, -1.0, 6.0], [34, -3.0, 6.0, -2.0, 6.0], [20, -2.0, 1.0, 2.0, 4.0], [23, -2.0, -1.0, -2.0, -1.0], [1, 4.0, -5.0, 6.0, -2.0], [25, 0.0, 5.0, 1.0, 9.0]]], [[5, 20], [5, 25], [15, 20], [15, 34]]], [[[[3, 2.0, -5.0, 2.0, -2.0], [24, -2.0, -4.0, 2.0, -4.0], [26, 6.0, 4.0, 10.0, 8.0], [4, -2.0, 2.0, -1.0, 3.0], [29, -5.0, -2.0, -2.0, 2.0], [11, 4.0, 3.0, 4.0, 6.0]]], [[3, 24], [4, 29]]], [[[[26, 4.0, -5.0, 7.0, -5.0], [33, -1.0, 1.0, 3.0, 2.0], [37, 0.0, -3.0, 2.0, 0.0], [6, -3.0, -2.0, 1.0, -2.0], [24, -3.0, 3.0, -2.0, 7.0]]], [[6, 37]]], [[[[16, 1.0, -6.0, 1.0, -4.0], [2, 3.0, 3.0, 6.0, 4.0], [25, 5.0, 2.0, 8.0, 2.0], [39, 2.0, 6.0, 2.0, 6.0], [30, -1.0, 5.0, -1.0, 6.0], [15, 0.0, 4.0, 3.0, 8.0], [17, 4.0, -1.0, 4.0, -1.0]]], [[2, 15], [15, 39]]], [[[[23, 5.0, 6.0, 5.0, 7.0], [39, 0.0, 3.0, 4.0, 3.0], [27, -5.0, -4.0, -4.0, -4.0]]], []]], [[[[[14, 0.0, 3.0, 0.0, 5.0], [29, -6.0, -6.0, -6.0, -2.0], [27, 5.0, -5.0, 9.0, -1.0]]], []], [[[[13, 5.0, -3.0, 6.0, -2.0], [34, 3.0, 3.0, 5.0, 4.0], [8, -4.0, 5.0, -3.0, 6.0], [10, 0.0, 1.0, 3.0, 4.0], [27, 2.0, 3.0, 2.0, 5.0], [4, -5.0, -2.0, -5.0, 2.0], [22, -6.0, 0.0, -5.0, 1.0]]], [[4, 22], [10, 27], [10, 34]]], [[[[29, 3.0, -1.0, 7.0, 0.0], [20, -4.0, -6.0, -3.0, -4.0]]], []], [[[[16, 2.0, 6.0, 2.0, 10.0], [6, 2.0, -4.0, 4.0, -2.0], [22, 0.0, 2.0, 1.0, 4.0], [3, 2.0, -4.0, 2.0, -1.0], [17, -2.0, -4.0, -1.0, -3.0], [30, -6.0, -6.0, -2.0, -6.0], [34, 4.0, -5.0, 5.0, -1.0], [14, -1.0, 3.0, -1.0, 7.0]]], [[3, 6], [6, 34]]], [[[[5, 3.0, 4.0, 4.0, 8.0], [37, 2.0, 1.0, 6.0, 4.0]]], [[5, 37]]], [[[[11, -1.0, 2.0, 3.0, 2.0], [9, 3.0, -1.0, 4.0, 0.0], [20, 5.0, -4.0, 9.0, -2.0]]], []], [[[[37, 4.0, -5.0, 6.0, -1.0], [20, -4.0, -3.0, -2.0, 1.0], [3, 6.0, -1.0, 8.0, 3.0], [8, -5.0, 0.0, -5.0, 4.0], [25, 4.0, 6.0, 6.0, 9.0]]], [[3, 37]]], [[[[7, 0.0, -3.0, 2.0, 1.0], [37, -4.0, -6.0, -3.0, -5.0], [13, -6.0, -3.0, -6.0, -3.0], [6, -2.0, 0.0, -1.0, 2.0], [31, 5.0, -5.0, 6.0, -1.0], [14, -2.0, 6.0, -1.0, 10.0]]], []]], [[[[[2, 0.0, 6.0, 1.0, 7.0], [8, 2.0, 4.0, 4.0, 6.0], [10, 2.0, 2.0, 5.0, 5.0], [6, -5.0, -6.0, -1.0, -2.0], [24, -1.0, 3.0, 0.0, 3.0]]], [[8, 10]]], [[[[24, 3.0, -4.0, 3.0, -1.0], [20, 0.0, -6.0, 3.0, -4.0]]], [[20, 24]]], [[[[35, 5.0, 1.0, 9.0, 1.0], [28, 4.0, -1.0, 7.0, 0.0]]], []], [[[[18, 2.0, 2.0, 4.0, 2.0], [9, 4.0, 2.0, 4.0, 3.0]]], [[9, 18]]], [[[[12, -1.0, -5.0, 2.0, -2.0], [19, -2.0, -1.0, -1.0, 0.0]]], []], [[[[5, -6.0, 5.0, -6.0, 6.0], [36, -2.0, -3.0, -2.0, -2.0], [27, 2.0, 5.0, 5.0, 6.0], [13, 6.0, 1.0, 7.0, 5.0], [14, 6.0, 5.0, 8.0, 9.0], [16, -6.0, -4.0, -5.0, 0.0], [12, 5.0, 6.0, 7.0, 8.0]]], [[12, 14], [12, 27], [13, 14]]], [[[[14, 6.0, 3.0, 7.0, 5.0], [11, -2.0, -6.0, 0.0, -6.0], [30, -6.0, 2.0, -2.0, 3.0], [34, 1.0, 1.0, 5.0, 5.0], [25, 5.0, -4.0, 6.0, -1.0], [24, -3.0, -6.0, -3.0, -5.0]]], []], [[[[39, 0.0, -6.0, 1.0, -6.0], [24, -6.0, -2.0, -2.0, 1.0], [27, 2.0, -5.0, 6.0, -1.0], [7, 3.0, -5.0, 4.0, -2.0], [28, -5.0, 0.0, -1.0, 1.0], [13, -4.0, -3.0, -1.0, 0.0], [9, 6.0, -2.0, 10.0, -1.0], [37, 3.0, 6.0, 6.0, 7.0]]], [[7, 27], [9, 27], [13, 24], [13, 28], [24, 28]]]], [[[[[25, -6.0, -6.0, -3.0, -5.0], [23, 5.0, -2.0, 7.0, -1.0], [3, 1.0, -3.0, 5.0, 1.0]]], [[3, 23]]], [[[[34, -2.0, -6.0, -1.0, -6.0], [39, 5.0, -4.0, 7.0, -3.0], [9, 1.0, -3.0, 2.0, -2.0], [38, 2.0, 5.0, 4.0, 6.0], [8, -5.0, 1.0, -3.0, 4.0], [26, -2.0, -2.0, 2.0, 0.0], [4, 5.0, -5.0, 6.0, -3.0], [35, 3.0, 1.0, 6.0, 2.0], [10, -4.0, 6.0, -2.0, 6.0], [31, 2.0, 1.0, 5.0, 3.0]]], [[4, 39], [9, 26], [31, 35]]], [[[[39, 4.0, -4.0, 8.0, -2.0], [4, -2.0, -1.0, 1.0, 0.0], [20, 0.0, -4.0, 2.0, -1.0], [17, 3.0, -5.0, 4.0, -4.0]]], [[4, 20], [17, 39]]], [[[[5, 0.0, -2.0, 3.0, -2.0], [7, 5.0, 2.0, 5.0, 5.0], [21, 4.0, 3.0, 4.0, 4.0], [27, 6.0, 3.0, 9.0, 6.0], [1, 2.0, 5.0, 5.0, 7.0]]], [[1, 7]]], [[[[27, 1.0, -4.0, 2.0, -3.0], [22, -3.0, 5.0, 0.0, 7.0], [36, 0.0, -2.0, 4.0, -1.0]]], []], [[[[10, 1.0, 3.0, 5.0, 4.0], [21, 5.0, 0.0, 7.0, 2.0], [27, 5.0, 1.0, 6.0, 5.0], [34, -1.0, -4.0, 2.0, -3.0]]], [[10, 27], [21, 27]]], [[[[23, -4.0, -3.0, -1.0, -3.0], [30, -6.0, -4.0, -4.0, -4.0], [13, 5.0, 0.0, 9.0, 3.0], [1, -5.0, 6.0, -4.0, 6.0], [37, -1.0, 2.0, 0.0, 2.0], [11, 5.0, 0.0, 9.0, 0.0], [21, 0.0, 4.0, 1.0, 8.0], [35, -5.0, -4.0, -5.0, -1.0], [4, 0.0, -4.0, 0.0, -2.0], [32, -4.0, 0.0, 0.0, 4.0]]], [[11, 13], [21, 32], [30, 35], [32, 37]]], [[[[39, -6.0, 1.0, -6.0, 5.0], [6, -5.0, -4.0, -2.0, 0.0], [17, 0.0, 4.0, 2.0, 7.0], [35, -6.0, 5.0, -6.0, 7.0]]], [[35, 39]]]], [[[[[24, 5.0, -5.0, 8.0, -3.0], [23, -4.0, 1.0, 0.0, 4.0], [4, -6.0, -6.0, -2.0, -6.0], [2, -4.0, 2.0, -3.0, 2.0], [7, 0.0, 3.0, 2.0, 4.0], [19, 0.0, -5.0, 4.0, -1.0]]], [[2, 23], [7, 23]]], [[[[35, 1.0, 0.0, 1.0, 0.0], [39, 0.0, -3.0, 4.0, 0.0], [7, 2.0, -3.0, 2.0, -2.0], [2, 5.0, 5.0, 5.0, 6.0]]], [[7, 39], [35, 39]]], [[[[4, 1.0, -1.0, 5.0, -1.0], [36, -4.0, -5.0, -1.0, -5.0], [10, 3.0, 6.0, 5.0, 6.0], [11, 0.0, -1.0, 4.0, 0.0], [22, -1.0, 0.0, 1.0, 4.0], [14, 1.0, -4.0, 4.0, -2.0], [3, -1.0, 0.0, 1.0, 0.0]]], [[3, 11], [3, 22], [4, 11], [11, 22]]], [[[[22, 6.0, 3.0, 7.0, 5.0], [2, -3.0, 2.0, -3.0, 2.0], [1, -5.0, 4.0, -3.0, 8.0], [18, 2.0, 4.0, 4.0, 6.0], [29, 0.0, -5.0, 0.0, -2.0], [21, 6.0, 4.0, 6.0, 4.0], [10, 2.0, 1.0, 6.0, 5.0], [4, -6.0, 5.0, -6.0, 9.0], [20, -1.0, 4.0, 0.0, 7.0], [12, 3.0, 6.0, 6.0, 10.0], [5, -4.0, 4.0, -1.0, 5.0]]], [[1, 5], [5, 20], [10, 18], [10, 21], [10, 22], [12, 18], [21, 22]]], [[[[21, 5.0, 1.0, 6.0, 2.0], [6, 0.0, 6.0, 2.0, 8.0], [3, 5.0, 4.0, 5.0, 5.0]]], []], [[[[34, 5.0, 0.0, 6.0, 2.0], [15, 0.0, 3.0, 3.0, 5.0], [29, -3.0, -4.0, -1.0, -2.0]]], []], [[[[5, 2.0, 6.0, 5.0, 6.0], [12, -3.0, 3.0, -2.0, 4.0], [35, -2.0, -4.0, -1.0, -4.0], [22, 6.0, 6.0, 9.0, 6.0], [28, 1.0, -6.0, 1.0, -2.0], [3, -2.0, -2.0, -2.0, 2.0], [16, 6.0, 5.0, 6.0, 5.0], [11, -3.0, 4.0, -3.0, 6.0], [37, -4.0, 3.0, -1.0, 7.0], [32, -5.0, -2.0, -1.0, -2.0], [18, 0.0, -5.0, 0.0, -2.0]]], [[3, 32], [11, 12], [11, 37], [12, 37]]], [[[[11, 6.0, -3.0, 7.0, 1.0], [26, -3.0, -5.0, 0.0, -4.0], [32, 1.0, 5.0, 1.0, 5.0], [1, -3.0, -2.0, 1.0, 2.0], [39, 5.0, -3.0, 5.0, -2.0], [12, 5.0, 4.0, 8.0, 7.0], [21, 0.0, -6.0, 3.0, -3.0], [17, 5.0, -3.0, 7.0, -1.0], [9, -6.0, -2.0, -4.0, 0.0]]], [[11, 17], [17, 39], [21, 26]]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"1bf21dd4ffc5dab08bd2dd821f1a2e7f9b38115fdb1b1dc06aaafecf5feb46e1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    ev = []\n    for b in boxes:\n        ev.append((b[1], 0, b[0]))\n        ev.append((b[3], 1, b[0]))\n    ev.sort()\n    byid = {b[0]: b for b in boxes}\n    active = []\n    pairs = []\n    for x, kind, i in ev:\n        if kind == 0:\n            bi = byid[i]\n            for j in active:\n                bj = byid[j]\n                if bi[2] <= bj[4] and bj[2] <= bi[4]:\n                    pairs.append([min(i, j), max(i, j)])\n            active.append(i)\n        else:\n            pass\n    pairs.sort()\n    return pairs\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[6, -1.0, -4.0, 2.0, -3.0], [25, -5.0, 0.0, -5.0, 0.0]]], []], [[[[14, 1.0, -4.0, 4.0, -1.0], [6, 0.0, -1.0, 4.0, 3.0], [32, -2.0, -3.0, 2.0, -1.0], [15, -4.0, 0.0, -4.0, 4.0], [7, -4.0, -2.0, -1.0, -2.0]]], [[6, 14], [6, 32], [7, 32], [14, 32]]], [[[[28, -3.0, 6.0, -1.0, 6.0], [15, 4.0, 5.0, 4.0, 5.0], [5, -5.0, 4.0, -3.0, 4.0], [23, -3.0, 0.0, 1.0, 2.0], [37, 2.0, -6.0, 6.0, -2.0]]], []], [[[[5, 0.0, 3.0, 2.0, 5.0], [15, -2.0, 3.0, -1.0, 6.0], [34, -3.0, 6.0, -2.0, 6.0], [20, -2.0, 1.0, 2.0, 4.0], [23, -2.0, -1.0, -2.0, -1.0], [1, 4.0, -5.0, 6.0, -2.0], [25, 0.0, 5.0, 1.0, 9.0]]], [[5, 20], [5, 25], [15, 20], [15, 34]]], [[[[3, 2.0, -5.0, 2.0, -2.0], [24, -2.0, -4.0, 2.0, -4.0], [26, 6.0, 4.0, 10.0, 8.0], [4, -2.0, 2.0, -1.0, 3.0], [29, -5.0, -2.0, -2.0, 2.0], [11, 4.0, 3.0, 4.0, 6.0]]], [[3, 24], [4, 29]]], [[[[26, 4.0, -5.0, 7.0, -5.0], [33, -1.0, 1.0, 3.0, 2.0], [37, 0.0, -3.0, 2.0, 0.0], [6, -3.0, -2.0, 1.0, -2.0], [24, -3.0, 3.0, -2.0, 7.0]]], [[6, 37]]], [[[[16, 1.0, -6.0, 1.0, -4.0], [2, 3.0, 3.0, 6.0, 4.0], [25, 5.0, 2.0, 8.0, 2.0], [39, 2.0, 6.0, 2.0, 6.0], [30, -1.0, 5.0, -1.0, 6.0], [15, 0.0, 4.0, 3.0, 8.0], [17, 4.0, -1.0, 4.0, -1.0]]], [[2, 15], [15, 39]]], [[[[23, 5.0, 6.0, 5.0, 7.0], [39, 0.0, 3.0, 4.0, 3.0], [27, -5.0, -4.0, -4.0, -4.0]]], []]], [[[[[14, 0.0, 3.0, 0.0, 5.0], [29, -6.0, -6.0, -6.0, -2.0], [27, 5.0, -5.0, 9.0, -1.0]]], []], [[[[13, 5.0, -3.0, 6.0, -2.0], [34, 3.0, 3.0, 5.0, 4.0], [8, -4.0, 5.0, -3.0, 6.0], [10, 0.0, 1.0, 3.0, 4.0], [27, 2.0, 3.0, 2.0, 5.0], [4, -5.0, -2.0, -5.0, 2.0], [22, -6.0, 0.0, -5.0, 1.0]]], [[4, 22], [10, 27], [10, 34]]], [[[[29, 3.0, -1.0, 7.0, 0.0], [20, -4.0, -6.0, -3.0, -4.0]]], []], [[[[16, 2.0, 6.0, 2.0, 10.0], [6, 2.0, -4.0, 4.0, -2.0], [22, 0.0, 2.0, 1.0, 4.0], [3, 2.0, -4.0, 2.0, -1.0], [17, -2.0, -4.0, -1.0, -3.0], [30, -6.0, -6.0, -2.0, -6.0], [34, 4.0, -5.0, 5.0, -1.0], [14, -1.0, 3.0, -1.0, 7.0]]], [[3, 6], [6, 34]]], [[[[5, 3.0, 4.0, 4.0, 8.0], [37, 2.0, 1.0, 6.0, 4.0]]], [[5, 37]]], [[[[11, -1.0, 2.0, 3.0, 2.0], [9, 3.0, -1.0, 4.0, 0.0], [20, 5.0, -4.0, 9.0, -2.0]]], []], [[[[37, 4.0, -5.0, 6.0, -1.0], [20, -4.0, -3.0, -2.0, 1.0], [3, 6.0, -1.0, 8.0, 3.0], [8, -5.0, 0.0, -5.0, 4.0], [25, 4.0, 6.0, 6.0, 9.0]]], [[3, 37]]], [[[[7, 0.0, -3.0, 2.0, 1.0], [37, -4.0, -6.0, -3.0, -5.0], [13, -6.0, -3.0, -6.0, -3.0], [6, -2.0, 0.0, -1.0, 2.0], [31, 5.0, -5.0, 6.0, -1.0], [14, -2.0, 6.0, -1.0, 10.0]]], []]], [[[[[2, 0.0, 6.0, 1.0, 7.0], [8, 2.0, 4.0, 4.0, 6.0], [10, 2.0, 2.0, 5.0, 5.0], [6, -5.0, -6.0, -1.0, -2.0], [24, -1.0, 3.0, 0.0, 3.0]]], [[8, 10]]], [[[[24, 3.0, -4.0, 3.0, -1.0], [20, 0.0, -6.0, 3.0, -4.0]]], [[20, 24]]], [[[[35, 5.0, 1.0, 9.0, 1.0], [28, 4.0, -1.0, 7.0, 0.0]]], []], [[[[18, 2.0, 2.0, 4.0, 2.0], [9, 4.0, 2.0, 4.0, 3.0]]], [[9, 18]]], [[[[12, -1.0, -5.0, 2.0, -2.0], [19, -2.0, -1.0, -1.0, 0.0]]], []], [[[[5, -6.0, 5.0, -6.0, 6.0], [36, -2.0, -3.0, -2.0, -2.0], [27, 2.0, 5.0, 5.0, 6.0], [13, 6.0, 1.0, 7.0, 5.0], [14, 6.0, 5.0, 8.0, 9.0], [16, -6.0, -4.0, -5.0, 0.0], [12, 5.0, 6.0, 7.0, 8.0]]], [[12, 14], [12, 27], [13, 14]]], [[[[14, 6.0, 3.0, 7.0, 5.0], [11, -2.0, -6.0, 0.0, -6.0], [30, -6.0, 2.0, -2.0, 3.0], [34, 1.0, 1.0, 5.0, 5.0], [25, 5.0, -4.0, 6.0, -1.0], [24, -3.0, -6.0, -3.0, -5.0]]], []], [[[[39, 0.0, -6.0, 1.0, -6.0], [24, -6.0, -2.0, -2.0, 1.0], [27, 2.0, -5.0, 6.0, -1.0], [7, 3.0, -5.0, 4.0, -2.0], [28, -5.0, 0.0, -1.0, 1.0], [13, -4.0, -3.0, -1.0, 0.0], [9, 6.0, -2.0, 10.0, -1.0], [37, 3.0, 6.0, 6.0, 7.0]]], [[7, 27], [9, 27], [13, 24], [13, 28], [24, 28]]]], [[[[[25, -6.0, -6.0, -3.0, -5.0], [23, 5.0, -2.0, 7.0, -1.0], [3, 1.0, -3.0, 5.0, 1.0]]], [[3, 23]]], [[[[34, -2.0, -6.0, -1.0, -6.0], [39, 5.0, -4.0, 7.0, -3.0], [9, 1.0, -3.0, 2.0, -2.0], [38, 2.0, 5.0, 4.0, 6.0], [8, -5.0, 1.0, -3.0, 4.0], [26, -2.0, -2.0, 2.0, 0.0], [4, 5.0, -5.0, 6.0, -3.0], [35, 3.0, 1.0, 6.0, 2.0], [10, -4.0, 6.0, -2.0, 6.0], [31, 2.0, 1.0, 5.0, 3.0]]], [[4, 39], [9, 26], [31, 35]]], [[[[39, 4.0, -4.0, 8.0, -2.0], [4, -2.0, -1.0, 1.0, 0.0], [20, 0.0, -4.0, 2.0, -1.0], [17, 3.0, -5.0, 4.0, -4.0]]], [[4, 20], [17, 39]]], [[[[5, 0.0, -2.0, 3.0, -2.0], [7, 5.0, 2.0, 5.0, 5.0], [21, 4.0, 3.0, 4.0, 4.0], [27, 6.0, 3.0, 9.0, 6.0], [1, 2.0, 5.0, 5.0, 7.0]]], [[1, 7]]], [[[[27, 1.0, -4.0, 2.0, -3.0], [22, -3.0, 5.0, 0.0, 7.0], [36, 0.0, -2.0, 4.0, -1.0]]], []], [[[[10, 1.0, 3.0, 5.0, 4.0], [21, 5.0, 0.0, 7.0, 2.0], [27, 5.0, 1.0, 6.0, 5.0], [34, -1.0, -4.0, 2.0, -3.0]]], [[10, 27], [21, 27]]], [[[[23, -4.0, -3.0, -1.0, -3.0], [30, -6.0, -4.0, -4.0, -4.0], [13, 5.0, 0.0, 9.0, 3.0], [1, -5.0, 6.0, -4.0, 6.0], [37, -1.0, 2.0, 0.0, 2.0], [11, 5.0, 0.0, 9.0, 0.0], [21, 0.0, 4.0, 1.0, 8.0], [35, -5.0, -4.0, -5.0, -1.0], [4, 0.0, -4.0, 0.0, -2.0], [32, -4.0, 0.0, 0.0, 4.0]]], [[11, 13], [21, 32], [30, 35], [32, 37]]], [[[[39, -6.0, 1.0, -6.0, 5.0], [6, -5.0, -4.0, -2.0, 0.0], [17, 0.0, 4.0, 2.0, 7.0], [35, -6.0, 5.0, -6.0, 7.0]]], [[35, 39]]]], [[[[[24, 5.0, -5.0, 8.0, -3.0], [23, -4.0, 1.0, 0.0, 4.0], [4, -6.0, -6.0, -2.0, -6.0], [2, -4.0, 2.0, -3.0, 2.0], [7, 0.0, 3.0, 2.0, 4.0], [19, 0.0, -5.0, 4.0, -1.0]]], [[2, 23], [7, 23]]], [[[[35, 1.0, 0.0, 1.0, 0.0], [39, 0.0, -3.0, 4.0, 0.0], [7, 2.0, -3.0, 2.0, -2.0], [2, 5.0, 5.0, 5.0, 6.0]]], [[7, 39], [35, 39]]], [[[[4, 1.0, -1.0, 5.0, -1.0], [36, -4.0, -5.0, -1.0, -5.0], [10, 3.0, 6.0, 5.0, 6.0], [11, 0.0, -1.0, 4.0, 0.0], [22, -1.0, 0.0, 1.0, 4.0], [14, 1.0, -4.0, 4.0, -2.0], [3, -1.0, 0.0, 1.0, 0.0]]], [[3, 11], [3, 22], [4, 11], [11, 22]]], [[[[22, 6.0, 3.0, 7.0, 5.0], [2, -3.0, 2.0, -3.0, 2.0], [1, -5.0, 4.0, -3.0, 8.0], [18, 2.0, 4.0, 4.0, 6.0], [29, 0.0, -5.0, 0.0, -2.0], [21, 6.0, 4.0, 6.0, 4.0], [10, 2.0, 1.0, 6.0, 5.0], [4, -6.0, 5.0, -6.0, 9.0], [20, -1.0, 4.0, 0.0, 7.0], [12, 3.0, 6.0, 6.0, 10.0], [5, -4.0, 4.0, -1.0, 5.0]]], [[1, 5], [5, 20], [10, 18], [10, 21], [10, 22], [12, 18], [21, 22]]], [[[[21, 5.0, 1.0, 6.0, 2.0], [6, 0.0, 6.0, 2.0, 8.0], [3, 5.0, 4.0, 5.0, 5.0]]], []], [[[[34, 5.0, 0.0, 6.0, 2.0], [15, 0.0, 3.0, 3.0, 5.0], [29, -3.0, -4.0, -1.0, -2.0]]], []], [[[[5, 2.0, 6.0, 5.0, 6.0], [12, -3.0, 3.0, -2.0, 4.0], [35, -2.0, -4.0, -1.0, -4.0], [22, 6.0, 6.0, 9.0, 6.0], [28, 1.0, -6.0, 1.0, -2.0], [3, -2.0, -2.0, -2.0, 2.0], [16, 6.0, 5.0, 6.0, 5.0], [11, -3.0, 4.0, -3.0, 6.0], [37, -4.0, 3.0, -1.0, 7.0], [32, -5.0, -2.0, -1.0, -2.0], [18, 0.0, -5.0, 0.0, -2.0]]], [[3, 32], [11, 12], [11, 37], [12, 37]]], [[[[11, 6.0, -3.0, 7.0, 1.0], [26, -3.0, -5.0, 0.0, -4.0], [32, 1.0, 5.0, 1.0, 5.0], [1, -3.0, -2.0, 1.0, 2.0], [39, 5.0, -3.0, 5.0, -2.0], [12, 5.0, 4.0, 8.0, 7.0], [21, 0.0, -6.0, 3.0, -3.0], [17, 5.0, -3.0, 7.0, -1.0], [9, -6.0, -2.0, -4.0, 0.0]]], [[11, 17], [17, 39], [21, 26]]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic bounded teaching model with stipulated toy conventions; not a production physics engine or spatial index. 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-collision_detection_broadphase-sort-and-sweep-2d-active-list-removal","generated_at":"2026-09-29T14:50:57.963646+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Broadphase stages decide which object pairs ever reach narrowphase; a wrong boundary, ordering or bookkeeping rule silently drops real contacts or floods the solver with false candidates.","root_cause":"The end event does not remove the id from the active set.","sha256":"a7fd2d07357ed589299a1b0d989e7fff7b1aa78f69c5c193d10355abcb4613c9","title":"Ended boxes stay in the active list · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.177,"exit_code":1,"observations":[{"actual":[],"check":"case 0","expected":[],"passed":true},{"actual":[[6,14],[6,32],[14,32]],"check":"case 1","expected":[[6,14],[6,32],[7,32],[14,32]],"passed":false},{"actual":[],"check":"case 2","expected":[],"passed":true},{"actual":[[5,25],[15,20],[15,34]],"check":"case 3","expected":[[5,20],[5,25],[15,20],[15,34]],"passed":false},{"actual":[[3,24],[4,29]],"check":"case 4","expected":[[3,24],[4,29]],"passed":true},{"actual":[],"check":"case 5","expected":[[6,37]],"passed":false},{"actual":[],"check":"case 6","expected":[[2,15],[15,39]],"passed":false},{"actual":[],"check":"case 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[6, 14], [6, 32], [14, 32]], \"expected\": [[6, 14], [6, 32], [7, 32], [14, 32]], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[5, 25], [15, 20], [15, 34]], \"expected\": [[5, 20], [5, 25], [15, 20], [15, 34]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[3, 24], [4, 29]], \"expected\": [[3, 24], [4, 29]], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [], \"expected\": [[6, 37]], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [], \"expected\": [[2, 15], [15, 39]], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.175,"exit_code":1,"observations":[{"actual":[],"check":"case 0","expected":[],"passed":true},{"actual":[[6,14],[6,15],[6,32],[7,14],[7,32],[14,32]],"check":"case 1","expected":[[6,14],[6,32],[7,32],[14,32]],"passed":false},{"actual":[],"check":"case 2","expected":[],"passed":true},{"actual":[[5,15],[5,20],[5,25],[15,20],[15,25],[15,34],[25,34]],"check":"case 3","expected":[[5,20],[5,25],[15,20],[15,34]],"passed":false},{"actual":[[3,24],[3,29],[4,11],[4,29],[11,26]],"check":"case 4","expected":[[3,24],[4,29]],"passed":false},{"actual":[[6,37]],"check":"case 5","expected":[[6,37]],"passed":true},{"actual":[[2,15],[15,30],[15,39],[30,39]],"check":"case 6","expected":[[2,15],[15,39]],"passed":false},{"actual":[],"check":"case 7","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[6, 14], [6, 15], [6, 32], [7, 14], [7, 32], [14, 32]], \"expected\": [[6, 14], [6, 32], [7, 32], [14, 32]], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[5, 15], [5, 20], [5, 25], [15, 20], [15, 25], [15, 34], [25, 34]], \"expected\": [[5, 20], [5, 25], [15, 20], [15, 34]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[3, 24], [3, 29], [4, 11], [4, 29], [11, 26]], \"expected\": [[3, 24], [4, 29]], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[6, 37]], \"expected\": [[6, 37]], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[2, 15], [15, 30], [15, 39], [30, 39]], \"expected\": [[2, 15], [15, 39]], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [], \"expected\": [], \"passed\": true}], \"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."}}