{"abstract":"Tall thin boxes miss pairs and wide flat boxes gain false ones.","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":"Using column 1 for min y compares x against y.","family":"w2-collision_detection_broadphase-sort-and-sweep-2d-y-column-indices","id":"FA-87361","implementations":{"attempt":{"sha256":"667c7dc08ec607cf64225914d2d63655b126135aed267d0e75cf69589341a93e","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[1] <= bj[4] and bj[1] <= bi[4]:\n                    pairs.append([min(i, j), max(i, j)])\n            active.append(i)\n        else:\n            active.remove(i)\n    pairs.sort()\n    return pairs\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[5, -5.0, -4.0, -4.0, -2.0], [37, -5.0, -1.0, -1.0, -1.0], [26, 0.0, 1.0, 3.0, 2.0]]], []], [[[[33, -4.0, -3.0, -4.0, -3.0], [32, 3.0, -6.0, 6.0, -4.0]]], []], [[[[36, 2.0, -2.0, 6.0, 2.0], [33, 4.0, 1.0, 7.0, 5.0], [17, 6.0, -3.0, 8.0, 1.0], [30, -2.0, 0.0, -1.0, 3.0], [14, 3.0, 1.0, 6.0, 4.0], [18, 2.0, -5.0, 2.0, -5.0]]], [[14, 17], [14, 33], [14, 36], [17, 33], [17, 36], [33, 36]]], [[[[36, 4.0, 1.0, 5.0, 4.0], [29, 5.0, -1.0, 5.0, 0.0], [19, -2.0, -4.0, 2.0, -2.0], [23, 5.0, -2.0, 7.0, 0.0]]], [[23, 29]]], [[[[12, 0.0, -1.0, 4.0, 2.0], [32, 2.0, 3.0, 4.0, 6.0]]], []], [[[[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]]], []], [[[[13, 0.0, -4.0, 4.0, -1.0], [28, -6.0, 3.0, -5.0, 4.0], [4, -1.0, 1.0, -1.0, 2.0], [7, 5.0, -2.0, 5.0, -2.0], [9, -5.0, -6.0, -4.0, -6.0]]], []], [[[[28, 6.0, -4.0, 7.0, -3.0], [32, 6.0, -4.0, 9.0, -1.0], [8, 1.0, 4.0, 3.0, 7.0], [9, 3.0, -6.0, 7.0, -4.0], [37, -6.0, 3.0, -2.0, 6.0]]], [[9, 28], [9, 32], [28, 32]]]], [[[[[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]]], [[[[7, 2.0, -3.0, 3.0, -1.0], [35, -4.0, 2.0, 0.0, 3.0], [1, 2.0, 4.0, 6.0, 4.0], [22, 3.0, 2.0, 5.0, 4.0]]], [[1, 22]]], [[[[37, -2.0, 2.0, 2.0, 2.0], [38, -3.0, 6.0, -2.0, 10.0], [32, -2.0, 4.0, -1.0, 4.0], [33, 4.0, 3.0, 4.0, 5.0], [14, 0.0, 6.0, 4.0, 7.0], [26, -4.0, -4.0, -2.0, -2.0]]], []], [[[[32, -4.0, 2.0, -2.0, 3.0], [28, -1.0, 6.0, 0.0, 7.0], [18, 1.0, -4.0, 3.0, -3.0], [26, -5.0, -4.0, -2.0, -2.0], [24, 1.0, -3.0, 4.0, -1.0]]], [[18, 24]]], [[[[27, 3.0, 2.0, 5.0, 6.0], [19, -3.0, -4.0, -3.0, -1.0], [1, 2.0, 1.0, 4.0, 1.0], [3, 5.0, 0.0, 6.0, 4.0], [24, -1.0, -2.0, -1.0, 0.0], [33, 0.0, -5.0, 4.0, -1.0]]], [[3, 27]]], [[[[7, -1.0, 2.0, 1.0, 2.0], [29, 4.0, -5.0, 4.0, -4.0], [34, -6.0, -4.0, -3.0, -1.0], [3, -6.0, -2.0, -5.0, -1.0], [28, -6.0, 2.0, -2.0, 2.0], [30, -3.0, 1.0, -2.0, 5.0], [5, 0.0, -6.0, 0.0, -4.0], [32, -1.0, 6.0, 3.0, 10.0]]], [[3, 34], [28, 30]]], [[[[1, -2.0, 3.0, 2.0, 5.0], [3, 2.0, 0.0, 2.0, 0.0], [15, 4.0, 2.0, 7.0, 4.0], [31, 5.0, 0.0, 7.0, 3.0], [21, 6.0, -1.0, 8.0, 3.0], [7, -5.0, -4.0, -5.0, -2.0]]], [[15, 21], [15, 31], [21, 31]]], [[[[19, -1.0, 4.0, 0.0, 4.0], [32, 5.0, -1.0, 8.0, 0.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]]], [[[[2, -3.0, -4.0, 1.0, -2.0], [37, -2.0, 6.0, 2.0, 10.0]]], []], [[[[30, 1.0, -3.0, 5.0, -2.0], [12, 6.0, 0.0, 10.0, 1.0], [4, -6.0, -5.0, -4.0, -1.0], [23, -3.0, 6.0, -3.0, 9.0], [17, -2.0, 1.0, -2.0, 4.0], [5, -4.0, -5.0, -4.0, -2.0], [8, -1.0, -2.0, 3.0, -2.0], [37, 6.0, -2.0, 6.0, -2.0]]], [[4, 5], [8, 30]]], [[[[18, -6.0, -3.0, -5.0, -2.0], [29, 4.0, 1.0, 7.0, 4.0], [13, -6.0, -6.0, -2.0, -3.0], [25, 4.0, 2.0, 8.0, 6.0], [9, 2.0, -6.0, 6.0, -3.0], [2, -5.0, -6.0, -5.0, -3.0], [27, 6.0, -6.0, 6.0, -4.0]]], [[2, 13], [2, 18], [9, 27], [13, 18], [25, 29]]], [[[[29, 1.0, 3.0, 1.0, 5.0], [19, -2.0, 4.0, 2.0, 5.0], [21, -4.0, 4.0, -4.0, 6.0], [6, -6.0, -3.0, -4.0, 0.0], [11, 5.0, 2.0, 8.0, 2.0], [24, -3.0, 5.0, -3.0, 5.0], [15, -1.0, 5.0, 3.0, 9.0], [35, -5.0, 0.0, -5.0, 4.0]]], [[6, 35], [15, 19], [15, 29], [19, 29]]], [[[[19, -4.0, -4.0, -3.0, -4.0], [28, -1.0, 6.0, 2.0, 6.0]]], []], [[[[38, -1.0, 2.0, 1.0, 6.0], [11, 5.0, -3.0, 8.0, -3.0], [21, 1.0, -5.0, 2.0, -4.0]]], []], [[[[34, -1.0, 0.0, 3.0, 3.0], [39, 4.0, 3.0, 7.0, 3.0], [4, -6.0, -6.0, -5.0, -3.0]]], []]], [[[[[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]]], [[[[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]]], [[[[12, -6.0, 0.0, -3.0, 0.0], [11, -3.0, 2.0, -3.0, 2.0], [30, 2.0, 6.0, 2.0, 7.0], [17, 2.0, -5.0, 5.0, -4.0], [18, -2.0, 6.0, -1.0, 8.0], [13, 6.0, 0.0, 7.0, 1.0], [22, -4.0, -3.0, -3.0, -2.0], [37, 3.0, -1.0, 6.0, 0.0], [20, 4.0, -1.0, 8.0, 3.0]]], [[13, 20], [13, 37], [20, 37]]], [[[[14, 1.0, 6.0, 3.0, 6.0], [36, -5.0, 4.0, -4.0, 5.0], [7, 2.0, -1.0, 2.0, 2.0], [38, -5.0, 4.0, -4.0, 4.0], [6, 0.0, 0.0, 3.0, 0.0], [21, -3.0, 2.0, -3.0, 3.0], [27, -2.0, 6.0, 2.0, 7.0], [25, -4.0, 0.0, -4.0, 4.0], [30, -5.0, -1.0, -1.0, -1.0]]], [[6, 7], [14, 27], [25, 36], [25, 38], [36, 38]]], [[[[22, -4.0, 1.0, -4.0, 4.0], [23, -4.0, -4.0, -3.0, -2.0], [24, 5.0, 0.0, 6.0, 2.0], [9, -1.0, -4.0, 1.0, -2.0]]], []], [[[[15, 0.0, -2.0, 3.0, 1.0], [4, -6.0, -6.0, -2.0, -4.0], [13, -6.0, 6.0, -6.0, 10.0], [16, 6.0, -6.0, 6.0, -5.0], [11, -2.0, -1.0, 2.0, 2.0], [20, 0.0, 4.0, 2.0, 5.0]]], [[11, 15]]], [[[[26, 2.0, 4.0, 6.0, 6.0], [9, -3.0, 0.0, -3.0, 3.0], [27, 3.0, -4.0, 7.0, -4.0], [34, -6.0, 0.0, -5.0, 2.0], [5, 2.0, -2.0, 2.0, -1.0], [38, 1.0, 5.0, 4.0, 5.0], [7, 1.0, -5.0, 3.0, -4.0], [15, 2.0, -5.0, 3.0, -5.0], [2, 5.0, 5.0, 9.0, 7.0]]], [[2, 26], [7, 15], [7, 27], [26, 38]]], [[[[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]]]], [[[[[2, 6.0, -4.0, 10.0, -1.0], [30, -1.0, -4.0, 2.0, -4.0], [3, -3.0, -1.0, -1.0, -1.0], [16, 3.0, -2.0, 7.0, -2.0]]], [[2, 16]]], [[[[15, 5.0, 2.0, 8.0, 4.0], [17, -5.0, -5.0, -1.0, -5.0]]], []], [[[[23, 1.0, -4.0, 2.0, -1.0], [14, 3.0, -3.0, 5.0, -2.0], [39, 4.0, 6.0, 4.0, 9.0], [20, -5.0, -1.0, -5.0, 1.0], [5, 4.0, 4.0, 7.0, 6.0], [7, -5.0, 5.0, -4.0, 5.0], [33, -5.0, -4.0, -1.0, -3.0], [26, -2.0, 3.0, 2.0, 5.0], [19, 5.0, 1.0, 7.0, 4.0]]], [[5, 19], [5, 39]]], [[[[19, 4.0, 1.0, 4.0, 2.0], [1, 2.0, -6.0, 3.0, -2.0], [35, -6.0, -4.0, -2.0, -3.0], [32, -6.0, 3.0, -3.0, 3.0], [22, -1.0, -5.0, 1.0, -1.0], [34, -1.0, 3.0, 1.0, 3.0], [24, -4.0, -5.0, -4.0, -5.0], [20, 6.0, 3.0, 8.0, 3.0], [7, -2.0, 6.0, -1.0, 6.0], [30, 3.0, -4.0, 7.0, -1.0], [15, 1.0, -5.0, 5.0, -4.0]]], [[1, 15], [1, 30], [15, 22], [15, 30]]], [[[[16, -3.0, 2.0, -3.0, 4.0], [38, 6.0, -4.0, 8.0, -3.0], [8, -1.0, 4.0, 2.0, 4.0]]], []], [[[[20, -4.0, 0.0, -4.0, 2.0], [33, 0.0, -6.0, 1.0, -5.0]]], []], [[[[10, -4.0, 0.0, -3.0, 1.0], [1, 4.0, -2.0, 4.0, 0.0], [19, 0.0, 2.0, 0.0, 5.0], [13, 4.0, -6.0, 7.0, -2.0], [16, -2.0, 0.0, -2.0, 3.0], [20, -3.0, 0.0, -2.0, 4.0], [34, -2.0, -6.0, -2.0, -3.0], [27, 2.0, 4.0, 5.0, 6.0]]], [[1, 13], [10, 20], [16, 20]]], [[[[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]]]]]\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":"9d3259886ed07ee94f5c458abad46d029f1c0eb1678dd14fcfda2474ac322e57","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[3] and bj[2] <= bi[3]:\n                    pairs.append([min(i, j), max(i, j)])\n            active.append(i)\n        else:\n            active.remove(i)\n    pairs.sort()\n    return pairs\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[5, -5.0, -4.0, -4.0, -2.0], [37, -5.0, -1.0, -1.0, -1.0], [26, 0.0, 1.0, 3.0, 2.0]]], []], [[[[33, -4.0, -3.0, -4.0, -3.0], [32, 3.0, -6.0, 6.0, -4.0]]], []], [[[[36, 2.0, -2.0, 6.0, 2.0], [33, 4.0, 1.0, 7.0, 5.0], [17, 6.0, -3.0, 8.0, 1.0], [30, -2.0, 0.0, -1.0, 3.0], [14, 3.0, 1.0, 6.0, 4.0], [18, 2.0, -5.0, 2.0, -5.0]]], [[14, 17], [14, 33], [14, 36], [17, 33], [17, 36], [33, 36]]], [[[[36, 4.0, 1.0, 5.0, 4.0], [29, 5.0, -1.0, 5.0, 0.0], [19, -2.0, -4.0, 2.0, -2.0], [23, 5.0, -2.0, 7.0, 0.0]]], [[23, 29]]], [[[[12, 0.0, -1.0, 4.0, 2.0], [32, 2.0, 3.0, 4.0, 6.0]]], []], [[[[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]]], []], [[[[13, 0.0, -4.0, 4.0, -1.0], [28, -6.0, 3.0, -5.0, 4.0], [4, -1.0, 1.0, -1.0, 2.0], [7, 5.0, -2.0, 5.0, -2.0], [9, -5.0, -6.0, -4.0, -6.0]]], []], [[[[28, 6.0, -4.0, 7.0, -3.0], [32, 6.0, -4.0, 9.0, -1.0], [8, 1.0, 4.0, 3.0, 7.0], [9, 3.0, -6.0, 7.0, -4.0], [37, -6.0, 3.0, -2.0, 6.0]]], [[9, 28], [9, 32], [28, 32]]]], [[[[[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]]], [[[[7, 2.0, -3.0, 3.0, -1.0], [35, -4.0, 2.0, 0.0, 3.0], [1, 2.0, 4.0, 6.0, 4.0], [22, 3.0, 2.0, 5.0, 4.0]]], [[1, 22]]], [[[[37, -2.0, 2.0, 2.0, 2.0], [38, -3.0, 6.0, -2.0, 10.0], [32, -2.0, 4.0, -1.0, 4.0], [33, 4.0, 3.0, 4.0, 5.0], [14, 0.0, 6.0, 4.0, 7.0], [26, -4.0, -4.0, -2.0, -2.0]]], []], [[[[32, -4.0, 2.0, -2.0, 3.0], [28, -1.0, 6.0, 0.0, 7.0], [18, 1.0, -4.0, 3.0, -3.0], [26, -5.0, -4.0, -2.0, -2.0], [24, 1.0, -3.0, 4.0, -1.0]]], [[18, 24]]], [[[[27, 3.0, 2.0, 5.0, 6.0], [19, -3.0, -4.0, -3.0, -1.0], [1, 2.0, 1.0, 4.0, 1.0], [3, 5.0, 0.0, 6.0, 4.0], [24, -1.0, -2.0, -1.0, 0.0], [33, 0.0, -5.0, 4.0, -1.0]]], [[3, 27]]], [[[[7, -1.0, 2.0, 1.0, 2.0], [29, 4.0, -5.0, 4.0, -4.0], [34, -6.0, -4.0, -3.0, -1.0], [3, -6.0, -2.0, -5.0, -1.0], [28, -6.0, 2.0, -2.0, 2.0], [30, -3.0, 1.0, -2.0, 5.0], [5, 0.0, -6.0, 0.0, -4.0], [32, -1.0, 6.0, 3.0, 10.0]]], [[3, 34], [28, 30]]], [[[[1, -2.0, 3.0, 2.0, 5.0], [3, 2.0, 0.0, 2.0, 0.0], [15, 4.0, 2.0, 7.0, 4.0], [31, 5.0, 0.0, 7.0, 3.0], [21, 6.0, -1.0, 8.0, 3.0], [7, -5.0, -4.0, -5.0, -2.0]]], [[15, 21], [15, 31], [21, 31]]], [[[[19, -1.0, 4.0, 0.0, 4.0], [32, 5.0, -1.0, 8.0, 0.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]]], [[[[2, -3.0, -4.0, 1.0, -2.0], [37, -2.0, 6.0, 2.0, 10.0]]], []], [[[[30, 1.0, -3.0, 5.0, -2.0], [12, 6.0, 0.0, 10.0, 1.0], [4, -6.0, -5.0, -4.0, -1.0], [23, -3.0, 6.0, -3.0, 9.0], [17, -2.0, 1.0, -2.0, 4.0], [5, -4.0, -5.0, -4.0, -2.0], [8, -1.0, -2.0, 3.0, -2.0], [37, 6.0, -2.0, 6.0, -2.0]]], [[4, 5], [8, 30]]], [[[[18, -6.0, -3.0, -5.0, -2.0], [29, 4.0, 1.0, 7.0, 4.0], [13, -6.0, -6.0, -2.0, -3.0], [25, 4.0, 2.0, 8.0, 6.0], [9, 2.0, -6.0, 6.0, -3.0], [2, -5.0, -6.0, -5.0, -3.0], [27, 6.0, -6.0, 6.0, -4.0]]], [[2, 13], [2, 18], [9, 27], [13, 18], [25, 29]]], [[[[29, 1.0, 3.0, 1.0, 5.0], [19, -2.0, 4.0, 2.0, 5.0], [21, -4.0, 4.0, -4.0, 6.0], [6, -6.0, -3.0, -4.0, 0.0], [11, 5.0, 2.0, 8.0, 2.0], [24, -3.0, 5.0, -3.0, 5.0], [15, -1.0, 5.0, 3.0, 9.0], [35, -5.0, 0.0, -5.0, 4.0]]], [[6, 35], [15, 19], [15, 29], [19, 29]]], [[[[19, -4.0, -4.0, -3.0, -4.0], [28, -1.0, 6.0, 2.0, 6.0]]], []], [[[[38, -1.0, 2.0, 1.0, 6.0], [11, 5.0, -3.0, 8.0, -3.0], [21, 1.0, -5.0, 2.0, -4.0]]], []], [[[[34, -1.0, 0.0, 3.0, 3.0], [39, 4.0, 3.0, 7.0, 3.0], [4, -6.0, -6.0, -5.0, -3.0]]], []]], [[[[[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]]], [[[[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]]], [[[[12, -6.0, 0.0, -3.0, 0.0], [11, -3.0, 2.0, -3.0, 2.0], [30, 2.0, 6.0, 2.0, 7.0], [17, 2.0, -5.0, 5.0, -4.0], [18, -2.0, 6.0, -1.0, 8.0], [13, 6.0, 0.0, 7.0, 1.0], [22, -4.0, -3.0, -3.0, -2.0], [37, 3.0, -1.0, 6.0, 0.0], [20, 4.0, -1.0, 8.0, 3.0]]], [[13, 20], [13, 37], [20, 37]]], [[[[14, 1.0, 6.0, 3.0, 6.0], [36, -5.0, 4.0, -4.0, 5.0], [7, 2.0, -1.0, 2.0, 2.0], [38, -5.0, 4.0, -4.0, 4.0], [6, 0.0, 0.0, 3.0, 0.0], [21, -3.0, 2.0, -3.0, 3.0], [27, -2.0, 6.0, 2.0, 7.0], [25, -4.0, 0.0, -4.0, 4.0], [30, -5.0, -1.0, -1.0, -1.0]]], [[6, 7], [14, 27], [25, 36], [25, 38], [36, 38]]], [[[[22, -4.0, 1.0, -4.0, 4.0], [23, -4.0, -4.0, -3.0, -2.0], [24, 5.0, 0.0, 6.0, 2.0], [9, -1.0, -4.0, 1.0, -2.0]]], []], [[[[15, 0.0, -2.0, 3.0, 1.0], [4, -6.0, -6.0, -2.0, -4.0], [13, -6.0, 6.0, -6.0, 10.0], [16, 6.0, -6.0, 6.0, -5.0], [11, -2.0, -1.0, 2.0, 2.0], [20, 0.0, 4.0, 2.0, 5.0]]], [[11, 15]]], [[[[26, 2.0, 4.0, 6.0, 6.0], [9, -3.0, 0.0, -3.0, 3.0], [27, 3.0, -4.0, 7.0, -4.0], [34, -6.0, 0.0, -5.0, 2.0], [5, 2.0, -2.0, 2.0, -1.0], [38, 1.0, 5.0, 4.0, 5.0], [7, 1.0, -5.0, 3.0, -4.0], [15, 2.0, -5.0, 3.0, -5.0], [2, 5.0, 5.0, 9.0, 7.0]]], [[2, 26], [7, 15], [7, 27], [26, 38]]], [[[[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]]]], [[[[[2, 6.0, -4.0, 10.0, -1.0], [30, -1.0, -4.0, 2.0, -4.0], [3, -3.0, -1.0, -1.0, -1.0], [16, 3.0, -2.0, 7.0, -2.0]]], [[2, 16]]], [[[[15, 5.0, 2.0, 8.0, 4.0], [17, -5.0, -5.0, -1.0, -5.0]]], []], [[[[23, 1.0, -4.0, 2.0, -1.0], [14, 3.0, -3.0, 5.0, -2.0], [39, 4.0, 6.0, 4.0, 9.0], [20, -5.0, -1.0, -5.0, 1.0], [5, 4.0, 4.0, 7.0, 6.0], [7, -5.0, 5.0, -4.0, 5.0], [33, -5.0, -4.0, -1.0, -3.0], [26, -2.0, 3.0, 2.0, 5.0], [19, 5.0, 1.0, 7.0, 4.0]]], [[5, 19], [5, 39]]], [[[[19, 4.0, 1.0, 4.0, 2.0], [1, 2.0, -6.0, 3.0, -2.0], [35, -6.0, -4.0, -2.0, -3.0], [32, -6.0, 3.0, -3.0, 3.0], [22, -1.0, -5.0, 1.0, -1.0], [34, -1.0, 3.0, 1.0, 3.0], [24, -4.0, -5.0, -4.0, -5.0], [20, 6.0, 3.0, 8.0, 3.0], [7, -2.0, 6.0, -1.0, 6.0], [30, 3.0, -4.0, 7.0, -1.0], [15, 1.0, -5.0, 5.0, -4.0]]], [[1, 15], [1, 30], [15, 22], [15, 30]]], [[[[16, -3.0, 2.0, -3.0, 4.0], [38, 6.0, -4.0, 8.0, -3.0], [8, -1.0, 4.0, 2.0, 4.0]]], []], [[[[20, -4.0, 0.0, -4.0, 2.0], [33, 0.0, -6.0, 1.0, -5.0]]], []], [[[[10, -4.0, 0.0, -3.0, 1.0], [1, 4.0, -2.0, 4.0, 0.0], [19, 0.0, 2.0, 0.0, 5.0], [13, 4.0, -6.0, 7.0, -2.0], [16, -2.0, 0.0, -2.0, 3.0], [20, -3.0, 0.0, -2.0, 4.0], [34, -2.0, -6.0, -2.0, -3.0], [27, 2.0, 4.0, 5.0, 6.0]]], [[1, 13], [10, 20], [16, 20]]], [[[[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]]]]]\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-y-column-indices","generated_at":"2026-09-29T14:50:57.975846+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 y test compares against column 3 (maxx) instead of 4 (maxy).","sha256":"75ec438a11914d459d0ae825f0857fb0fbe9ef28d96b8d14f09b7b7428cbe29d","title":"Secondary test reads max x as max y · 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":39.985,"exit_code":1,"observations":[{"actual":[[5,37]],"check":"case 0","expected":[],"passed":false},{"actual":[],"check":"case 1","expected":[],"passed":true},{"actual":[[14,33]],"check":"case 2","expected":[[14,17],[14,33],[14,36],[17,33],[17,36],[33,36]],"passed":false},{"actual":[],"check":"case 3","expected":[[23,29]],"passed":false},{"actual":[[12,32]],"check":"case 4","expected":[],"passed":false},{"actual":[],"check":"case 5","expected":[],"passed":true},{"actual":[[9,28]],"check":"case 6","expected":[],"passed":false},{"actual":[],"check":"case 7","expected":[[9,28],[9,32],[28,32]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[5, 37]], \"expected\": [], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[14, 33]], \"expected\": [[14, 17], [14, 33], [14, 36], [17, 33], [17, 36], [33, 36]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [], \"expected\": [[23, 29]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[12, 32]], \"expected\": [], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[9, 28]], \"expected\": [], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [], \"expected\": [[9, 28], [9, 32], [28, 32]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.903,"exit_code":1,"observations":[{"actual":[],"check":"case 0","expected":[],"passed":true},{"actual":[],"check":"case 1","expected":[],"passed":true},{"actual":[[14,17],[14,33],[14,36],[17,33],[17,36],[18,36],[33,36]],"check":"case 2","expected":[[14,17],[14,33],[14,36],[17,33],[17,36],[33,36]],"passed":false},{"actual":[[23,29],[23,36],[29,36]],"check":"case 3","expected":[[23,29]],"passed":false},{"actual":[[12,32]],"check":"case 4","expected":[],"passed":false},{"actual":[],"check":"case 5","expected":[],"passed":true},{"actual":[],"check":"case 6","expected":[],"passed":true},{"actual":[[8,9],[9,28],[9,32],[28,32]],"check":"case 7","expected":[[9,28],[9,32],[28,32]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[14, 17], [14, 33], [14, 36], [17, 33], [17, 36], [18, 36], [33, 36]], \"expected\": [[14, 17], [14, 33], [14, 36], [17, 33], [17, 36], [33, 36]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[23, 29], [23, 36], [29, 36]], \"expected\": [[23, 29]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [[12, 32]], \"expected\": [], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[8, 9], [9, 28], [9, 32], [28, 32]], \"expected\": [[9, 28], [9, 32], [28, 32]], \"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."}}