FAILURE MAP
← Case archive

FA-87731 / Collision detection broadphase / Open access

Moved proxy is tested against itself · case 01

A self pair is created and one wasted test is counted.

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

ROOT CAUSE

The p == q skip is missing.

VERIFIED REPAIR

Skip the query proxy itself before counting.

Unsuccessful approach: Filtering the self pair after counting still counts the self test.

Case contract

solve(proxies, moved): dynamic-tree pair update. For each distinct moved proxy q (first occurrence order) test every other proxy p; skip p when p also moved and p>q (that pair is found from p). Count every overlap test performed; closed intervals. Return [sorted unique [min,max] pairs, test count].

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(proxies, moved):
    box = {p[0]: p for p in proxies}
    mv = set(moved)
    seen = set()
    raw = []
    tests = 0
    for q in moved:
        if q in seen:
            continue
        seen.add(q)
        a = box[q]
        for p in proxies:
            if p[0] in mv and p[0] > q:
                continue
            tests += 1
            if a[1] <= p[3] and p[1] <= a[3] and a[2] <= p[4] and p[2] <= a[4]:
                raw.append((min(q, p[0]), max(q, p[0])))
    pairs = sorted(set(raw))
    return [[list(x) for x in pairs], tests]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[37, -5.0, 4.0, -4.0, 6.0], [18, 5.0, -2.0, 6.0, -1.0]], [37, 18]], [[], 1]], [[[[8, -2.0, 3.0, 0.0, 6.0], [27, 1.0, 0.0, 4.0, 0.0], [3, -5.0, 0.0, -3.0, 2.0]], [3, 27, 8, 3]], [[], 3]], [[[[24, 1.0, 2.0, 4.0, 4.0], [6, -2.0, 0.0, 0.0, 3.0], [27, -2.0, 0.0, 1.0, 2.0]], [6, 6, 27, 6]], [[[6, 27], [24, 27]], 3]], [[[[22, 2.0, -5.0, 4.0, -3.0], [21, -2.0, 4.0, 0.0, 7.0], [3, 4.0, -4.0, 6.0, -3.0], [6, -3.0, 0.0, -3.0, 3.0], [2, 5.0, 4.0, 8.0, 6.0], [38, -2.0, -2.0, -2.0, -2.0]], [6, 6]], [[], 5]], [[[[29, -5.0, 2.0, -4.0, 2.0], [4, 0.0, -3.0, 3.0, -1.0], [17, 1.0, -5.0, 1.0, -4.0], [7, 4.0, 3.0, 7.0, 6.0]], [7, 29, 17, 4, 4]], [[], 6]], [[[[21, 0.0, -4.0, 3.0, -4.0], [33, 4.0, 0.0, 7.0, 2.0], [30, -5.0, -2.0, -4.0, 0.0], [13, 3.0, 4.0, 5.0, 6.0], [3, -5.0, 0.0, -3.0, 0.0]], [33, 33, 13]], [[], 7]], [[[[37, -2.0, -1.0, 1.0, -1.0], [7, 1.0, 1.0, 4.0, 4.0], [13, -4.0, 2.0, -3.0, 3.0], [12, -2.0, -4.0, -2.0, -1.0], [39, -3.0, -3.0, 0.0, 0.0]], [13, 13, 7, 12]], [[[12, 37], [12, 39]], 9]], [[[[13, 4.0, -5.0, 5.0, -3.0], [21, -2.0, 1.0, -2.0, 3.0], [14, 2.0, 0.0, 2.0, 1.0], [10, -1.0, 3.0, 1.0, 6.0], [27, -4.0, 3.0, -2.0, 3.0], [26, -4.0, 0.0, -2.0, 3.0]], [27, 13, 14, 10]], [[[21, 27], [26, 27]], 14]]], [[[[[28, 5.0, -2.0, 6.0, 0.0], [11, 5.0, -3.0, 5.0, -3.0], [10, -3.0, -4.0, -3.0, -2.0], [32, -4.0, 3.0, -4.0, 3.0]], [32]], [[], 3]], [[[[6, 4.0, 2.0, 5.0, 5.0], [28, -5.0, -2.0, -5.0, 1.0], [29, -1.0, 4.0, 1.0, 5.0], [13, 1.0, -1.0, 2.0, 1.0]], [28]], [[], 3]], [[[[26, -4.0, 4.0, -3.0, 6.0], [2, -1.0, -4.0, 0.0, -1.0]], [26]], [[], 1]], [[[[37, -4.0, 3.0, -1.0, 4.0], [20, 1.0, 0.0, 4.0, 3.0], [31, 5.0, -3.0, 7.0, -3.0], [12, 5.0, -5.0, 7.0, -2.0]], [12]], [[[12, 31]], 3]], [[[[38, -1.0, -4.0, -1.0, -1.0], [20, 2.0, -3.0, 3.0, -2.0], [32, 0.0, 2.0, 2.0, 5.0], [27, -3.0, -3.0, -3.0, 0.0], [18, 4.0, 0.0, 7.0, 2.0], [12, -4.0, 0.0, -4.0, 0.0]], [38, 12, 32, 27]], [[], 14]], [[[[22, -5.0, -3.0, -4.0, -1.0], [3, -5.0, 4.0, -4.0, 6.0], [11, 0.0, -2.0, 3.0, 0.0], [23, 5.0, 3.0, 5.0, 4.0]], [3, 3, 22]], [[], 5]], [[[[37, 3.0, 0.0, 3.0, 1.0], [1, 1.0, -4.0, 2.0, -2.0]], [37, 37, 1, 37]], [[], 1]], [[[[12, 4.0, 0.0, 4.0, 2.0], [29, 3.0, -4.0, 5.0, -3.0], [11, 3.0, 3.0, 5.0, 4.0], [28, 2.0, 2.0, 5.0, 5.0]], [29]], [[], 3]]], [[[[[10, -5.0, 4.0, -4.0, 7.0], [32, 2.0, 5.0, 4.0, 8.0], [31, 5.0, 2.0, 5.0, 4.0], [18, -4.0, 0.0, -1.0, 3.0], [30, -3.0, -1.0, -1.0, 1.0], [2, -5.0, 5.0, -4.0, 7.0]], [2, 2, 18, 2, 2]], [[[2, 10], [18, 30]], 9]], [[[[17, 3.0, 5.0, 4.0, 7.0], [12, 0.0, 1.0, 1.0, 3.0], [31, -4.0, 2.0, -2.0, 4.0], [21, -2.0, 4.0, 1.0, 6.0], [11, -5.0, -2.0, -5.0, 0.0], [4, 4.0, 5.0, 7.0, 8.0], [25, -3.0, -2.0, -3.0, -1.0], [13, -3.0, 5.0, 0.0, 8.0]], [13, 4, 17, 25, 4]], [[[4, 17], [13, 21]], 22]], [[[[16, -5.0, -2.0, -3.0, -2.0], [21, 1.0, -2.0, 3.0, -1.0], [22, 3.0, 2.0, 5.0, 2.0], [37, -2.0, -1.0, 1.0, 1.0]], [37, 16, 22, 37, 16]], [[[21, 37]], 6]], [[[[28, -2.0, -4.0, 1.0, -4.0], [6, 4.0, 3.0, 5.0, 3.0], [3, -1.0, 3.0, 2.0, 5.0], [26, 3.0, 0.0, 4.0, 2.0], [21, -5.0, -3.0, -2.0, -3.0], [22, -5.0, -3.0, -2.0, -2.0], [36, -3.0, -1.0, -2.0, 2.0]], [3, 28, 6, 21, 21]], [[[21, 22]], 18]], [[[[38, 0.0, 1.0, 2.0, 4.0], [9, 0.0, 1.0, 2.0, 4.0], [15, -2.0, -4.0, -1.0, -4.0], [2, 5.0, 1.0, 6.0, 3.0], [21, 3.0, -1.0, 5.0, 0.0], [16, 0.0, 1.0, 3.0, 1.0]], [9, 15, 16]], [[[9, 16], [9, 38], [16, 38]], 12]], [[[[14, -4.0, -4.0, -1.0, -2.0], [9, 5.0, -1.0, 7.0, 1.0], [15, -3.0, 4.0, -1.0, 6.0]], [14, 9]], [[], 3]], [[[[10, -2.0, 3.0, -2.0, 3.0], [21, 4.0, 1.0, 7.0, 1.0], [25, 3.0, 1.0, 4.0, 2.0]], [10, 21, 21]], [[[21, 25]], 3]], [[[[20, -5.0, 1.0, -3.0, 2.0], [7, 1.0, 0.0, 2.0, 1.0], [8, 1.0, -3.0, 2.0, -1.0], [3, -4.0, -1.0, -4.0, 2.0], [19, 2.0, -4.0, 3.0, -2.0], [32, 1.0, 0.0, 3.0, 3.0], [35, -2.0, -1.0, 1.0, 0.0], [18, -5.0, -2.0, -4.0, -1.0]], [32]], [[[7, 32], [32, 35]], 7]]], [[[[[27, 2.0, -1.0, 5.0, 1.0], [22, -1.0, -1.0, 0.0, 1.0], [17, 2.0, -1.0, 4.0, 2.0], [32, 1.0, -2.0, 3.0, 0.0]], [17]], [[[17, 27], [17, 32]], 3]], [[[[20, -4.0, -1.0, -1.0, 1.0], [38, 0.0, 0.0, 0.0, 1.0], [21, -2.0, 2.0, -1.0, 3.0], [32, -4.0, -4.0, -4.0, -1.0]], [38, 21, 20]], [[[20, 32]], 6]], [[[[33, 1.0, -5.0, 4.0, -2.0], [19, -1.0, 5.0, 2.0, 8.0]], [19]], [[], 1]], [[[[33, 5.0, -5.0, 6.0, -4.0], [22, -1.0, 4.0, 0.0, 5.0]], [33, 22, 33]], [[], 1]], [[[[32, -5.0, -1.0, -3.0, 2.0], [26, 1.0, 5.0, 2.0, 7.0], [18, -4.0, 2.0, -3.0, 4.0], [5, 1.0, 1.0, 2.0, 1.0], [11, -2.0, 4.0, 1.0, 5.0], [4, 3.0, -4.0, 4.0, -4.0], [37, -4.0, 5.0, -1.0, 7.0]], [18]], [[[18, 32]], 6]], [[[[17, 1.0, 4.0, 1.0, 5.0], [5, -4.0, 5.0, -3.0, 5.0], [15, -5.0, -5.0, -3.0, -3.0], [7, -3.0, -4.0, -3.0, -2.0], [23, -3.0, 1.0, -1.0, 2.0], [26, -1.0, -3.0, 0.0, 0.0], [4, 3.0, 2.0, 4.0, 2.0]], [7, 23]], [[[7, 15]], 11]], [[[[24, 1.0, 3.0, 2.0, 6.0], [11, -5.0, 0.0, -5.0, 3.0]], [11, 24, 11, 24, 11]], [[], 1]], [[[[16, 1.0, -4.0, 4.0, -1.0], [5, 5.0, 0.0, 7.0, 3.0], [38, 0.0, -5.0, 3.0, -2.0], [32, 4.0, -3.0, 6.0, -1.0], [14, -5.0, 5.0, -4.0, 7.0], [13, 1.0, 4.0, 2.0, 5.0], [27, 0.0, -5.0, 3.0, -4.0], [28, 0.0, 2.0, 2.0, 4.0], [7, -3.0, -1.0, -3.0, 1.0], [4, 4.0, -1.0, 4.0, 0.0]], [14]], [[], 9]]], [[[[[24, -5.0, 0.0, -4.0, 1.0], [10, 1.0, 5.0, 4.0, 5.0], [21, -1.0, -4.0, 2.0, -2.0], [28, -4.0, 0.0, -1.0, 2.0], [6, -1.0, 0.0, -1.0, 3.0], [12, 1.0, 5.0, 1.0, 7.0], [19, 3.0, 4.0, 5.0, 7.0]], [24]], [[[24, 28]], 6]], [[[[19, 4.0, 2.0, 5.0, 4.0], [3, -5.0, 0.0, -3.0, 2.0], [7, 1.0, -5.0, 3.0, -5.0], [20, -3.0, -4.0, 0.0, -4.0], [31, 2.0, -4.0, 2.0, -2.0], [29, -2.0, -2.0, 0.0, -2.0], [27, 3.0, -4.0, 4.0, -2.0], [28, 1.0, 2.0, 1.0, 4.0]], [3, 27, 28, 3, 28]], [[], 18]], [[[[37, 3.0, 0.0, 4.0, 1.0], [14, 2.0, -2.0, 2.0, 0.0], [11, 3.0, -2.0, 3.0, -2.0], [12, 2.0, -5.0, 4.0, -4.0], [36, 4.0, 4.0, 6.0, 7.0], [38, 3.0, 5.0, 5.0, 8.0], [33, -4.0, -4.0, -4.0, -1.0], [6, -5.0, -1.0, -3.0, 2.0]], [11]], [[], 7]], [[[[24, 4.0, -1.0, 7.0, 0.0], [22, 2.0, -2.0, 4.0, -2.0], [15, 5.0, -1.0, 5.0, 1.0], [38, 2.0, 1.0, 4.0, 4.0], [19, 0.0, -3.0, 1.0, -3.0], [17, 1.0, -3.0, 3.0, -3.0], [27, 3.0, 2.0, 3.0, 2.0]], [22]], [[], 6]], [[[[21, -2.0, -5.0, 1.0, -5.0], [31, 1.0, -1.0, 3.0, 2.0], [30, 3.0, 0.0, 4.0, 3.0], [22, -4.0, 4.0, -2.0, 6.0], [6, -5.0, 5.0, -5.0, 7.0], [8, 3.0, -5.0, 3.0, -4.0], [29, 2.0, -4.0, 2.0, -3.0]], [8, 30, 6, 29]], [[[30, 31]], 18]], [[[[3, -5.0, -5.0, -2.0, -2.0], [11, 2.0, -1.0, 5.0, -1.0]], [3, 11, 3, 11]], [[], 1]], [[[[27, 5.0, 2.0, 8.0, 4.0], [6, -4.0, 2.0, -3.0, 4.0], [20, -1.0, -1.0, 0.0, -1.0], [24, 3.0, -1.0, 4.0, 2.0], [22, -2.0, -1.0, 1.0, 2.0], [4, -2.0, -2.0, -1.0, 1.0], [11, -1.0, 0.0, 1.0, 2.0], [39, -1.0, -4.0, 1.0, -1.0], [28, 1.0, -5.0, 4.0, -3.0]], [11, 11, 20, 24, 39]], [[[4, 11], [4, 20], [4, 39], [11, 22], [20, 22], [20, 39], [22, 39], [28, 39]], 26]], [[[[38, 5.0, -2.0, 7.0, 0.0], [25, 4.0, -4.0, 7.0, -2.0], [6, 5.0, -1.0, 7.0, -1.0], [13, 2.0, 4.0, 3.0, 7.0], [33, -3.0, -4.0, -2.0, -4.0], [30, 3.0, 0.0, 3.0, 1.0], [34, 1.0, 3.0, 4.0, 6.0], [1, -1.0, -3.0, 1.0, -3.0], [12, 1.0, 3.0, 3.0, 4.0]], [33, 12, 38, 1]], [[[6, 38], [12, 13], [12, 34], [25, 38]], 26]]]]
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[[[18, 18], [37, 37]], 3][[], 1]Failed
case 1[[[3, 3], [8, 8], [27, 27]], 6][[], 3]Failed
case 2[[[6, 6], [6, 27], [24, 27], [27, 27]], 5][[[6, 27], [24, 27]], 3]Failed
case 3[[[6, 6]], 6][[], 5]Failed
case 4[[[4, 4], [7, 7], [17, 17], [29, 29]], 10][[], 6]Failed
case 5[[[13, 13], [33, 33]], 9][[], 7]Failed
case 6[[[7, 7], [12, 12], [12, 37], [12, 39], [13, 13]], 12][[[12, 37], [12, 39]], 9]Failed
case 7[[[10, 10], [13, 13], [14, 14], [21, 27], [26, 27], [27, 27]], 18][[[21, 27], [26, 27]], 14]Failed

SHA-256 / 24c88b2a6eabb94903a4e4a91c9a6fa53597e059af6ae2986beb0050d6c88897

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(proxies, moved):
    box = {p[0]: p for p in proxies}
    mv = set(moved)
    seen = set()
    raw = []
    tests = 0
    for q in moved:
        if q in seen:
            continue
        seen.add(q)
        a = box[q]
        for p in proxies:
            if p[0] in mv and p[0] > q:
                continue
            tests += 1
            if p[0] != q and a[1] <= p[3] and p[1] <= a[3] and a[2] <= p[4] and p[2] <= a[4]:
                raw.append((min(q, p[0]), max(q, p[0])))
    pairs = sorted(set(raw))
    return [[list(x) for x in pairs], tests]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[37, -5.0, 4.0, -4.0, 6.0], [18, 5.0, -2.0, 6.0, -1.0]], [37, 18]], [[], 1]], [[[[8, -2.0, 3.0, 0.0, 6.0], [27, 1.0, 0.0, 4.0, 0.0], [3, -5.0, 0.0, -3.0, 2.0]], [3, 27, 8, 3]], [[], 3]], [[[[24, 1.0, 2.0, 4.0, 4.0], [6, -2.0, 0.0, 0.0, 3.0], [27, -2.0, 0.0, 1.0, 2.0]], [6, 6, 27, 6]], [[[6, 27], [24, 27]], 3]], [[[[22, 2.0, -5.0, 4.0, -3.0], [21, -2.0, 4.0, 0.0, 7.0], [3, 4.0, -4.0, 6.0, -3.0], [6, -3.0, 0.0, -3.0, 3.0], [2, 5.0, 4.0, 8.0, 6.0], [38, -2.0, -2.0, -2.0, -2.0]], [6, 6]], [[], 5]], [[[[29, -5.0, 2.0, -4.0, 2.0], [4, 0.0, -3.0, 3.0, -1.0], [17, 1.0, -5.0, 1.0, -4.0], [7, 4.0, 3.0, 7.0, 6.0]], [7, 29, 17, 4, 4]], [[], 6]], [[[[21, 0.0, -4.0, 3.0, -4.0], [33, 4.0, 0.0, 7.0, 2.0], [30, -5.0, -2.0, -4.0, 0.0], [13, 3.0, 4.0, 5.0, 6.0], [3, -5.0, 0.0, -3.0, 0.0]], [33, 33, 13]], [[], 7]], [[[[37, -2.0, -1.0, 1.0, -1.0], [7, 1.0, 1.0, 4.0, 4.0], [13, -4.0, 2.0, -3.0, 3.0], [12, -2.0, -4.0, -2.0, -1.0], [39, -3.0, -3.0, 0.0, 0.0]], [13, 13, 7, 12]], [[[12, 37], [12, 39]], 9]], [[[[13, 4.0, -5.0, 5.0, -3.0], [21, -2.0, 1.0, -2.0, 3.0], [14, 2.0, 0.0, 2.0, 1.0], [10, -1.0, 3.0, 1.0, 6.0], [27, -4.0, 3.0, -2.0, 3.0], [26, -4.0, 0.0, -2.0, 3.0]], [27, 13, 14, 10]], [[[21, 27], [26, 27]], 14]]], [[[[[28, 5.0, -2.0, 6.0, 0.0], [11, 5.0, -3.0, 5.0, -3.0], [10, -3.0, -4.0, -3.0, -2.0], [32, -4.0, 3.0, -4.0, 3.0]], [32]], [[], 3]], [[[[6, 4.0, 2.0, 5.0, 5.0], [28, -5.0, -2.0, -5.0, 1.0], [29, -1.0, 4.0, 1.0, 5.0], [13, 1.0, -1.0, 2.0, 1.0]], [28]], [[], 3]], [[[[26, -4.0, 4.0, -3.0, 6.0], [2, -1.0, -4.0, 0.0, -1.0]], [26]], [[], 1]], [[[[37, -4.0, 3.0, -1.0, 4.0], [20, 1.0, 0.0, 4.0, 3.0], [31, 5.0, -3.0, 7.0, -3.0], [12, 5.0, -5.0, 7.0, -2.0]], [12]], [[[12, 31]], 3]], [[[[38, -1.0, -4.0, -1.0, -1.0], [20, 2.0, -3.0, 3.0, -2.0], [32, 0.0, 2.0, 2.0, 5.0], [27, -3.0, -3.0, -3.0, 0.0], [18, 4.0, 0.0, 7.0, 2.0], [12, -4.0, 0.0, -4.0, 0.0]], [38, 12, 32, 27]], [[], 14]], [[[[22, -5.0, -3.0, -4.0, -1.0], [3, -5.0, 4.0, -4.0, 6.0], [11, 0.0, -2.0, 3.0, 0.0], [23, 5.0, 3.0, 5.0, 4.0]], [3, 3, 22]], [[], 5]], [[[[37, 3.0, 0.0, 3.0, 1.0], [1, 1.0, -4.0, 2.0, -2.0]], [37, 37, 1, 37]], [[], 1]], [[[[12, 4.0, 0.0, 4.0, 2.0], [29, 3.0, -4.0, 5.0, -3.0], [11, 3.0, 3.0, 5.0, 4.0], [28, 2.0, 2.0, 5.0, 5.0]], [29]], [[], 3]]], [[[[[10, -5.0, 4.0, -4.0, 7.0], [32, 2.0, 5.0, 4.0, 8.0], [31, 5.0, 2.0, 5.0, 4.0], [18, -4.0, 0.0, -1.0, 3.0], [30, -3.0, -1.0, -1.0, 1.0], [2, -5.0, 5.0, -4.0, 7.0]], [2, 2, 18, 2, 2]], [[[2, 10], [18, 30]], 9]], [[[[17, 3.0, 5.0, 4.0, 7.0], [12, 0.0, 1.0, 1.0, 3.0], [31, -4.0, 2.0, -2.0, 4.0], [21, -2.0, 4.0, 1.0, 6.0], [11, -5.0, -2.0, -5.0, 0.0], [4, 4.0, 5.0, 7.0, 8.0], [25, -3.0, -2.0, -3.0, -1.0], [13, -3.0, 5.0, 0.0, 8.0]], [13, 4, 17, 25, 4]], [[[4, 17], [13, 21]], 22]], [[[[16, -5.0, -2.0, -3.0, -2.0], [21, 1.0, -2.0, 3.0, -1.0], [22, 3.0, 2.0, 5.0, 2.0], [37, -2.0, -1.0, 1.0, 1.0]], [37, 16, 22, 37, 16]], [[[21, 37]], 6]], [[[[28, -2.0, -4.0, 1.0, -4.0], [6, 4.0, 3.0, 5.0, 3.0], [3, -1.0, 3.0, 2.0, 5.0], [26, 3.0, 0.0, 4.0, 2.0], [21, -5.0, -3.0, -2.0, -3.0], [22, -5.0, -3.0, -2.0, -2.0], [36, -3.0, -1.0, -2.0, 2.0]], [3, 28, 6, 21, 21]], [[[21, 22]], 18]], [[[[38, 0.0, 1.0, 2.0, 4.0], [9, 0.0, 1.0, 2.0, 4.0], [15, -2.0, -4.0, -1.0, -4.0], [2, 5.0, 1.0, 6.0, 3.0], [21, 3.0, -1.0, 5.0, 0.0], [16, 0.0, 1.0, 3.0, 1.0]], [9, 15, 16]], [[[9, 16], [9, 38], [16, 38]], 12]], [[[[14, -4.0, -4.0, -1.0, -2.0], [9, 5.0, -1.0, 7.0, 1.0], [15, -3.0, 4.0, -1.0, 6.0]], [14, 9]], [[], 3]], [[[[10, -2.0, 3.0, -2.0, 3.0], [21, 4.0, 1.0, 7.0, 1.0], [25, 3.0, 1.0, 4.0, 2.0]], [10, 21, 21]], [[[21, 25]], 3]], [[[[20, -5.0, 1.0, -3.0, 2.0], [7, 1.0, 0.0, 2.0, 1.0], [8, 1.0, -3.0, 2.0, -1.0], [3, -4.0, -1.0, -4.0, 2.0], [19, 2.0, -4.0, 3.0, -2.0], [32, 1.0, 0.0, 3.0, 3.0], [35, -2.0, -1.0, 1.0, 0.0], [18, -5.0, -2.0, -4.0, -1.0]], [32]], [[[7, 32], [32, 35]], 7]]], [[[[[27, 2.0, -1.0, 5.0, 1.0], [22, -1.0, -1.0, 0.0, 1.0], [17, 2.0, -1.0, 4.0, 2.0], [32, 1.0, -2.0, 3.0, 0.0]], [17]], [[[17, 27], [17, 32]], 3]], [[[[20, -4.0, -1.0, -1.0, 1.0], [38, 0.0, 0.0, 0.0, 1.0], [21, -2.0, 2.0, -1.0, 3.0], [32, -4.0, -4.0, -4.0, -1.0]], [38, 21, 20]], [[[20, 32]], 6]], [[[[33, 1.0, -5.0, 4.0, -2.0], [19, -1.0, 5.0, 2.0, 8.0]], [19]], [[], 1]], [[[[33, 5.0, -5.0, 6.0, -4.0], [22, -1.0, 4.0, 0.0, 5.0]], [33, 22, 33]], [[], 1]], [[[[32, -5.0, -1.0, -3.0, 2.0], [26, 1.0, 5.0, 2.0, 7.0], [18, -4.0, 2.0, -3.0, 4.0], [5, 1.0, 1.0, 2.0, 1.0], [11, -2.0, 4.0, 1.0, 5.0], [4, 3.0, -4.0, 4.0, -4.0], [37, -4.0, 5.0, -1.0, 7.0]], [18]], [[[18, 32]], 6]], [[[[17, 1.0, 4.0, 1.0, 5.0], [5, -4.0, 5.0, -3.0, 5.0], [15, -5.0, -5.0, -3.0, -3.0], [7, -3.0, -4.0, -3.0, -2.0], [23, -3.0, 1.0, -1.0, 2.0], [26, -1.0, -3.0, 0.0, 0.0], [4, 3.0, 2.0, 4.0, 2.0]], [7, 23]], [[[7, 15]], 11]], [[[[24, 1.0, 3.0, 2.0, 6.0], [11, -5.0, 0.0, -5.0, 3.0]], [11, 24, 11, 24, 11]], [[], 1]], [[[[16, 1.0, -4.0, 4.0, -1.0], [5, 5.0, 0.0, 7.0, 3.0], [38, 0.0, -5.0, 3.0, -2.0], [32, 4.0, -3.0, 6.0, -1.0], [14, -5.0, 5.0, -4.0, 7.0], [13, 1.0, 4.0, 2.0, 5.0], [27, 0.0, -5.0, 3.0, -4.0], [28, 0.0, 2.0, 2.0, 4.0], [7, -3.0, -1.0, -3.0, 1.0], [4, 4.0, -1.0, 4.0, 0.0]], [14]], [[], 9]]], [[[[[24, -5.0, 0.0, -4.0, 1.0], [10, 1.0, 5.0, 4.0, 5.0], [21, -1.0, -4.0, 2.0, -2.0], [28, -4.0, 0.0, -1.0, 2.0], [6, -1.0, 0.0, -1.0, 3.0], [12, 1.0, 5.0, 1.0, 7.0], [19, 3.0, 4.0, 5.0, 7.0]], [24]], [[[24, 28]], 6]], [[[[19, 4.0, 2.0, 5.0, 4.0], [3, -5.0, 0.0, -3.0, 2.0], [7, 1.0, -5.0, 3.0, -5.0], [20, -3.0, -4.0, 0.0, -4.0], [31, 2.0, -4.0, 2.0, -2.0], [29, -2.0, -2.0, 0.0, -2.0], [27, 3.0, -4.0, 4.0, -2.0], [28, 1.0, 2.0, 1.0, 4.0]], [3, 27, 28, 3, 28]], [[], 18]], [[[[37, 3.0, 0.0, 4.0, 1.0], [14, 2.0, -2.0, 2.0, 0.0], [11, 3.0, -2.0, 3.0, -2.0], [12, 2.0, -5.0, 4.0, -4.0], [36, 4.0, 4.0, 6.0, 7.0], [38, 3.0, 5.0, 5.0, 8.0], [33, -4.0, -4.0, -4.0, -1.0], [6, -5.0, -1.0, -3.0, 2.0]], [11]], [[], 7]], [[[[24, 4.0, -1.0, 7.0, 0.0], [22, 2.0, -2.0, 4.0, -2.0], [15, 5.0, -1.0, 5.0, 1.0], [38, 2.0, 1.0, 4.0, 4.0], [19, 0.0, -3.0, 1.0, -3.0], [17, 1.0, -3.0, 3.0, -3.0], [27, 3.0, 2.0, 3.0, 2.0]], [22]], [[], 6]], [[[[21, -2.0, -5.0, 1.0, -5.0], [31, 1.0, -1.0, 3.0, 2.0], [30, 3.0, 0.0, 4.0, 3.0], [22, -4.0, 4.0, -2.0, 6.0], [6, -5.0, 5.0, -5.0, 7.0], [8, 3.0, -5.0, 3.0, -4.0], [29, 2.0, -4.0, 2.0, -3.0]], [8, 30, 6, 29]], [[[30, 31]], 18]], [[[[3, -5.0, -5.0, -2.0, -2.0], [11, 2.0, -1.0, 5.0, -1.0]], [3, 11, 3, 11]], [[], 1]], [[[[27, 5.0, 2.0, 8.0, 4.0], [6, -4.0, 2.0, -3.0, 4.0], [20, -1.0, -1.0, 0.0, -1.0], [24, 3.0, -1.0, 4.0, 2.0], [22, -2.0, -1.0, 1.0, 2.0], [4, -2.0, -2.0, -1.0, 1.0], [11, -1.0, 0.0, 1.0, 2.0], [39, -1.0, -4.0, 1.0, -1.0], [28, 1.0, -5.0, 4.0, -3.0]], [11, 11, 20, 24, 39]], [[[4, 11], [4, 20], [4, 39], [11, 22], [20, 22], [20, 39], [22, 39], [28, 39]], 26]], [[[[38, 5.0, -2.0, 7.0, 0.0], [25, 4.0, -4.0, 7.0, -2.0], [6, 5.0, -1.0, 7.0, -1.0], [13, 2.0, 4.0, 3.0, 7.0], [33, -3.0, -4.0, -2.0, -4.0], [30, 3.0, 0.0, 3.0, 1.0], [34, 1.0, 3.0, 4.0, 6.0], [1, -1.0, -3.0, 1.0, -3.0], [12, 1.0, 3.0, 3.0, 4.0]], [33, 12, 38, 1]], [[[6, 38], [12, 13], [12, 34], [25, 38]], 26]]]]
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[[], 3][[], 1]Failed
case 1[[], 6][[], 3]Failed
case 2[[[6, 27], [24, 27]], 5][[[6, 27], [24, 27]], 3]Failed
case 3[[], 6][[], 5]Failed
case 4[[], 10][[], 6]Failed
case 5[[], 9][[], 7]Failed
case 6[[[12, 37], [12, 39]], 12][[[12, 37], [12, 39]], 9]Failed
case 7[[[21, 27], [26, 27]], 18][[[21, 27], [26, 27]], 14]Failed

SHA-256 / 6ced506fcd9ca761b905c77dda26c4d39b9dacc868eaed78efba6b6312daf9fd

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(proxies, moved):
    box = {p[0]: p for p in proxies}
    mv = set(moved)
    seen = set()
    raw = []
    tests = 0
    for q in moved:
        if q in seen:
            continue
        seen.add(q)
        a = box[q]
        for p in proxies:
            if p[0] == q:
                continue
            if p[0] in mv and p[0] > q:
                continue
            tests += 1
            if a[1] <= p[3] and p[1] <= a[3] and a[2] <= p[4] and p[2] <= a[4]:
                raw.append((min(q, p[0]), max(q, p[0])))
    pairs = sorted(set(raw))
    return [[list(x) for x in pairs], tests]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[37, -5.0, 4.0, -4.0, 6.0], [18, 5.0, -2.0, 6.0, -1.0]], [37, 18]], [[], 1]], [[[[8, -2.0, 3.0, 0.0, 6.0], [27, 1.0, 0.0, 4.0, 0.0], [3, -5.0, 0.0, -3.0, 2.0]], [3, 27, 8, 3]], [[], 3]], [[[[24, 1.0, 2.0, 4.0, 4.0], [6, -2.0, 0.0, 0.0, 3.0], [27, -2.0, 0.0, 1.0, 2.0]], [6, 6, 27, 6]], [[[6, 27], [24, 27]], 3]], [[[[22, 2.0, -5.0, 4.0, -3.0], [21, -2.0, 4.0, 0.0, 7.0], [3, 4.0, -4.0, 6.0, -3.0], [6, -3.0, 0.0, -3.0, 3.0], [2, 5.0, 4.0, 8.0, 6.0], [38, -2.0, -2.0, -2.0, -2.0]], [6, 6]], [[], 5]], [[[[29, -5.0, 2.0, -4.0, 2.0], [4, 0.0, -3.0, 3.0, -1.0], [17, 1.0, -5.0, 1.0, -4.0], [7, 4.0, 3.0, 7.0, 6.0]], [7, 29, 17, 4, 4]], [[], 6]], [[[[21, 0.0, -4.0, 3.0, -4.0], [33, 4.0, 0.0, 7.0, 2.0], [30, -5.0, -2.0, -4.0, 0.0], [13, 3.0, 4.0, 5.0, 6.0], [3, -5.0, 0.0, -3.0, 0.0]], [33, 33, 13]], [[], 7]], [[[[37, -2.0, -1.0, 1.0, -1.0], [7, 1.0, 1.0, 4.0, 4.0], [13, -4.0, 2.0, -3.0, 3.0], [12, -2.0, -4.0, -2.0, -1.0], [39, -3.0, -3.0, 0.0, 0.0]], [13, 13, 7, 12]], [[[12, 37], [12, 39]], 9]], [[[[13, 4.0, -5.0, 5.0, -3.0], [21, -2.0, 1.0, -2.0, 3.0], [14, 2.0, 0.0, 2.0, 1.0], [10, -1.0, 3.0, 1.0, 6.0], [27, -4.0, 3.0, -2.0, 3.0], [26, -4.0, 0.0, -2.0, 3.0]], [27, 13, 14, 10]], [[[21, 27], [26, 27]], 14]]], [[[[[28, 5.0, -2.0, 6.0, 0.0], [11, 5.0, -3.0, 5.0, -3.0], [10, -3.0, -4.0, -3.0, -2.0], [32, -4.0, 3.0, -4.0, 3.0]], [32]], [[], 3]], [[[[6, 4.0, 2.0, 5.0, 5.0], [28, -5.0, -2.0, -5.0, 1.0], [29, -1.0, 4.0, 1.0, 5.0], [13, 1.0, -1.0, 2.0, 1.0]], [28]], [[], 3]], [[[[26, -4.0, 4.0, -3.0, 6.0], [2, -1.0, -4.0, 0.0, -1.0]], [26]], [[], 1]], [[[[37, -4.0, 3.0, -1.0, 4.0], [20, 1.0, 0.0, 4.0, 3.0], [31, 5.0, -3.0, 7.0, -3.0], [12, 5.0, -5.0, 7.0, -2.0]], [12]], [[[12, 31]], 3]], [[[[38, -1.0, -4.0, -1.0, -1.0], [20, 2.0, -3.0, 3.0, -2.0], [32, 0.0, 2.0, 2.0, 5.0], [27, -3.0, -3.0, -3.0, 0.0], [18, 4.0, 0.0, 7.0, 2.0], [12, -4.0, 0.0, -4.0, 0.0]], [38, 12, 32, 27]], [[], 14]], [[[[22, -5.0, -3.0, -4.0, -1.0], [3, -5.0, 4.0, -4.0, 6.0], [11, 0.0, -2.0, 3.0, 0.0], [23, 5.0, 3.0, 5.0, 4.0]], [3, 3, 22]], [[], 5]], [[[[37, 3.0, 0.0, 3.0, 1.0], [1, 1.0, -4.0, 2.0, -2.0]], [37, 37, 1, 37]], [[], 1]], [[[[12, 4.0, 0.0, 4.0, 2.0], [29, 3.0, -4.0, 5.0, -3.0], [11, 3.0, 3.0, 5.0, 4.0], [28, 2.0, 2.0, 5.0, 5.0]], [29]], [[], 3]]], [[[[[10, -5.0, 4.0, -4.0, 7.0], [32, 2.0, 5.0, 4.0, 8.0], [31, 5.0, 2.0, 5.0, 4.0], [18, -4.0, 0.0, -1.0, 3.0], [30, -3.0, -1.0, -1.0, 1.0], [2, -5.0, 5.0, -4.0, 7.0]], [2, 2, 18, 2, 2]], [[[2, 10], [18, 30]], 9]], [[[[17, 3.0, 5.0, 4.0, 7.0], [12, 0.0, 1.0, 1.0, 3.0], [31, -4.0, 2.0, -2.0, 4.0], [21, -2.0, 4.0, 1.0, 6.0], [11, -5.0, -2.0, -5.0, 0.0], [4, 4.0, 5.0, 7.0, 8.0], [25, -3.0, -2.0, -3.0, -1.0], [13, -3.0, 5.0, 0.0, 8.0]], [13, 4, 17, 25, 4]], [[[4, 17], [13, 21]], 22]], [[[[16, -5.0, -2.0, -3.0, -2.0], [21, 1.0, -2.0, 3.0, -1.0], [22, 3.0, 2.0, 5.0, 2.0], [37, -2.0, -1.0, 1.0, 1.0]], [37, 16, 22, 37, 16]], [[[21, 37]], 6]], [[[[28, -2.0, -4.0, 1.0, -4.0], [6, 4.0, 3.0, 5.0, 3.0], [3, -1.0, 3.0, 2.0, 5.0], [26, 3.0, 0.0, 4.0, 2.0], [21, -5.0, -3.0, -2.0, -3.0], [22, -5.0, -3.0, -2.0, -2.0], [36, -3.0, -1.0, -2.0, 2.0]], [3, 28, 6, 21, 21]], [[[21, 22]], 18]], [[[[38, 0.0, 1.0, 2.0, 4.0], [9, 0.0, 1.0, 2.0, 4.0], [15, -2.0, -4.0, -1.0, -4.0], [2, 5.0, 1.0, 6.0, 3.0], [21, 3.0, -1.0, 5.0, 0.0], [16, 0.0, 1.0, 3.0, 1.0]], [9, 15, 16]], [[[9, 16], [9, 38], [16, 38]], 12]], [[[[14, -4.0, -4.0, -1.0, -2.0], [9, 5.0, -1.0, 7.0, 1.0], [15, -3.0, 4.0, -1.0, 6.0]], [14, 9]], [[], 3]], [[[[10, -2.0, 3.0, -2.0, 3.0], [21, 4.0, 1.0, 7.0, 1.0], [25, 3.0, 1.0, 4.0, 2.0]], [10, 21, 21]], [[[21, 25]], 3]], [[[[20, -5.0, 1.0, -3.0, 2.0], [7, 1.0, 0.0, 2.0, 1.0], [8, 1.0, -3.0, 2.0, -1.0], [3, -4.0, -1.0, -4.0, 2.0], [19, 2.0, -4.0, 3.0, -2.0], [32, 1.0, 0.0, 3.0, 3.0], [35, -2.0, -1.0, 1.0, 0.0], [18, -5.0, -2.0, -4.0, -1.0]], [32]], [[[7, 32], [32, 35]], 7]]], [[[[[27, 2.0, -1.0, 5.0, 1.0], [22, -1.0, -1.0, 0.0, 1.0], [17, 2.0, -1.0, 4.0, 2.0], [32, 1.0, -2.0, 3.0, 0.0]], [17]], [[[17, 27], [17, 32]], 3]], [[[[20, -4.0, -1.0, -1.0, 1.0], [38, 0.0, 0.0, 0.0, 1.0], [21, -2.0, 2.0, -1.0, 3.0], [32, -4.0, -4.0, -4.0, -1.0]], [38, 21, 20]], [[[20, 32]], 6]], [[[[33, 1.0, -5.0, 4.0, -2.0], [19, -1.0, 5.0, 2.0, 8.0]], [19]], [[], 1]], [[[[33, 5.0, -5.0, 6.0, -4.0], [22, -1.0, 4.0, 0.0, 5.0]], [33, 22, 33]], [[], 1]], [[[[32, -5.0, -1.0, -3.0, 2.0], [26, 1.0, 5.0, 2.0, 7.0], [18, -4.0, 2.0, -3.0, 4.0], [5, 1.0, 1.0, 2.0, 1.0], [11, -2.0, 4.0, 1.0, 5.0], [4, 3.0, -4.0, 4.0, -4.0], [37, -4.0, 5.0, -1.0, 7.0]], [18]], [[[18, 32]], 6]], [[[[17, 1.0, 4.0, 1.0, 5.0], [5, -4.0, 5.0, -3.0, 5.0], [15, -5.0, -5.0, -3.0, -3.0], [7, -3.0, -4.0, -3.0, -2.0], [23, -3.0, 1.0, -1.0, 2.0], [26, -1.0, -3.0, 0.0, 0.0], [4, 3.0, 2.0, 4.0, 2.0]], [7, 23]], [[[7, 15]], 11]], [[[[24, 1.0, 3.0, 2.0, 6.0], [11, -5.0, 0.0, -5.0, 3.0]], [11, 24, 11, 24, 11]], [[], 1]], [[[[16, 1.0, -4.0, 4.0, -1.0], [5, 5.0, 0.0, 7.0, 3.0], [38, 0.0, -5.0, 3.0, -2.0], [32, 4.0, -3.0, 6.0, -1.0], [14, -5.0, 5.0, -4.0, 7.0], [13, 1.0, 4.0, 2.0, 5.0], [27, 0.0, -5.0, 3.0, -4.0], [28, 0.0, 2.0, 2.0, 4.0], [7, -3.0, -1.0, -3.0, 1.0], [4, 4.0, -1.0, 4.0, 0.0]], [14]], [[], 9]]], [[[[[24, -5.0, 0.0, -4.0, 1.0], [10, 1.0, 5.0, 4.0, 5.0], [21, -1.0, -4.0, 2.0, -2.0], [28, -4.0, 0.0, -1.0, 2.0], [6, -1.0, 0.0, -1.0, 3.0], [12, 1.0, 5.0, 1.0, 7.0], [19, 3.0, 4.0, 5.0, 7.0]], [24]], [[[24, 28]], 6]], [[[[19, 4.0, 2.0, 5.0, 4.0], [3, -5.0, 0.0, -3.0, 2.0], [7, 1.0, -5.0, 3.0, -5.0], [20, -3.0, -4.0, 0.0, -4.0], [31, 2.0, -4.0, 2.0, -2.0], [29, -2.0, -2.0, 0.0, -2.0], [27, 3.0, -4.0, 4.0, -2.0], [28, 1.0, 2.0, 1.0, 4.0]], [3, 27, 28, 3, 28]], [[], 18]], [[[[37, 3.0, 0.0, 4.0, 1.0], [14, 2.0, -2.0, 2.0, 0.0], [11, 3.0, -2.0, 3.0, -2.0], [12, 2.0, -5.0, 4.0, -4.0], [36, 4.0, 4.0, 6.0, 7.0], [38, 3.0, 5.0, 5.0, 8.0], [33, -4.0, -4.0, -4.0, -1.0], [6, -5.0, -1.0, -3.0, 2.0]], [11]], [[], 7]], [[[[24, 4.0, -1.0, 7.0, 0.0], [22, 2.0, -2.0, 4.0, -2.0], [15, 5.0, -1.0, 5.0, 1.0], [38, 2.0, 1.0, 4.0, 4.0], [19, 0.0, -3.0, 1.0, -3.0], [17, 1.0, -3.0, 3.0, -3.0], [27, 3.0, 2.0, 3.0, 2.0]], [22]], [[], 6]], [[[[21, -2.0, -5.0, 1.0, -5.0], [31, 1.0, -1.0, 3.0, 2.0], [30, 3.0, 0.0, 4.0, 3.0], [22, -4.0, 4.0, -2.0, 6.0], [6, -5.0, 5.0, -5.0, 7.0], [8, 3.0, -5.0, 3.0, -4.0], [29, 2.0, -4.0, 2.0, -3.0]], [8, 30, 6, 29]], [[[30, 31]], 18]], [[[[3, -5.0, -5.0, -2.0, -2.0], [11, 2.0, -1.0, 5.0, -1.0]], [3, 11, 3, 11]], [[], 1]], [[[[27, 5.0, 2.0, 8.0, 4.0], [6, -4.0, 2.0, -3.0, 4.0], [20, -1.0, -1.0, 0.0, -1.0], [24, 3.0, -1.0, 4.0, 2.0], [22, -2.0, -1.0, 1.0, 2.0], [4, -2.0, -2.0, -1.0, 1.0], [11, -1.0, 0.0, 1.0, 2.0], [39, -1.0, -4.0, 1.0, -1.0], [28, 1.0, -5.0, 4.0, -3.0]], [11, 11, 20, 24, 39]], [[[4, 11], [4, 20], [4, 39], [11, 22], [20, 22], [20, 39], [22, 39], [28, 39]], 26]], [[[[38, 5.0, -2.0, 7.0, 0.0], [25, 4.0, -4.0, 7.0, -2.0], [6, 5.0, -1.0, 7.0, -1.0], [13, 2.0, 4.0, 3.0, 7.0], [33, -3.0, -4.0, -2.0, -4.0], [30, 3.0, 0.0, 3.0, 1.0], [34, 1.0, 3.0, 4.0, 6.0], [1, -1.0, -3.0, 1.0, -3.0], [12, 1.0, 3.0, 3.0, 4.0]], [33, 12, 38, 1]], [[[6, 38], [12, 13], [12, 34], [25, 38]], 26]]]]
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[[], 1][[], 1]Passed
case 1[[], 3][[], 3]Passed
case 2[[[6, 27], [24, 27]], 3][[[6, 27], [24, 27]], 3]Passed
case 3[[], 5][[], 5]Passed
case 4[[], 6][[], 6]Passed
case 5[[], 7][[], 7]Passed
case 6[[[12, 37], [12, 39]], 9][[[12, 37], [12, 39]], 9]Passed
case 7[[[21, 27], [26, 27]], 14][[[21, 27], [26, 27]], 14]Passed

SHA-256 / 71d8534ec95b4557658cd219ffd216b7797485c3a73ea7869d44b1793f7b1885

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.634837+00:00.

Case digest / dd584e199c6c9d8127e1a10153096b030690887faf517d5343c4f7100b724bb6