FAILURE MAP
← Case archive

FA-87771 / Collision detection broadphase / Open access

Box pruning runs only the first pass · case 01

Static boxes that start before a dynamic box never pair with it.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The pass over B is missing.

VERIFIED REPAIR

Run the symmetric second pass.

Unsuccessful approach: Running pass 2 without advancing its start index repeats pairs found in pass 1.

Case contract

solve(A, B): bipartite box pruning (dynamic set A vs static set B), boxes [id,minx,miny,maxx,maxy], closed intervals. Sort both by (minx,id). Pass 1: for each a, B boxes with minx in [a.minx, a.maxx]; pass 2: for each b, A boxes with minx in (b.minx, b.maxx]; y overlap required. Return sorted [a id, b id] pairs.

Why this case matters

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.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(A, B):
    As = sorted(A, key=lambda r: (r[1], r[0]))
    Bs = sorted(B, key=lambda r: (r[1], r[0]))
    def yover(p, q):
        return p[2] <= q[4] and q[2] <= p[4]
    pairs = []
    j = 0
    for a in As:
        while j < len(Bs) and Bs[j][1] < a[1]:
            j += 1
        k = j
        while k < len(Bs) and Bs[k][1] <= a[3]:
            if yover(a, Bs[k]):
                pairs.append([a[0], Bs[k][0]])
            k += 1
    j2 = 0
    pairs.sort()
    return pairs
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[28, 4.0, 5.0, 4.0, 8.0], [34, 4.0, -5.0, 5.0, -2.0], [15, 2.0, -1.0, 3.0, 2.0], [31, -5.0, 5.0, -2.0, 6.0]], [[14, 4.0, -1.0, 4.0, 0.0], [17, 1.0, 4.0, 3.0, 7.0], [8, 1.0, 1.0, 3.0, 1.0], [39, -1.0, -5.0, 0.0, -5.0]]], [[15, 8]]], [[[[20, 3.0, 4.0, 5.0, 5.0], [26, -4.0, -4.0, -3.0, -2.0], [17, 4.0, -1.0, 5.0, 0.0]], [[11, 3.0, 1.0, 4.0, 1.0], [22, 2.0, -4.0, 2.0, -3.0], [23, -5.0, -3.0, -2.0, 0.0], [39, -5.0, 2.0, -2.0, 2.0]]], [[26, 23]]], [[[[30, 4.0, -3.0, 5.0, 0.0], [34, 1.0, 5.0, 1.0, 8.0], [14, 5.0, 1.0, 5.0, 1.0]], [[24, 4.0, 2.0, 4.0, 5.0], [10, -4.0, -1.0, -1.0, 0.0], [15, -4.0, 1.0, -4.0, 2.0]]], []], [[[[13, -5.0, 1.0, -3.0, 2.0], [11, -5.0, 4.0, -2.0, 6.0], [16, 0.0, -4.0, 0.0, -4.0]], [[6, -5.0, 3.0, 5.0, 3.0], [10, 0.0, 5.0, 1.0, 8.0], [28, -3.0, 4.0, 0.0, 7.0], [39, -5.0, -5.0, -5.0, -3.0]]], [[11, 28]]], [[[[22, -5.0, -3.0, -2.0, 0.0], [19, 1.0, 3.0, 4.0, 5.0], [38, 0.0, 1.0, 0.0, 3.0], [33, 1.0, -4.0, 3.0, -3.0]], [[18, -1.0, 1.0, 2.0, 2.0], [27, -5.0, -1.0, -2.0, 0.0]]], [[22, 27], [38, 18]]], [[[[10, 5.0, -4.0, 8.0, -4.0], [1, 2.0, -3.0, 5.0, 0.0], [36, 1.0, 5.0, 3.0, 6.0], [29, 0.0, -5.0, 0.0, -2.0]], [[26, 4.0, -4.0, 5.0, -4.0], [18, -1.0, -4.0, 2.0, -3.0], [39, 1.0, -4.0, 2.0, -2.0]]], [[1, 18], [1, 39], [10, 26], [29, 18]]], [[[[5, 2.0, -2.0, 3.0, -1.0], [11, 2.0, -1.0, 5.0, -1.0], [7, 1.0, 3.0, 1.0, 5.0]], [[24, 2.0, 0.0, 2.0, 0.0], [12, -5.0, 1.0, -3.0, 1.0]]], []], [[[[29, -1.0, -1.0, -1.0, 1.0], [37, 2.0, -5.0, 4.0, -4.0]], [[31, 2.0, -3.0, 2.0, -1.0]]], []]], [[[[[15, -3.0, 2.0, -3.0, 4.0], [32, -1.0, 5.0, 1.0, 6.0], [10, -4.0, -3.0, -4.0, -3.0]], [[19, 3.0, 0.0, 6.0, 1.0], [21, -1.0, -2.0, -1.0, -1.0], [14, 5.0, 2.0, 5.0, 4.0], [39, -4.0, 4.0, -3.0, 7.0]]], [[15, 39]]], [[[[30, -5.0, 0.0, -2.0, 0.0], [26, -4.0, -4.0, -3.0, -3.0], [39, -5.0, 0.0, -5.0, 2.0], [31, -5.0, 5.0, -3.0, 5.0]], [[22, -1.0, -2.0, 2.0, 1.0], [38, -4.0, 1.0, -1.0, 2.0], [17, -4.0, -4.0, -4.0, -4.0], [28, 1.0, -1.0, 3.0, 0.0]]], [[26, 17]]], [[[[13, 0.0, -1.0, 0.0, 0.0], [30, 0.0, 1.0, 1.0, 1.0], [37, 0.0, -1.0, 3.0, -1.0]], [[27, 0.0, -5.0, 0.0, -3.0], [22, 1.0, -1.0, 4.0, 2.0], [35, -1.0, -4.0, 1.0, -3.0], [36, 3.0, 0.0, 4.0, 0.0]]], [[30, 22], [37, 22]]], [[[[9, 1.0, 5.0, 2.0, 7.0], [2, 2.0, 3.0, 5.0, 5.0], [18, -1.0, 1.0, 1.0, 2.0]], [[10, 5.0, -4.0, 7.0, -2.0], [7, -4.0, 2.0, -1.0, 4.0], [37, 4.0, 3.0, 5.0, 3.0], [23, 1.0, -2.0, 1.0, -2.0]]], [[2, 37], [18, 7]]], [[[[21, 2.0, -3.0, 2.0, -3.0], [25, 0.0, -5.0, 0.0, -3.0], [12, -1.0, -3.0, 2.0, 0.0]], [[28, 3.0, -4.0, 3.0, -1.0], [3, 5.0, -5.0, 6.0, -4.0], [31, -3.0, -1.0, -1.0, -1.0], [34, 4.0, 1.0, 6.0, 3.0]]], [[12, 31]]], [[[[16, -3.0, -3.0, -1.0, -3.0]], [[32, -5.0, 3.0, -5.0, 4.0], [18, 1.0, -1.0, 3.0, 1.0], [34, 4.0, -3.0, 4.0, 0.0]]], []], [[[[8, 2.0, -3.0, 4.0, -2.0], [26, -4.0, 0.0, -2.0, 2.0]], [[31, 1.0, 1.0, 2.0, 3.0], [17, 0.0, 1.0, 3.0, 1.0], [23, 4.0, 2.0, 5.0, 4.0], [1, -5.0, -4.0, -4.0, -1.0]]], []], [[[[17, -2.0, -5.0, 1.0, -2.0], [23, 5.0, 3.0, 6.0, 5.0], [31, -3.0, -5.0, -1.0, -5.0]], [[7, -2.0, -1.0, 5.0, -1.0]]], []]], [[[[[14, -4.0, -3.0, -2.0, 0.0], [18, 0.0, -5.0, 2.0, -2.0], [37, 5.0, 5.0, 7.0, 5.0]], [[34, -4.0, -1.0, 5.0, 0.0], [4, -2.0, -2.0, 1.0, 1.0], [3, -2.0, 3.0, -2.0, 4.0], [11, 4.0, 5.0, 7.0, 6.0]]], [[14, 4], [14, 34], [18, 4], [37, 11]]], [[[[30, 1.0, -2.0, 2.0, -2.0], [32, -1.0, -5.0, -1.0, -3.0], [28, -3.0, 5.0, 0.0, 5.0]], [[24, -4.0, 0.0, -2.0, 1.0], [22, -3.0, -3.0, 0.0, 0.0], [8, 4.0, -5.0, 6.0, -5.0], [31, 0.0, 5.0, 2.0, 8.0]]], [[28, 31], [32, 22]]], [[[[27, -2.0, -2.0, 0.0, 1.0]], [[28, 3.0, 4.0, 6.0, 7.0], [29, -4.0, -1.0, -2.0, 0.0], [34, 4.0, -4.0, 7.0, -3.0], [38, -1.0, 1.0, 2.0, 4.0]]], [[27, 29], [27, 38]]], [[[[31, 5.0, 3.0, 5.0, 6.0], [9, -5.0, -1.0, -2.0, 2.0]], [[7, 5.0, 5.0, 5.0, 7.0], [32, -2.0, -1.0, -1.0, 2.0], [38, 3.0, -5.0, 5.0, -4.0]]], [[9, 32], [31, 7]]], [[[[22, 1.0, -1.0, 4.0, 1.0]], [[30, 2.0, -2.0, 2.0, 0.0], [5, 5.0, 1.0, 5.0, 3.0]]], [[22, 30]]], [[[[26, -3.0, 0.0, -3.0, 3.0]], [[28, -2.0, -3.0, -2.0, -2.0], [20, 1.0, 3.0, 1.0, 3.0], [29, 2.0, 4.0, 2.0, 5.0], [19, -3.0, 0.0, -2.0, 3.0]]], [[26, 19]]], [[[[31, 4.0, -2.0, 4.0, 0.0], [8, -5.0, -5.0, -3.0, -2.0]], [[18, 0.0, -5.0, 2.0, -3.0], [25, 0.0, 5.0, 0.0, 7.0], [6, -2.0, 4.0, -1.0, 7.0]]], []], [[[[7, 3.0, 2.0, 5.0, 3.0], [2, 3.0, -3.0, 6.0, 0.0], [8, 4.0, 2.0, 4.0, 4.0]], [[39, 3.0, -4.0, 3.0, -1.0]]], [[2, 39]]]], [[[[[32, 1.0, -2.0, 3.0, -2.0], [35, 0.0, -2.0, 3.0, 1.0], [1, -3.0, 0.0, -2.0, 3.0], [18, -3.0, -3.0, 0.0, -1.0]], [[20, 0.0, -1.0, 3.0, 0.0], [37, 2.0, 0.0, 5.0, 2.0], [21, 0.0, 0.0, 0.0, 0.0], [27, -5.0, -3.0, -5.0, -1.0]]], [[18, 20], [35, 20], [35, 21], [35, 37]]], [[[[14, -5.0, 2.0, -2.0, 3.0], [29, -1.0, 3.0, -1.0, 6.0], [3, 2.0, -2.0, 2.0, 1.0]], [[33, -5.0, -1.0, 4.0, 1.0]]], [[3, 33]]], [[[[38, 4.0, 4.0, 7.0, 6.0], [3, 3.0, 4.0, 5.0, 5.0], [23, -4.0, -1.0, -2.0, -1.0], [24, 0.0, -4.0, 1.0, -4.0]], [[6, 0.0, -5.0, 2.0, -4.0], [5, 0.0, 1.0, 0.0, 1.0]]], [[24, 6]]], [[[[15, -3.0, 2.0, 0.0, 3.0]], [[14, -1.0, -4.0, -1.0, -3.0], [31, 3.0, 4.0, 6.0, 5.0]]], []], [[[[12, 4.0, 0.0, 6.0, 1.0], [37, -5.0, 1.0, -4.0, 2.0], [2, -2.0, -1.0, -1.0, 0.0], [38, -4.0, 2.0, -2.0, 4.0]], [[7, 4.0, 2.0, 6.0, 5.0]]], []], [[[[14, -5.0, -5.0, -3.0, -4.0], [1, -5.0, -1.0, -2.0, -1.0], [29, 4.0, -1.0, 4.0, 0.0]], [[32, -3.0, -4.0, -3.0, -3.0], [39, -5.0, 4.0, -2.0, 6.0], [20, 1.0, 0.0, 4.0, 0.0]]], [[14, 32], [29, 20]]], [[[[17, 2.0, 4.0, 5.0, 6.0], [6, -5.0, 3.0, -5.0, 4.0], [22, 0.0, -1.0, 2.0, -1.0]], [[27, -3.0, -1.0, -3.0, 1.0], [10, -4.0, 4.0, -1.0, 5.0], [32, 5.0, -1.0, 8.0, 1.0], [12, -3.0, -1.0, 0.0, -1.0]]], [[22, 12]]], [[[[14, 5.0, 5.0, 5.0, 6.0], [21, -2.0, 5.0, 1.0, 5.0], [32, 4.0, -1.0, 4.0, 0.0], [33, 5.0, -1.0, 8.0, 0.0]], [[27, -3.0, 1.0, -1.0, 3.0], [22, 2.0, 5.0, 4.0, 7.0], [24, 1.0, -4.0, 2.0, -3.0], [18, -4.0, 1.0, -2.0, 3.0]]], []]], [[[[[32, 2.0, 1.0, 4.0, 4.0], [10, 2.0, -3.0, 3.0, -2.0]], [[5, -2.0, 5.0, -1.0, 5.0]]], []], [[[[14, -5.0, -5.0, -5.0, -5.0], [26, -3.0, -1.0, -1.0, 1.0], [20, 1.0, 3.0, 3.0, 4.0]], [[10, -5.0, -5.0, 2.0, -4.0]]], [[14, 10]]], [[[[38, 5.0, 0.0, 5.0, 2.0], [37, -5.0, 5.0, -4.0, 5.0]], [[7, 3.0, 1.0, 5.0, 4.0], [33, -5.0, 3.0, -4.0, 5.0], [13, -4.0, -4.0, -4.0, -1.0]]], [[37, 33], [38, 7]]], [[[[8, 5.0, 5.0, 5.0, 7.0], [24, 2.0, -5.0, 4.0, -2.0], [15, -4.0, -3.0, -3.0, 0.0], [35, -1.0, 3.0, -1.0, 5.0]], [[23, 5.0, 5.0, 5.0, 7.0], [11, 2.0, 0.0, 3.0, 1.0], [25, -2.0, 4.0, 1.0, 4.0]]], [[8, 23], [35, 25]]], [[[[29, 1.0, 5.0, 3.0, 7.0], [12, -1.0, -4.0, 0.0, -1.0], [32, 5.0, 5.0, 8.0, 8.0], [35, 4.0, 3.0, 7.0, 4.0]], [[30, 1.0, -2.0, 4.0, 1.0], [39, 1.0, -4.0, 4.0, -2.0], [31, -1.0, -3.0, 1.0, -3.0]]], [[12, 31]]], [[[[26, -2.0, 0.0, -2.0, 3.0], [17, -4.0, 2.0, -1.0, 5.0], [18, 0.0, 1.0, 2.0, 1.0]], [[35, -2.0, -3.0, 2.0, -2.0], [36, -2.0, 2.0, 1.0, 3.0], [16, -2.0, 5.0, 1.0, 7.0]]], [[17, 16], [17, 36], [26, 36]]], [[[[7, -3.0, 3.0, -3.0, 3.0], [22, -5.0, -5.0, -4.0, -3.0], [16, 5.0, -2.0, 6.0, 0.0], [27, 5.0, -5.0, 8.0, -4.0]], [[31, -3.0, -5.0, 5.0, -4.0], [5, -1.0, 2.0, -1.0, 4.0]]], [[27, 31]]], [[[[22, 4.0, 4.0, 4.0, 5.0], [11, 1.0, -4.0, 3.0, -4.0], [6, -2.0, -5.0, -1.0, -5.0], [2, -3.0, 0.0, -1.0, 3.0]], [[17, 3.0, 4.0, 4.0, 7.0]]], [[22, 17]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
case 0[][[15, 8]]Failed
case 1[][[26, 23]]Failed
case 2[][]Passed
case 3[[11, 28]][[11, 28]]Passed
case 4[[22, 27]][[22, 27], [38, 18]]Failed
case 5[][[1, 18], [1, 39], [10, 26], [29, 18]]Failed
case 6[][]Passed
case 7[][]Passed

SHA-256 / 38a22a06357c2b9058d21b38d692d178eb41a08a2fcf42cff6a9d038760d9d5c

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(A, B):
    As = sorted(A, key=lambda r: (r[1], r[0]))
    Bs = sorted(B, key=lambda r: (r[1], r[0]))
    def yover(p, q):
        return p[2] <= q[4] and q[2] <= p[4]
    pairs = []
    j = 0
    for a in As:
        while j < len(Bs) and Bs[j][1] < a[1]:
            j += 1
        k = j
        while k < len(Bs) and Bs[k][1] <= a[3]:
            if yover(a, Bs[k]):
                pairs.append([a[0], Bs[k][0]])
            k += 1
    j2 = 0
    for b in Bs:
        k = j2
        while k < len(As) and As[k][1] <= b[3]:
            if yover(As[k], b):
                pairs.append([As[k][0], b[0]])
            k += 1
    pairs.sort()
    return pairs
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[28, 4.0, 5.0, 4.0, 8.0], [34, 4.0, -5.0, 5.0, -2.0], [15, 2.0, -1.0, 3.0, 2.0], [31, -5.0, 5.0, -2.0, 6.0]], [[14, 4.0, -1.0, 4.0, 0.0], [17, 1.0, 4.0, 3.0, 7.0], [8, 1.0, 1.0, 3.0, 1.0], [39, -1.0, -5.0, 0.0, -5.0]]], [[15, 8]]], [[[[20, 3.0, 4.0, 5.0, 5.0], [26, -4.0, -4.0, -3.0, -2.0], [17, 4.0, -1.0, 5.0, 0.0]], [[11, 3.0, 1.0, 4.0, 1.0], [22, 2.0, -4.0, 2.0, -3.0], [23, -5.0, -3.0, -2.0, 0.0], [39, -5.0, 2.0, -2.0, 2.0]]], [[26, 23]]], [[[[30, 4.0, -3.0, 5.0, 0.0], [34, 1.0, 5.0, 1.0, 8.0], [14, 5.0, 1.0, 5.0, 1.0]], [[24, 4.0, 2.0, 4.0, 5.0], [10, -4.0, -1.0, -1.0, 0.0], [15, -4.0, 1.0, -4.0, 2.0]]], []], [[[[13, -5.0, 1.0, -3.0, 2.0], [11, -5.0, 4.0, -2.0, 6.0], [16, 0.0, -4.0, 0.0, -4.0]], [[6, -5.0, 3.0, 5.0, 3.0], [10, 0.0, 5.0, 1.0, 8.0], [28, -3.0, 4.0, 0.0, 7.0], [39, -5.0, -5.0, -5.0, -3.0]]], [[11, 28]]], [[[[22, -5.0, -3.0, -2.0, 0.0], [19, 1.0, 3.0, 4.0, 5.0], [38, 0.0, 1.0, 0.0, 3.0], [33, 1.0, -4.0, 3.0, -3.0]], [[18, -1.0, 1.0, 2.0, 2.0], [27, -5.0, -1.0, -2.0, 0.0]]], [[22, 27], [38, 18]]], [[[[10, 5.0, -4.0, 8.0, -4.0], [1, 2.0, -3.0, 5.0, 0.0], [36, 1.0, 5.0, 3.0, 6.0], [29, 0.0, -5.0, 0.0, -2.0]], [[26, 4.0, -4.0, 5.0, -4.0], [18, -1.0, -4.0, 2.0, -3.0], [39, 1.0, -4.0, 2.0, -2.0]]], [[1, 18], [1, 39], [10, 26], [29, 18]]], [[[[5, 2.0, -2.0, 3.0, -1.0], [11, 2.0, -1.0, 5.0, -1.0], [7, 1.0, 3.0, 1.0, 5.0]], [[24, 2.0, 0.0, 2.0, 0.0], [12, -5.0, 1.0, -3.0, 1.0]]], []], [[[[29, -1.0, -1.0, -1.0, 1.0], [37, 2.0, -5.0, 4.0, -4.0]], [[31, 2.0, -3.0, 2.0, -1.0]]], []]], [[[[[15, -3.0, 2.0, -3.0, 4.0], [32, -1.0, 5.0, 1.0, 6.0], [10, -4.0, -3.0, -4.0, -3.0]], [[19, 3.0, 0.0, 6.0, 1.0], [21, -1.0, -2.0, -1.0, -1.0], [14, 5.0, 2.0, 5.0, 4.0], [39, -4.0, 4.0, -3.0, 7.0]]], [[15, 39]]], [[[[30, -5.0, 0.0, -2.0, 0.0], [26, -4.0, -4.0, -3.0, -3.0], [39, -5.0, 0.0, -5.0, 2.0], [31, -5.0, 5.0, -3.0, 5.0]], [[22, -1.0, -2.0, 2.0, 1.0], [38, -4.0, 1.0, -1.0, 2.0], [17, -4.0, -4.0, -4.0, -4.0], [28, 1.0, -1.0, 3.0, 0.0]]], [[26, 17]]], [[[[13, 0.0, -1.0, 0.0, 0.0], [30, 0.0, 1.0, 1.0, 1.0], [37, 0.0, -1.0, 3.0, -1.0]], [[27, 0.0, -5.0, 0.0, -3.0], [22, 1.0, -1.0, 4.0, 2.0], [35, -1.0, -4.0, 1.0, -3.0], [36, 3.0, 0.0, 4.0, 0.0]]], [[30, 22], [37, 22]]], [[[[9, 1.0, 5.0, 2.0, 7.0], [2, 2.0, 3.0, 5.0, 5.0], [18, -1.0, 1.0, 1.0, 2.0]], [[10, 5.0, -4.0, 7.0, -2.0], [7, -4.0, 2.0, -1.0, 4.0], [37, 4.0, 3.0, 5.0, 3.0], [23, 1.0, -2.0, 1.0, -2.0]]], [[2, 37], [18, 7]]], [[[[21, 2.0, -3.0, 2.0, -3.0], [25, 0.0, -5.0, 0.0, -3.0], [12, -1.0, -3.0, 2.0, 0.0]], [[28, 3.0, -4.0, 3.0, -1.0], [3, 5.0, -5.0, 6.0, -4.0], [31, -3.0, -1.0, -1.0, -1.0], [34, 4.0, 1.0, 6.0, 3.0]]], [[12, 31]]], [[[[16, -3.0, -3.0, -1.0, -3.0]], [[32, -5.0, 3.0, -5.0, 4.0], [18, 1.0, -1.0, 3.0, 1.0], [34, 4.0, -3.0, 4.0, 0.0]]], []], [[[[8, 2.0, -3.0, 4.0, -2.0], [26, -4.0, 0.0, -2.0, 2.0]], [[31, 1.0, 1.0, 2.0, 3.0], [17, 0.0, 1.0, 3.0, 1.0], [23, 4.0, 2.0, 5.0, 4.0], [1, -5.0, -4.0, -4.0, -1.0]]], []], [[[[17, -2.0, -5.0, 1.0, -2.0], [23, 5.0, 3.0, 6.0, 5.0], [31, -3.0, -5.0, -1.0, -5.0]], [[7, -2.0, -1.0, 5.0, -1.0]]], []]], [[[[[14, -4.0, -3.0, -2.0, 0.0], [18, 0.0, -5.0, 2.0, -2.0], [37, 5.0, 5.0, 7.0, 5.0]], [[34, -4.0, -1.0, 5.0, 0.0], [4, -2.0, -2.0, 1.0, 1.0], [3, -2.0, 3.0, -2.0, 4.0], [11, 4.0, 5.0, 7.0, 6.0]]], [[14, 4], [14, 34], [18, 4], [37, 11]]], [[[[30, 1.0, -2.0, 2.0, -2.0], [32, -1.0, -5.0, -1.0, -3.0], [28, -3.0, 5.0, 0.0, 5.0]], [[24, -4.0, 0.0, -2.0, 1.0], [22, -3.0, -3.0, 0.0, 0.0], [8, 4.0, -5.0, 6.0, -5.0], [31, 0.0, 5.0, 2.0, 8.0]]], [[28, 31], [32, 22]]], [[[[27, -2.0, -2.0, 0.0, 1.0]], [[28, 3.0, 4.0, 6.0, 7.0], [29, -4.0, -1.0, -2.0, 0.0], [34, 4.0, -4.0, 7.0, -3.0], [38, -1.0, 1.0, 2.0, 4.0]]], [[27, 29], [27, 38]]], [[[[31, 5.0, 3.0, 5.0, 6.0], [9, -5.0, -1.0, -2.0, 2.0]], [[7, 5.0, 5.0, 5.0, 7.0], [32, -2.0, -1.0, -1.0, 2.0], [38, 3.0, -5.0, 5.0, -4.0]]], [[9, 32], [31, 7]]], [[[[22, 1.0, -1.0, 4.0, 1.0]], [[30, 2.0, -2.0, 2.0, 0.0], [5, 5.0, 1.0, 5.0, 3.0]]], [[22, 30]]], [[[[26, -3.0, 0.0, -3.0, 3.0]], [[28, -2.0, -3.0, -2.0, -2.0], [20, 1.0, 3.0, 1.0, 3.0], [29, 2.0, 4.0, 2.0, 5.0], [19, -3.0, 0.0, -2.0, 3.0]]], [[26, 19]]], [[[[31, 4.0, -2.0, 4.0, 0.0], [8, -5.0, -5.0, -3.0, -2.0]], [[18, 0.0, -5.0, 2.0, -3.0], [25, 0.0, 5.0, 0.0, 7.0], [6, -2.0, 4.0, -1.0, 7.0]]], []], [[[[7, 3.0, 2.0, 5.0, 3.0], [2, 3.0, -3.0, 6.0, 0.0], [8, 4.0, 2.0, 4.0, 4.0]], [[39, 3.0, -4.0, 3.0, -1.0]]], [[2, 39]]]], [[[[[32, 1.0, -2.0, 3.0, -2.0], [35, 0.0, -2.0, 3.0, 1.0], [1, -3.0, 0.0, -2.0, 3.0], [18, -3.0, -3.0, 0.0, -1.0]], [[20, 0.0, -1.0, 3.0, 0.0], [37, 2.0, 0.0, 5.0, 2.0], [21, 0.0, 0.0, 0.0, 0.0], [27, -5.0, -3.0, -5.0, -1.0]]], [[18, 20], [35, 20], [35, 21], [35, 37]]], [[[[14, -5.0, 2.0, -2.0, 3.0], [29, -1.0, 3.0, -1.0, 6.0], [3, 2.0, -2.0, 2.0, 1.0]], [[33, -5.0, -1.0, 4.0, 1.0]]], [[3, 33]]], [[[[38, 4.0, 4.0, 7.0, 6.0], [3, 3.0, 4.0, 5.0, 5.0], [23, -4.0, -1.0, -2.0, -1.0], [24, 0.0, -4.0, 1.0, -4.0]], [[6, 0.0, -5.0, 2.0, -4.0], [5, 0.0, 1.0, 0.0, 1.0]]], [[24, 6]]], [[[[15, -3.0, 2.0, 0.0, 3.0]], [[14, -1.0, -4.0, -1.0, -3.0], [31, 3.0, 4.0, 6.0, 5.0]]], []], [[[[12, 4.0, 0.0, 6.0, 1.0], [37, -5.0, 1.0, -4.0, 2.0], [2, -2.0, -1.0, -1.0, 0.0], [38, -4.0, 2.0, -2.0, 4.0]], [[7, 4.0, 2.0, 6.0, 5.0]]], []], [[[[14, -5.0, -5.0, -3.0, -4.0], [1, -5.0, -1.0, -2.0, -1.0], [29, 4.0, -1.0, 4.0, 0.0]], [[32, -3.0, -4.0, -3.0, -3.0], [39, -5.0, 4.0, -2.0, 6.0], [20, 1.0, 0.0, 4.0, 0.0]]], [[14, 32], [29, 20]]], [[[[17, 2.0, 4.0, 5.0, 6.0], [6, -5.0, 3.0, -5.0, 4.0], [22, 0.0, -1.0, 2.0, -1.0]], [[27, -3.0, -1.0, -3.0, 1.0], [10, -4.0, 4.0, -1.0, 5.0], [32, 5.0, -1.0, 8.0, 1.0], [12, -3.0, -1.0, 0.0, -1.0]]], [[22, 12]]], [[[[14, 5.0, 5.0, 5.0, 6.0], [21, -2.0, 5.0, 1.0, 5.0], [32, 4.0, -1.0, 4.0, 0.0], [33, 5.0, -1.0, 8.0, 0.0]], [[27, -3.0, 1.0, -1.0, 3.0], [22, 2.0, 5.0, 4.0, 7.0], [24, 1.0, -4.0, 2.0, -3.0], [18, -4.0, 1.0, -2.0, 3.0]]], []]], [[[[[32, 2.0, 1.0, 4.0, 4.0], [10, 2.0, -3.0, 3.0, -2.0]], [[5, -2.0, 5.0, -1.0, 5.0]]], []], [[[[14, -5.0, -5.0, -5.0, -5.0], [26, -3.0, -1.0, -1.0, 1.0], [20, 1.0, 3.0, 3.0, 4.0]], [[10, -5.0, -5.0, 2.0, -4.0]]], [[14, 10]]], [[[[38, 5.0, 0.0, 5.0, 2.0], [37, -5.0, 5.0, -4.0, 5.0]], [[7, 3.0, 1.0, 5.0, 4.0], [33, -5.0, 3.0, -4.0, 5.0], [13, -4.0, -4.0, -4.0, -1.0]]], [[37, 33], [38, 7]]], [[[[8, 5.0, 5.0, 5.0, 7.0], [24, 2.0, -5.0, 4.0, -2.0], [15, -4.0, -3.0, -3.0, 0.0], [35, -1.0, 3.0, -1.0, 5.0]], [[23, 5.0, 5.0, 5.0, 7.0], [11, 2.0, 0.0, 3.0, 1.0], [25, -2.0, 4.0, 1.0, 4.0]]], [[8, 23], [35, 25]]], [[[[29, 1.0, 5.0, 3.0, 7.0], [12, -1.0, -4.0, 0.0, -1.0], [32, 5.0, 5.0, 8.0, 8.0], [35, 4.0, 3.0, 7.0, 4.0]], [[30, 1.0, -2.0, 4.0, 1.0], [39, 1.0, -4.0, 4.0, -2.0], [31, -1.0, -3.0, 1.0, -3.0]]], [[12, 31]]], [[[[26, -2.0, 0.0, -2.0, 3.0], [17, -4.0, 2.0, -1.0, 5.0], [18, 0.0, 1.0, 2.0, 1.0]], [[35, -2.0, -3.0, 2.0, -2.0], [36, -2.0, 2.0, 1.0, 3.0], [16, -2.0, 5.0, 1.0, 7.0]]], [[17, 16], [17, 36], [26, 36]]], [[[[7, -3.0, 3.0, -3.0, 3.0], [22, -5.0, -5.0, -4.0, -3.0], [16, 5.0, -2.0, 6.0, 0.0], [27, 5.0, -5.0, 8.0, -4.0]], [[31, -3.0, -5.0, 5.0, -4.0], [5, -1.0, 2.0, -1.0, 4.0]]], [[27, 31]]], [[[[22, 4.0, 4.0, 4.0, 5.0], [11, 1.0, -4.0, 3.0, -4.0], [6, -2.0, -5.0, -1.0, -5.0], [2, -3.0, 0.0, -1.0, 3.0]], [[17, 3.0, 4.0, 4.0, 7.0]]], [[22, 17]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
case 0[[15, 8], [15, 14], [31, 17]][[15, 8]]Failed
case 1[[26, 22], [26, 23]][[26, 23]]Failed
case 2[[34, 24]][]Failed
case 3[[11, 10], [11, 28], [11, 28]][[11, 28]]Failed
case 4[[22, 27], [22, 27], [38, 18]][[22, 27], [38, 18]]Failed
case 5[[1, 18], [1, 39], [10, 26], [29, 18], [29, 26], [29, 39]][[1, 18], [1, 39], [10, 26], [29, 18]]Failed
case 6[][]Passed
case 7[[29, 31]][]Failed

SHA-256 / 8ee333e94e5d9288afced5fc8adaf375464f2041d91ee002b2a459e0ba1eac7b

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(A, B):
    As = sorted(A, key=lambda r: (r[1], r[0]))
    Bs = sorted(B, key=lambda r: (r[1], r[0]))
    def yover(p, q):
        return p[2] <= q[4] and q[2] <= p[4]
    pairs = []
    j = 0
    for a in As:
        while j < len(Bs) and Bs[j][1] < a[1]:
            j += 1
        k = j
        while k < len(Bs) and Bs[k][1] <= a[3]:
            if yover(a, Bs[k]):
                pairs.append([a[0], Bs[k][0]])
            k += 1
    j2 = 0
    for b in Bs:
        while j2 < len(As) and As[j2][1] <= b[1]:
            j2 += 1
        k = j2
        while k < len(As) and As[k][1] <= b[3]:
            if yover(As[k], b):
                pairs.append([As[k][0], b[0]])
            k += 1
    pairs.sort()
    return pairs
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[28, 4.0, 5.0, 4.0, 8.0], [34, 4.0, -5.0, 5.0, -2.0], [15, 2.0, -1.0, 3.0, 2.0], [31, -5.0, 5.0, -2.0, 6.0]], [[14, 4.0, -1.0, 4.0, 0.0], [17, 1.0, 4.0, 3.0, 7.0], [8, 1.0, 1.0, 3.0, 1.0], [39, -1.0, -5.0, 0.0, -5.0]]], [[15, 8]]], [[[[20, 3.0, 4.0, 5.0, 5.0], [26, -4.0, -4.0, -3.0, -2.0], [17, 4.0, -1.0, 5.0, 0.0]], [[11, 3.0, 1.0, 4.0, 1.0], [22, 2.0, -4.0, 2.0, -3.0], [23, -5.0, -3.0, -2.0, 0.0], [39, -5.0, 2.0, -2.0, 2.0]]], [[26, 23]]], [[[[30, 4.0, -3.0, 5.0, 0.0], [34, 1.0, 5.0, 1.0, 8.0], [14, 5.0, 1.0, 5.0, 1.0]], [[24, 4.0, 2.0, 4.0, 5.0], [10, -4.0, -1.0, -1.0, 0.0], [15, -4.0, 1.0, -4.0, 2.0]]], []], [[[[13, -5.0, 1.0, -3.0, 2.0], [11, -5.0, 4.0, -2.0, 6.0], [16, 0.0, -4.0, 0.0, -4.0]], [[6, -5.0, 3.0, 5.0, 3.0], [10, 0.0, 5.0, 1.0, 8.0], [28, -3.0, 4.0, 0.0, 7.0], [39, -5.0, -5.0, -5.0, -3.0]]], [[11, 28]]], [[[[22, -5.0, -3.0, -2.0, 0.0], [19, 1.0, 3.0, 4.0, 5.0], [38, 0.0, 1.0, 0.0, 3.0], [33, 1.0, -4.0, 3.0, -3.0]], [[18, -1.0, 1.0, 2.0, 2.0], [27, -5.0, -1.0, -2.0, 0.0]]], [[22, 27], [38, 18]]], [[[[10, 5.0, -4.0, 8.0, -4.0], [1, 2.0, -3.0, 5.0, 0.0], [36, 1.0, 5.0, 3.0, 6.0], [29, 0.0, -5.0, 0.0, -2.0]], [[26, 4.0, -4.0, 5.0, -4.0], [18, -1.0, -4.0, 2.0, -3.0], [39, 1.0, -4.0, 2.0, -2.0]]], [[1, 18], [1, 39], [10, 26], [29, 18]]], [[[[5, 2.0, -2.0, 3.0, -1.0], [11, 2.0, -1.0, 5.0, -1.0], [7, 1.0, 3.0, 1.0, 5.0]], [[24, 2.0, 0.0, 2.0, 0.0], [12, -5.0, 1.0, -3.0, 1.0]]], []], [[[[29, -1.0, -1.0, -1.0, 1.0], [37, 2.0, -5.0, 4.0, -4.0]], [[31, 2.0, -3.0, 2.0, -1.0]]], []]], [[[[[15, -3.0, 2.0, -3.0, 4.0], [32, -1.0, 5.0, 1.0, 6.0], [10, -4.0, -3.0, -4.0, -3.0]], [[19, 3.0, 0.0, 6.0, 1.0], [21, -1.0, -2.0, -1.0, -1.0], [14, 5.0, 2.0, 5.0, 4.0], [39, -4.0, 4.0, -3.0, 7.0]]], [[15, 39]]], [[[[30, -5.0, 0.0, -2.0, 0.0], [26, -4.0, -4.0, -3.0, -3.0], [39, -5.0, 0.0, -5.0, 2.0], [31, -5.0, 5.0, -3.0, 5.0]], [[22, -1.0, -2.0, 2.0, 1.0], [38, -4.0, 1.0, -1.0, 2.0], [17, -4.0, -4.0, -4.0, -4.0], [28, 1.0, -1.0, 3.0, 0.0]]], [[26, 17]]], [[[[13, 0.0, -1.0, 0.0, 0.0], [30, 0.0, 1.0, 1.0, 1.0], [37, 0.0, -1.0, 3.0, -1.0]], [[27, 0.0, -5.0, 0.0, -3.0], [22, 1.0, -1.0, 4.0, 2.0], [35, -1.0, -4.0, 1.0, -3.0], [36, 3.0, 0.0, 4.0, 0.0]]], [[30, 22], [37, 22]]], [[[[9, 1.0, 5.0, 2.0, 7.0], [2, 2.0, 3.0, 5.0, 5.0], [18, -1.0, 1.0, 1.0, 2.0]], [[10, 5.0, -4.0, 7.0, -2.0], [7, -4.0, 2.0, -1.0, 4.0], [37, 4.0, 3.0, 5.0, 3.0], [23, 1.0, -2.0, 1.0, -2.0]]], [[2, 37], [18, 7]]], [[[[21, 2.0, -3.0, 2.0, -3.0], [25, 0.0, -5.0, 0.0, -3.0], [12, -1.0, -3.0, 2.0, 0.0]], [[28, 3.0, -4.0, 3.0, -1.0], [3, 5.0, -5.0, 6.0, -4.0], [31, -3.0, -1.0, -1.0, -1.0], [34, 4.0, 1.0, 6.0, 3.0]]], [[12, 31]]], [[[[16, -3.0, -3.0, -1.0, -3.0]], [[32, -5.0, 3.0, -5.0, 4.0], [18, 1.0, -1.0, 3.0, 1.0], [34, 4.0, -3.0, 4.0, 0.0]]], []], [[[[8, 2.0, -3.0, 4.0, -2.0], [26, -4.0, 0.0, -2.0, 2.0]], [[31, 1.0, 1.0, 2.0, 3.0], [17, 0.0, 1.0, 3.0, 1.0], [23, 4.0, 2.0, 5.0, 4.0], [1, -5.0, -4.0, -4.0, -1.0]]], []], [[[[17, -2.0, -5.0, 1.0, -2.0], [23, 5.0, 3.0, 6.0, 5.0], [31, -3.0, -5.0, -1.0, -5.0]], [[7, -2.0, -1.0, 5.0, -1.0]]], []]], [[[[[14, -4.0, -3.0, -2.0, 0.0], [18, 0.0, -5.0, 2.0, -2.0], [37, 5.0, 5.0, 7.0, 5.0]], [[34, -4.0, -1.0, 5.0, 0.0], [4, -2.0, -2.0, 1.0, 1.0], [3, -2.0, 3.0, -2.0, 4.0], [11, 4.0, 5.0, 7.0, 6.0]]], [[14, 4], [14, 34], [18, 4], [37, 11]]], [[[[30, 1.0, -2.0, 2.0, -2.0], [32, -1.0, -5.0, -1.0, -3.0], [28, -3.0, 5.0, 0.0, 5.0]], [[24, -4.0, 0.0, -2.0, 1.0], [22, -3.0, -3.0, 0.0, 0.0], [8, 4.0, -5.0, 6.0, -5.0], [31, 0.0, 5.0, 2.0, 8.0]]], [[28, 31], [32, 22]]], [[[[27, -2.0, -2.0, 0.0, 1.0]], [[28, 3.0, 4.0, 6.0, 7.0], [29, -4.0, -1.0, -2.0, 0.0], [34, 4.0, -4.0, 7.0, -3.0], [38, -1.0, 1.0, 2.0, 4.0]]], [[27, 29], [27, 38]]], [[[[31, 5.0, 3.0, 5.0, 6.0], [9, -5.0, -1.0, -2.0, 2.0]], [[7, 5.0, 5.0, 5.0, 7.0], [32, -2.0, -1.0, -1.0, 2.0], [38, 3.0, -5.0, 5.0, -4.0]]], [[9, 32], [31, 7]]], [[[[22, 1.0, -1.0, 4.0, 1.0]], [[30, 2.0, -2.0, 2.0, 0.0], [5, 5.0, 1.0, 5.0, 3.0]]], [[22, 30]]], [[[[26, -3.0, 0.0, -3.0, 3.0]], [[28, -2.0, -3.0, -2.0, -2.0], [20, 1.0, 3.0, 1.0, 3.0], [29, 2.0, 4.0, 2.0, 5.0], [19, -3.0, 0.0, -2.0, 3.0]]], [[26, 19]]], [[[[31, 4.0, -2.0, 4.0, 0.0], [8, -5.0, -5.0, -3.0, -2.0]], [[18, 0.0, -5.0, 2.0, -3.0], [25, 0.0, 5.0, 0.0, 7.0], [6, -2.0, 4.0, -1.0, 7.0]]], []], [[[[7, 3.0, 2.0, 5.0, 3.0], [2, 3.0, -3.0, 6.0, 0.0], [8, 4.0, 2.0, 4.0, 4.0]], [[39, 3.0, -4.0, 3.0, -1.0]]], [[2, 39]]]], [[[[[32, 1.0, -2.0, 3.0, -2.0], [35, 0.0, -2.0, 3.0, 1.0], [1, -3.0, 0.0, -2.0, 3.0], [18, -3.0, -3.0, 0.0, -1.0]], [[20, 0.0, -1.0, 3.0, 0.0], [37, 2.0, 0.0, 5.0, 2.0], [21, 0.0, 0.0, 0.0, 0.0], [27, -5.0, -3.0, -5.0, -1.0]]], [[18, 20], [35, 20], [35, 21], [35, 37]]], [[[[14, -5.0, 2.0, -2.0, 3.0], [29, -1.0, 3.0, -1.0, 6.0], [3, 2.0, -2.0, 2.0, 1.0]], [[33, -5.0, -1.0, 4.0, 1.0]]], [[3, 33]]], [[[[38, 4.0, 4.0, 7.0, 6.0], [3, 3.0, 4.0, 5.0, 5.0], [23, -4.0, -1.0, -2.0, -1.0], [24, 0.0, -4.0, 1.0, -4.0]], [[6, 0.0, -5.0, 2.0, -4.0], [5, 0.0, 1.0, 0.0, 1.0]]], [[24, 6]]], [[[[15, -3.0, 2.0, 0.0, 3.0]], [[14, -1.0, -4.0, -1.0, -3.0], [31, 3.0, 4.0, 6.0, 5.0]]], []], [[[[12, 4.0, 0.0, 6.0, 1.0], [37, -5.0, 1.0, -4.0, 2.0], [2, -2.0, -1.0, -1.0, 0.0], [38, -4.0, 2.0, -2.0, 4.0]], [[7, 4.0, 2.0, 6.0, 5.0]]], []], [[[[14, -5.0, -5.0, -3.0, -4.0], [1, -5.0, -1.0, -2.0, -1.0], [29, 4.0, -1.0, 4.0, 0.0]], [[32, -3.0, -4.0, -3.0, -3.0], [39, -5.0, 4.0, -2.0, 6.0], [20, 1.0, 0.0, 4.0, 0.0]]], [[14, 32], [29, 20]]], [[[[17, 2.0, 4.0, 5.0, 6.0], [6, -5.0, 3.0, -5.0, 4.0], [22, 0.0, -1.0, 2.0, -1.0]], [[27, -3.0, -1.0, -3.0, 1.0], [10, -4.0, 4.0, -1.0, 5.0], [32, 5.0, -1.0, 8.0, 1.0], [12, -3.0, -1.0, 0.0, -1.0]]], [[22, 12]]], [[[[14, 5.0, 5.0, 5.0, 6.0], [21, -2.0, 5.0, 1.0, 5.0], [32, 4.0, -1.0, 4.0, 0.0], [33, 5.0, -1.0, 8.0, 0.0]], [[27, -3.0, 1.0, -1.0, 3.0], [22, 2.0, 5.0, 4.0, 7.0], [24, 1.0, -4.0, 2.0, -3.0], [18, -4.0, 1.0, -2.0, 3.0]]], []]], [[[[[32, 2.0, 1.0, 4.0, 4.0], [10, 2.0, -3.0, 3.0, -2.0]], [[5, -2.0, 5.0, -1.0, 5.0]]], []], [[[[14, -5.0, -5.0, -5.0, -5.0], [26, -3.0, -1.0, -1.0, 1.0], [20, 1.0, 3.0, 3.0, 4.0]], [[10, -5.0, -5.0, 2.0, -4.0]]], [[14, 10]]], [[[[38, 5.0, 0.0, 5.0, 2.0], [37, -5.0, 5.0, -4.0, 5.0]], [[7, 3.0, 1.0, 5.0, 4.0], [33, -5.0, 3.0, -4.0, 5.0], [13, -4.0, -4.0, -4.0, -1.0]]], [[37, 33], [38, 7]]], [[[[8, 5.0, 5.0, 5.0, 7.0], [24, 2.0, -5.0, 4.0, -2.0], [15, -4.0, -3.0, -3.0, 0.0], [35, -1.0, 3.0, -1.0, 5.0]], [[23, 5.0, 5.0, 5.0, 7.0], [11, 2.0, 0.0, 3.0, 1.0], [25, -2.0, 4.0, 1.0, 4.0]]], [[8, 23], [35, 25]]], [[[[29, 1.0, 5.0, 3.0, 7.0], [12, -1.0, -4.0, 0.0, -1.0], [32, 5.0, 5.0, 8.0, 8.0], [35, 4.0, 3.0, 7.0, 4.0]], [[30, 1.0, -2.0, 4.0, 1.0], [39, 1.0, -4.0, 4.0, -2.0], [31, -1.0, -3.0, 1.0, -3.0]]], [[12, 31]]], [[[[26, -2.0, 0.0, -2.0, 3.0], [17, -4.0, 2.0, -1.0, 5.0], [18, 0.0, 1.0, 2.0, 1.0]], [[35, -2.0, -3.0, 2.0, -2.0], [36, -2.0, 2.0, 1.0, 3.0], [16, -2.0, 5.0, 1.0, 7.0]]], [[17, 16], [17, 36], [26, 36]]], [[[[7, -3.0, 3.0, -3.0, 3.0], [22, -5.0, -5.0, -4.0, -3.0], [16, 5.0, -2.0, 6.0, 0.0], [27, 5.0, -5.0, 8.0, -4.0]], [[31, -3.0, -5.0, 5.0, -4.0], [5, -1.0, 2.0, -1.0, 4.0]]], [[27, 31]]], [[[[22, 4.0, 4.0, 4.0, 5.0], [11, 1.0, -4.0, 3.0, -4.0], [6, -2.0, -5.0, -1.0, -5.0], [2, -3.0, 0.0, -1.0, 3.0]], [[17, 3.0, 4.0, 4.0, 7.0]]], [[22, 17]]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
case 0[[15, 8]][[15, 8]]Passed
case 1[[26, 23]][[26, 23]]Passed
case 2[][]Passed
case 3[[11, 28]][[11, 28]]Passed
case 4[[22, 27], [38, 18]][[22, 27], [38, 18]]Passed
case 5[[1, 18], [1, 39], [10, 26], [29, 18]][[1, 18], [1, 39], [10, 26], [29, 18]]Passed
case 6[][]Passed
case 7[][]Passed

SHA-256 / 6a825728028769cdb1af2f5ff53f825a2e6cb5ca7312e197ee0ac0c5b33a40ee

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:51:01.949003+00:00.

Case digest / caeeb8cf0ee15491209fef8981abc48fb218946141debb63c023533cae10b555