FAILURE MAP
← Case archive

FA-87696 / Collision detection broadphase / Open access

Fast-mover test compares with the larger box extent · case 01

Thin fast objects are not flagged and tunnel through walls.

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

ROOT CAUSE

ext uses max instead of min.

VERIFIED REPAIR

Use the smaller extent (thinnest direction).

Unsuccessful approach: A Manhattan displacement overstates diagonal motion.

Case contract

solve(box, vel, dt, margin, others): CCD broadphase bounds. Swept box = union of box at t and t+dt expanded by margin on all sides. fast = displacement length > half the smaller box extent. Return [swept rounded to 6, fast, sorted ids of others ([id,minx,miny,maxx,maxy]) overlapping the swept box with closed intervals].

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(box, vel, dt, margin, others):
    dx, dy = vel[0] * dt, vel[1] * dt
    sw = [min(box[0], box[0] + dx) - margin, min(box[1], box[1] + dy) - margin,
          max(box[2], box[2] + dx) + margin, max(box[3], box[3] + dy) + margin]
    ext = max(box[2] - box[0], box[3] - box[1])
    fast = math.hypot(dx, dy) > 0.5 * ext
    hits = sorted(o[0] for o in others if o[1] <= sw[2] and sw[0] <= o[3] and o[2] <= sw[3] and sw[1] <= o[4])
    return [[round(c, 6) for c in sw], fast, hits]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[-2, -4, -1, -1], [-12, -3], 0.0625, 0.25, [[4, 8, 2, 9, 3]]], [[-3.0, -4.4375, -0.75, -0.75], True, []]], [[[0, 3, 2, 6], [-2, -3], 0.25, 0.25, [[1, 2, 3, 2, 3], [14, -6, 3, -4, 5]]], [[-0.75, 2.0, 2.25, 6.25], False, [1]]], [[[0, 2, 2, 3], [30, 16], 0.0625, 0.0, [[5, 5, 4, 7, 4]]], [[0.0, 2.0, 3.875, 4.0], True, []]], [[[3, 1, 5, 4], [0, 16], 0.125, 0.5, [[29, -7, 2, -5, 3], [22, 2, -4, 3, -4], [7, 5, 2, 7, 3], [19, -3, -6, -1, -6]]], [[2.5, 0.5, 5.5, 6.5], True, [7]]], [[[1, 1, 1.5, 4], [8, 16], 0.25, 0.5, [[15, 3, 0, 5, 2], [18, 4, 8, 4, 8], [28, 8, 4, 9, 4], [19, 0, -3, 1, -2], [16, -5, 7, -5, 8]]], [[0.5, 0.5, 4.0, 8.5], True, [15, 18]]], [[[-2, -1, -1.5, 2], [2, 0], 0.25, 0.0, [[1, -6, 7, -5, 7], [26, 8, 4, 9, 4], [25, 6, -5, 6, -4], [19, 7, 2, 8, 2]]], [[-2.0, -1.0, -1.0, 2.0], True, []]], [[[3, 3, 5, 4], [2, 3], 0.25, 0.5, [[6, 0, -4, 1, -2], [14, -1, 8, 0, 9], [28, 8, -4, 8, -3], [4, -4, 1, -4, 1], [5, -6, -6, -6, -4]]], [[2.5, 2.5, 6.0, 5.25], True, []]], [[[-2, 3, -1.5, 4], [-2, 3], 0.0625, 0.0, [[13, 0, 8, 0, 10], [19, -1, -1, 0, 0], [29, -2, 7, 0, 7], [23, 3, -1, 4, 0], [3, 6, -4, 6, -3]]], [[-2.125, 3.0, -1.5, 4.1875], False, []]]], [[[[2, -1, 4, 0], [0, 16], 0.25, 0.5, [[12, -8, -4, -8, -4], [19, 7, 2, 7, 2], [16, -2, 2, -2, 4]]], [[1.5, -1.5, 4.5, 4.5], True, []]], [[[1, 1, 3, 1.5], [30, 0], 0.125, 0.5, [[22, -6, 3, -5, 5]]], [[0.5, 0.5, 7.25, 2.0], True, []]], [[[-4, 0, -3.5, 3], [-2, 3], 0.125, 0.25, [[4, 8, -3, 10, -3]]], [[-4.5, -0.25, -3.25, 3.625], True, []]], [[[4, -3, 4.5, -2.5], [-2, -20], 0.25, 0.5, [[21, 7, 2, 9, 3], [16, 3, -5, 3, -5], [7, 0, 7, 2, 7], [23, 7, -5, 8, -3]]], [[3.0, -8.5, 5.0, -2.0], True, [16]]], [[[-3, 0, -2.5, 3], [-12, 0], 0.125, 0.25, [[10, 5, -8, 7, -6], [6, -1, 3, 1, 4], [27, -5, -6, -4, -5], [14, -1, 3, 0, 4]]], [[-4.75, -0.25, -2.25, 3.25], True, []]], [[[2, 3, 4, 3.5], [0, 3], 0.25, 0.25, [[25, 5, 7, 5, 7], [20, 7, -1, 9, 1], [24, 2, -8, 4, -8], [28, -3, -7, -3, -7]]], [[1.75, 2.75, 4.25, 4.5], True, []]], [[[2, 0, 3, 1], [2, 3], 0.125, 0.25, [[9, -3, -5, -2, -4]]], [[1.75, -0.25, 3.5, 1.625], False, []]], [[[-3, 4, -1, 5], [-2, -3], 0.0625, 0.0, [[4, 4, 7, 4, 8], [1, 5, 0, 7, 1], [24, -6, -8, -6, -6], [10, -3, -2, -1, -2], [2, 8, -7, 8, -7]]], [[-3.125, 3.8125, -1.0, 5.0], False, []]]], [[[[1, 0, 2, 3], [-2, -3], 0.125, 0.0, [[10, -7, 6, -5, 8], [16, -3, 2, -3, 3], [19, -8, -5, -8, -4], [11, 1, -7, 1, -7]]], [[0.75, -0.375, 2.0, 3.0], False, []]], [[[1, 1, 3, 1.5], [0, 3], 0.125, 0.0, [[15, 7, -8, 7, -7], [16, 3, 8, 3, 8]]], [[1.0, 1.0, 3.0, 1.875], True, []]], [[[-2, 1, 0, 1.5], [-12, 3], 0.125, 0.0, [[9, 4, 1, 5, 2], [11, -8, -8, -7, -7], [7, -8, -5, -7, -4], [8, -2, -7, -1, -5], [15, -7, 3, -7, 3]]], [[-3.5, 1.0, 0.0, 1.875], True, []]], [[[-4, -4, -3.5, -1], [-2, -3], 0.125, 0.0, [[4, 4, -3, 4, -1], [24, -5, 8, -3, 8], [20, 4, -5, 5, -3], [9, 2, 4, 2, 6]]], [[-4.25, -4.375, -3.5, -1.0], True, []]], [[[-2, 0, 0, 1], [-2, 3], 0.125, 0.25, [[20, 5, 2, 6, 3], [18, 8, 4, 8, 5], [22, -4, 7, -4, 7], [26, 3, 2, 3, 4]]], [[-2.5, -0.25, 0.25, 1.625], False, []]], [[[-3, 2, -2.5, 2.5], [0, -20], 0.125, 0.25, [[22, -3, -5, -1, -4], [10, 4, 8, 6, 10], [14, -1, 5, 1, 5], [19, 5, -5, 5, -3], [4, 3, 5, 4, 6]]], [[-3.25, -0.75, -2.25, 2.75], True, []]], [[[-3, -4, -2.5, -3], [-12, -20], 0.0625, 0.5, [[20, 2, 1, 2, 1], [8, -1, 5, -1, 7]]], [[-4.25, -5.75, -2.0, -2.5], True, []]], [[[2, 1, 3, 1.5], [2, 0], 0.25, 0.25, [[26, -6, -8, -6, -6]]], [[1.75, 0.75, 3.75, 1.75], True, []]]], [[[[2, 1, 3, 1.5], [8, -3], 0.0625, 0.5, [[11, -2, 7, -1, 7], [8, -5, 7, -4, 7], [2, 8, -7, 10, -6], [20, 1, -2, 2, -1], [17, -8, -3, -7, -1]]], [[1.5, 0.3125, 4.0, 2.0], True, []]], [[[-4, -1, -3, -0.5], [-12, -3], 0.25, 0.25, [[5, 3, -4, 5, -3], [15, -5, -2, -5, -2], [1, 3, -1, 5, 1]]], [[-7.25, -2.0, -2.75, -0.25], True, [15]]], [[[-2, -1, 0, 0], [-12, 0], 0.0625, 0.25, [[11, 3, -5, 4, -5], [2, -7, 2, -6, 2], [24, 3, 3, 5, 4]]], [[-3.0, -1.25, 0.25, 0.25], True, []]], [[[3, 0, 3.5, 3], [0, 0], 0.25, 0.0, [[4, 1, -4, 3, -3], [6, -7, -1, -5, 0]]], [[3.0, 0.0, 3.5, 3.0], False, []]], [[[3, -1, 3.5, 0], [2, 3], 0.0625, 0.5, [[13, 6, -8, 8, -6], [19, 6, 2, 8, 2]]], [[2.5, -1.5, 4.125, 0.6875], False, []]], [[[1, 1, 3, 1.5], [-2, 3], 0.125, 0.25, [[13, 6, -7, 6, -7], [6, 0, 7, 0, 7], [4, -7, -6, -5, -6], [11, -3, -6, -3, -4], [16, -6, 7, -4, 8]]], [[0.5, 0.75, 3.25, 2.125], True, []]], [[[4, 2, 6, 5], [2, 16], 0.0625, 0.5, [[17, -1, -4, 0, -3], [23, -5, 3, -4, 3], [12, 2, 4, 2, 5], [11, 6, -7, 7, -7]]], [[3.5, 1.5, 6.625, 6.5], True, []]], [[[0, -3, 0.5, -2], [2, 3], 0.0625, 0.25, [[16, 4, -6, 5, -5], [1, 7, -4, 8, -3], [20, 0, -6, 0, -6], [21, 0, -3, 2, -2]]], [[-0.25, -3.25, 0.875, -1.5625], False, [21]]]], [[[[-3, -1, -2.5, 2], [8, 3], 0.125, 0.25, [[13, 0, 4, 0, 4]]], [[-3.25, -1.25, -1.25, 2.625], True, []]], [[[1, 1, 1.5, 4], [0, 3], 0.25, 0.5, [[2, -2, 2, -2, 4], [3, -8, -3, -6, -3], [23, -4, 2, -4, 3]]], [[0.5, 0.5, 2.0, 5.25], True, []]], [[[2, 2, 4, 2.5], [-12, -3], 0.25, 0.25, [[5, -1, -7, -1, -6], [6, 0, 4, 0, 6]]], [[-1.25, 1.0, 4.25, 2.75], True, []]], [[[3, 1, 5, 1.5], [8, -20], 0.0625, 0.25, [[14, -4, -6, -2, -6], [27, 3, 1, 4, 1], [19, -2, 0, 0, 0], [5, -1, 1, 1, 3], [3, -4, 4, -3, 5]]], [[2.75, -0.5, 5.75, 1.75], True, [27]]], [[[3, -3, 4, 0], [-2, 3], 0.125, 0.0, [[27, 4, 3, 6, 5], [8, -3, 0, -2, 2]]], [[2.75, -3.0, 4.0, 0.375], False, []]], [[[0, 3, 0.5, 6], [-2, 16], 0.125, 0.0, [[21, 0, 2, 1, 4], [9, 5, -5, 7, -3], [1, 0, 2, 1, 2]]], [[-0.25, 3.0, 0.5, 8.0], True, [21]]], [[[3, 0, 5, 3], [2, 16], 0.0625, 0.25, [[28, 1, 0, 2, 1]]], [[2.75, -0.25, 5.375, 4.25], True, []]], [[[-3, -3, -2, -2.5], [2, 3], 0.0625, 0.5, [[15, 7, 7, 7, 8], [5, -7, 4, -6, 4], [9, 8, -8, 8, -8]]], [[-3.5, -3.5, -1.375, -1.8125], False, []]]]]
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.0, -4.4375, -0.75, -0.75], False, []][[-3.0, -4.4375, -0.75, -0.75], True, []]Failed
case 1[[-0.75, 2.0, 2.25, 6.25], False, [1]][[-0.75, 2.0, 2.25, 6.25], False, [1]]Passed
case 2[[0.0, 2.0, 3.875, 4.0], True, []][[0.0, 2.0, 3.875, 4.0], True, []]Passed
case 3[[2.5, 0.5, 5.5, 6.5], True, [7]][[2.5, 0.5, 5.5, 6.5], True, [7]]Passed
case 4[[0.5, 0.5, 4.0, 8.5], True, [15, 18]][[0.5, 0.5, 4.0, 8.5], True, [15, 18]]Passed
case 5[[-2.0, -1.0, -1.0, 2.0], False, []][[-2.0, -1.0, -1.0, 2.0], True, []]Failed
case 6[[2.5, 2.5, 6.0, 5.25], False, []][[2.5, 2.5, 6.0, 5.25], True, []]Failed
case 7[[-2.125, 3.0, -1.5, 4.1875], False, []][[-2.125, 3.0, -1.5, 4.1875], False, []]Passed

SHA-256 / 4310c53e8909568f80f0081d2b13c78d96c1535422ea49bce3c74ec3b7c79591

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(box, vel, dt, margin, others):
    dx, dy = vel[0] * dt, vel[1] * dt
    sw = [min(box[0], box[0] + dx) - margin, min(box[1], box[1] + dy) - margin,
          max(box[2], box[2] + dx) + margin, max(box[3], box[3] + dy) + margin]
    ext = min(box[2] - box[0], box[3] - box[1])
    fast = abs(dx) + abs(dy) > 0.5 * ext
    hits = sorted(o[0] for o in others if o[1] <= sw[2] and sw[0] <= o[3] and o[2] <= sw[3] and sw[1] <= o[4])
    return [[round(c, 6) for c in sw], fast, hits]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[-2, -4, -1, -1], [-12, -3], 0.0625, 0.25, [[4, 8, 2, 9, 3]]], [[-3.0, -4.4375, -0.75, -0.75], True, []]], [[[0, 3, 2, 6], [-2, -3], 0.25, 0.25, [[1, 2, 3, 2, 3], [14, -6, 3, -4, 5]]], [[-0.75, 2.0, 2.25, 6.25], False, [1]]], [[[0, 2, 2, 3], [30, 16], 0.0625, 0.0, [[5, 5, 4, 7, 4]]], [[0.0, 2.0, 3.875, 4.0], True, []]], [[[3, 1, 5, 4], [0, 16], 0.125, 0.5, [[29, -7, 2, -5, 3], [22, 2, -4, 3, -4], [7, 5, 2, 7, 3], [19, -3, -6, -1, -6]]], [[2.5, 0.5, 5.5, 6.5], True, [7]]], [[[1, 1, 1.5, 4], [8, 16], 0.25, 0.5, [[15, 3, 0, 5, 2], [18, 4, 8, 4, 8], [28, 8, 4, 9, 4], [19, 0, -3, 1, -2], [16, -5, 7, -5, 8]]], [[0.5, 0.5, 4.0, 8.5], True, [15, 18]]], [[[-2, -1, -1.5, 2], [2, 0], 0.25, 0.0, [[1, -6, 7, -5, 7], [26, 8, 4, 9, 4], [25, 6, -5, 6, -4], [19, 7, 2, 8, 2]]], [[-2.0, -1.0, -1.0, 2.0], True, []]], [[[3, 3, 5, 4], [2, 3], 0.25, 0.5, [[6, 0, -4, 1, -2], [14, -1, 8, 0, 9], [28, 8, -4, 8, -3], [4, -4, 1, -4, 1], [5, -6, -6, -6, -4]]], [[2.5, 2.5, 6.0, 5.25], True, []]], [[[-2, 3, -1.5, 4], [-2, 3], 0.0625, 0.0, [[13, 0, 8, 0, 10], [19, -1, -1, 0, 0], [29, -2, 7, 0, 7], [23, 3, -1, 4, 0], [3, 6, -4, 6, -3]]], [[-2.125, 3.0, -1.5, 4.1875], False, []]]], [[[[2, -1, 4, 0], [0, 16], 0.25, 0.5, [[12, -8, -4, -8, -4], [19, 7, 2, 7, 2], [16, -2, 2, -2, 4]]], [[1.5, -1.5, 4.5, 4.5], True, []]], [[[1, 1, 3, 1.5], [30, 0], 0.125, 0.5, [[22, -6, 3, -5, 5]]], [[0.5, 0.5, 7.25, 2.0], True, []]], [[[-4, 0, -3.5, 3], [-2, 3], 0.125, 0.25, [[4, 8, -3, 10, -3]]], [[-4.5, -0.25, -3.25, 3.625], True, []]], [[[4, -3, 4.5, -2.5], [-2, -20], 0.25, 0.5, [[21, 7, 2, 9, 3], [16, 3, -5, 3, -5], [7, 0, 7, 2, 7], [23, 7, -5, 8, -3]]], [[3.0, -8.5, 5.0, -2.0], True, [16]]], [[[-3, 0, -2.5, 3], [-12, 0], 0.125, 0.25, [[10, 5, -8, 7, -6], [6, -1, 3, 1, 4], [27, -5, -6, -4, -5], [14, -1, 3, 0, 4]]], [[-4.75, -0.25, -2.25, 3.25], True, []]], [[[2, 3, 4, 3.5], [0, 3], 0.25, 0.25, [[25, 5, 7, 5, 7], [20, 7, -1, 9, 1], [24, 2, -8, 4, -8], [28, -3, -7, -3, -7]]], [[1.75, 2.75, 4.25, 4.5], True, []]], [[[2, 0, 3, 1], [2, 3], 0.125, 0.25, [[9, -3, -5, -2, -4]]], [[1.75, -0.25, 3.5, 1.625], False, []]], [[[-3, 4, -1, 5], [-2, -3], 0.0625, 0.0, [[4, 4, 7, 4, 8], [1, 5, 0, 7, 1], [24, -6, -8, -6, -6], [10, -3, -2, -1, -2], [2, 8, -7, 8, -7]]], [[-3.125, 3.8125, -1.0, 5.0], False, []]]], [[[[1, 0, 2, 3], [-2, -3], 0.125, 0.0, [[10, -7, 6, -5, 8], [16, -3, 2, -3, 3], [19, -8, -5, -8, -4], [11, 1, -7, 1, -7]]], [[0.75, -0.375, 2.0, 3.0], False, []]], [[[1, 1, 3, 1.5], [0, 3], 0.125, 0.0, [[15, 7, -8, 7, -7], [16, 3, 8, 3, 8]]], [[1.0, 1.0, 3.0, 1.875], True, []]], [[[-2, 1, 0, 1.5], [-12, 3], 0.125, 0.0, [[9, 4, 1, 5, 2], [11, -8, -8, -7, -7], [7, -8, -5, -7, -4], [8, -2, -7, -1, -5], [15, -7, 3, -7, 3]]], [[-3.5, 1.0, 0.0, 1.875], True, []]], [[[-4, -4, -3.5, -1], [-2, -3], 0.125, 0.0, [[4, 4, -3, 4, -1], [24, -5, 8, -3, 8], [20, 4, -5, 5, -3], [9, 2, 4, 2, 6]]], [[-4.25, -4.375, -3.5, -1.0], True, []]], [[[-2, 0, 0, 1], [-2, 3], 0.125, 0.25, [[20, 5, 2, 6, 3], [18, 8, 4, 8, 5], [22, -4, 7, -4, 7], [26, 3, 2, 3, 4]]], [[-2.5, -0.25, 0.25, 1.625], False, []]], [[[-3, 2, -2.5, 2.5], [0, -20], 0.125, 0.25, [[22, -3, -5, -1, -4], [10, 4, 8, 6, 10], [14, -1, 5, 1, 5], [19, 5, -5, 5, -3], [4, 3, 5, 4, 6]]], [[-3.25, -0.75, -2.25, 2.75], True, []]], [[[-3, -4, -2.5, -3], [-12, -20], 0.0625, 0.5, [[20, 2, 1, 2, 1], [8, -1, 5, -1, 7]]], [[-4.25, -5.75, -2.0, -2.5], True, []]], [[[2, 1, 3, 1.5], [2, 0], 0.25, 0.25, [[26, -6, -8, -6, -6]]], [[1.75, 0.75, 3.75, 1.75], True, []]]], [[[[2, 1, 3, 1.5], [8, -3], 0.0625, 0.5, [[11, -2, 7, -1, 7], [8, -5, 7, -4, 7], [2, 8, -7, 10, -6], [20, 1, -2, 2, -1], [17, -8, -3, -7, -1]]], [[1.5, 0.3125, 4.0, 2.0], True, []]], [[[-4, -1, -3, -0.5], [-12, -3], 0.25, 0.25, [[5, 3, -4, 5, -3], [15, -5, -2, -5, -2], [1, 3, -1, 5, 1]]], [[-7.25, -2.0, -2.75, -0.25], True, [15]]], [[[-2, -1, 0, 0], [-12, 0], 0.0625, 0.25, [[11, 3, -5, 4, -5], [2, -7, 2, -6, 2], [24, 3, 3, 5, 4]]], [[-3.0, -1.25, 0.25, 0.25], True, []]], [[[3, 0, 3.5, 3], [0, 0], 0.25, 0.0, [[4, 1, -4, 3, -3], [6, -7, -1, -5, 0]]], [[3.0, 0.0, 3.5, 3.0], False, []]], [[[3, -1, 3.5, 0], [2, 3], 0.0625, 0.5, [[13, 6, -8, 8, -6], [19, 6, 2, 8, 2]]], [[2.5, -1.5, 4.125, 0.6875], False, []]], [[[1, 1, 3, 1.5], [-2, 3], 0.125, 0.25, [[13, 6, -7, 6, -7], [6, 0, 7, 0, 7], [4, -7, -6, -5, -6], [11, -3, -6, -3, -4], [16, -6, 7, -4, 8]]], [[0.5, 0.75, 3.25, 2.125], True, []]], [[[4, 2, 6, 5], [2, 16], 0.0625, 0.5, [[17, -1, -4, 0, -3], [23, -5, 3, -4, 3], [12, 2, 4, 2, 5], [11, 6, -7, 7, -7]]], [[3.5, 1.5, 6.625, 6.5], True, []]], [[[0, -3, 0.5, -2], [2, 3], 0.0625, 0.25, [[16, 4, -6, 5, -5], [1, 7, -4, 8, -3], [20, 0, -6, 0, -6], [21, 0, -3, 2, -2]]], [[-0.25, -3.25, 0.875, -1.5625], False, [21]]]], [[[[-3, -1, -2.5, 2], [8, 3], 0.125, 0.25, [[13, 0, 4, 0, 4]]], [[-3.25, -1.25, -1.25, 2.625], True, []]], [[[1, 1, 1.5, 4], [0, 3], 0.25, 0.5, [[2, -2, 2, -2, 4], [3, -8, -3, -6, -3], [23, -4, 2, -4, 3]]], [[0.5, 0.5, 2.0, 5.25], True, []]], [[[2, 2, 4, 2.5], [-12, -3], 0.25, 0.25, [[5, -1, -7, -1, -6], [6, 0, 4, 0, 6]]], [[-1.25, 1.0, 4.25, 2.75], True, []]], [[[3, 1, 5, 1.5], [8, -20], 0.0625, 0.25, [[14, -4, -6, -2, -6], [27, 3, 1, 4, 1], [19, -2, 0, 0, 0], [5, -1, 1, 1, 3], [3, -4, 4, -3, 5]]], [[2.75, -0.5, 5.75, 1.75], True, [27]]], [[[3, -3, 4, 0], [-2, 3], 0.125, 0.0, [[27, 4, 3, 6, 5], [8, -3, 0, -2, 2]]], [[2.75, -3.0, 4.0, 0.375], False, []]], [[[0, 3, 0.5, 6], [-2, 16], 0.125, 0.0, [[21, 0, 2, 1, 4], [9, 5, -5, 7, -3], [1, 0, 2, 1, 2]]], [[-0.25, 3.0, 0.5, 8.0], True, [21]]], [[[3, 0, 5, 3], [2, 16], 0.0625, 0.25, [[28, 1, 0, 2, 1]]], [[2.75, -0.25, 5.375, 4.25], True, []]], [[[-3, -3, -2, -2.5], [2, 3], 0.0625, 0.5, [[15, 7, 7, 7, 8], [5, -7, 4, -6, 4], [9, 8, -8, 8, -8]]], [[-3.5, -3.5, -1.375, -1.8125], False, []]]]]
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.0, -4.4375, -0.75, -0.75], True, []][[-3.0, -4.4375, -0.75, -0.75], True, []]Passed
case 1[[-0.75, 2.0, 2.25, 6.25], True, [1]][[-0.75, 2.0, 2.25, 6.25], False, [1]]Failed
case 2[[0.0, 2.0, 3.875, 4.0], True, []][[0.0, 2.0, 3.875, 4.0], True, []]Passed
case 3[[2.5, 0.5, 5.5, 6.5], True, [7]][[2.5, 0.5, 5.5, 6.5], True, [7]]Passed
case 4[[0.5, 0.5, 4.0, 8.5], True, [15, 18]][[0.5, 0.5, 4.0, 8.5], True, [15, 18]]Passed
case 5[[-2.0, -1.0, -1.0, 2.0], True, []][[-2.0, -1.0, -1.0, 2.0], True, []]Passed
case 6[[2.5, 2.5, 6.0, 5.25], True, []][[2.5, 2.5, 6.0, 5.25], True, []]Passed
case 7[[-2.125, 3.0, -1.5, 4.1875], True, []][[-2.125, 3.0, -1.5, 4.1875], False, []]Failed

SHA-256 / 17f949b76e75a28c5b372893e718e82ebb4629651374faecb2c4e30c521fe498

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(box, vel, dt, margin, others):
    dx, dy = vel[0] * dt, vel[1] * dt
    sw = [min(box[0], box[0] + dx) - margin, min(box[1], box[1] + dy) - margin,
          max(box[2], box[2] + dx) + margin, max(box[3], box[3] + dy) + margin]
    ext = min(box[2] - box[0], box[3] - box[1])
    fast = math.hypot(dx, dy) > 0.5 * ext
    hits = sorted(o[0] for o in others if o[1] <= sw[2] and sw[0] <= o[3] and o[2] <= sw[3] and sw[1] <= o[4])
    return [[round(c, 6) for c in sw], fast, hits]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[-2, -4, -1, -1], [-12, -3], 0.0625, 0.25, [[4, 8, 2, 9, 3]]], [[-3.0, -4.4375, -0.75, -0.75], True, []]], [[[0, 3, 2, 6], [-2, -3], 0.25, 0.25, [[1, 2, 3, 2, 3], [14, -6, 3, -4, 5]]], [[-0.75, 2.0, 2.25, 6.25], False, [1]]], [[[0, 2, 2, 3], [30, 16], 0.0625, 0.0, [[5, 5, 4, 7, 4]]], [[0.0, 2.0, 3.875, 4.0], True, []]], [[[3, 1, 5, 4], [0, 16], 0.125, 0.5, [[29, -7, 2, -5, 3], [22, 2, -4, 3, -4], [7, 5, 2, 7, 3], [19, -3, -6, -1, -6]]], [[2.5, 0.5, 5.5, 6.5], True, [7]]], [[[1, 1, 1.5, 4], [8, 16], 0.25, 0.5, [[15, 3, 0, 5, 2], [18, 4, 8, 4, 8], [28, 8, 4, 9, 4], [19, 0, -3, 1, -2], [16, -5, 7, -5, 8]]], [[0.5, 0.5, 4.0, 8.5], True, [15, 18]]], [[[-2, -1, -1.5, 2], [2, 0], 0.25, 0.0, [[1, -6, 7, -5, 7], [26, 8, 4, 9, 4], [25, 6, -5, 6, -4], [19, 7, 2, 8, 2]]], [[-2.0, -1.0, -1.0, 2.0], True, []]], [[[3, 3, 5, 4], [2, 3], 0.25, 0.5, [[6, 0, -4, 1, -2], [14, -1, 8, 0, 9], [28, 8, -4, 8, -3], [4, -4, 1, -4, 1], [5, -6, -6, -6, -4]]], [[2.5, 2.5, 6.0, 5.25], True, []]], [[[-2, 3, -1.5, 4], [-2, 3], 0.0625, 0.0, [[13, 0, 8, 0, 10], [19, -1, -1, 0, 0], [29, -2, 7, 0, 7], [23, 3, -1, 4, 0], [3, 6, -4, 6, -3]]], [[-2.125, 3.0, -1.5, 4.1875], False, []]]], [[[[2, -1, 4, 0], [0, 16], 0.25, 0.5, [[12, -8, -4, -8, -4], [19, 7, 2, 7, 2], [16, -2, 2, -2, 4]]], [[1.5, -1.5, 4.5, 4.5], True, []]], [[[1, 1, 3, 1.5], [30, 0], 0.125, 0.5, [[22, -6, 3, -5, 5]]], [[0.5, 0.5, 7.25, 2.0], True, []]], [[[-4, 0, -3.5, 3], [-2, 3], 0.125, 0.25, [[4, 8, -3, 10, -3]]], [[-4.5, -0.25, -3.25, 3.625], True, []]], [[[4, -3, 4.5, -2.5], [-2, -20], 0.25, 0.5, [[21, 7, 2, 9, 3], [16, 3, -5, 3, -5], [7, 0, 7, 2, 7], [23, 7, -5, 8, -3]]], [[3.0, -8.5, 5.0, -2.0], True, [16]]], [[[-3, 0, -2.5, 3], [-12, 0], 0.125, 0.25, [[10, 5, -8, 7, -6], [6, -1, 3, 1, 4], [27, -5, -6, -4, -5], [14, -1, 3, 0, 4]]], [[-4.75, -0.25, -2.25, 3.25], True, []]], [[[2, 3, 4, 3.5], [0, 3], 0.25, 0.25, [[25, 5, 7, 5, 7], [20, 7, -1, 9, 1], [24, 2, -8, 4, -8], [28, -3, -7, -3, -7]]], [[1.75, 2.75, 4.25, 4.5], True, []]], [[[2, 0, 3, 1], [2, 3], 0.125, 0.25, [[9, -3, -5, -2, -4]]], [[1.75, -0.25, 3.5, 1.625], False, []]], [[[-3, 4, -1, 5], [-2, -3], 0.0625, 0.0, [[4, 4, 7, 4, 8], [1, 5, 0, 7, 1], [24, -6, -8, -6, -6], [10, -3, -2, -1, -2], [2, 8, -7, 8, -7]]], [[-3.125, 3.8125, -1.0, 5.0], False, []]]], [[[[1, 0, 2, 3], [-2, -3], 0.125, 0.0, [[10, -7, 6, -5, 8], [16, -3, 2, -3, 3], [19, -8, -5, -8, -4], [11, 1, -7, 1, -7]]], [[0.75, -0.375, 2.0, 3.0], False, []]], [[[1, 1, 3, 1.5], [0, 3], 0.125, 0.0, [[15, 7, -8, 7, -7], [16, 3, 8, 3, 8]]], [[1.0, 1.0, 3.0, 1.875], True, []]], [[[-2, 1, 0, 1.5], [-12, 3], 0.125, 0.0, [[9, 4, 1, 5, 2], [11, -8, -8, -7, -7], [7, -8, -5, -7, -4], [8, -2, -7, -1, -5], [15, -7, 3, -7, 3]]], [[-3.5, 1.0, 0.0, 1.875], True, []]], [[[-4, -4, -3.5, -1], [-2, -3], 0.125, 0.0, [[4, 4, -3, 4, -1], [24, -5, 8, -3, 8], [20, 4, -5, 5, -3], [9, 2, 4, 2, 6]]], [[-4.25, -4.375, -3.5, -1.0], True, []]], [[[-2, 0, 0, 1], [-2, 3], 0.125, 0.25, [[20, 5, 2, 6, 3], [18, 8, 4, 8, 5], [22, -4, 7, -4, 7], [26, 3, 2, 3, 4]]], [[-2.5, -0.25, 0.25, 1.625], False, []]], [[[-3, 2, -2.5, 2.5], [0, -20], 0.125, 0.25, [[22, -3, -5, -1, -4], [10, 4, 8, 6, 10], [14, -1, 5, 1, 5], [19, 5, -5, 5, -3], [4, 3, 5, 4, 6]]], [[-3.25, -0.75, -2.25, 2.75], True, []]], [[[-3, -4, -2.5, -3], [-12, -20], 0.0625, 0.5, [[20, 2, 1, 2, 1], [8, -1, 5, -1, 7]]], [[-4.25, -5.75, -2.0, -2.5], True, []]], [[[2, 1, 3, 1.5], [2, 0], 0.25, 0.25, [[26, -6, -8, -6, -6]]], [[1.75, 0.75, 3.75, 1.75], True, []]]], [[[[2, 1, 3, 1.5], [8, -3], 0.0625, 0.5, [[11, -2, 7, -1, 7], [8, -5, 7, -4, 7], [2, 8, -7, 10, -6], [20, 1, -2, 2, -1], [17, -8, -3, -7, -1]]], [[1.5, 0.3125, 4.0, 2.0], True, []]], [[[-4, -1, -3, -0.5], [-12, -3], 0.25, 0.25, [[5, 3, -4, 5, -3], [15, -5, -2, -5, -2], [1, 3, -1, 5, 1]]], [[-7.25, -2.0, -2.75, -0.25], True, [15]]], [[[-2, -1, 0, 0], [-12, 0], 0.0625, 0.25, [[11, 3, -5, 4, -5], [2, -7, 2, -6, 2], [24, 3, 3, 5, 4]]], [[-3.0, -1.25, 0.25, 0.25], True, []]], [[[3, 0, 3.5, 3], [0, 0], 0.25, 0.0, [[4, 1, -4, 3, -3], [6, -7, -1, -5, 0]]], [[3.0, 0.0, 3.5, 3.0], False, []]], [[[3, -1, 3.5, 0], [2, 3], 0.0625, 0.5, [[13, 6, -8, 8, -6], [19, 6, 2, 8, 2]]], [[2.5, -1.5, 4.125, 0.6875], False, []]], [[[1, 1, 3, 1.5], [-2, 3], 0.125, 0.25, [[13, 6, -7, 6, -7], [6, 0, 7, 0, 7], [4, -7, -6, -5, -6], [11, -3, -6, -3, -4], [16, -6, 7, -4, 8]]], [[0.5, 0.75, 3.25, 2.125], True, []]], [[[4, 2, 6, 5], [2, 16], 0.0625, 0.5, [[17, -1, -4, 0, -3], [23, -5, 3, -4, 3], [12, 2, 4, 2, 5], [11, 6, -7, 7, -7]]], [[3.5, 1.5, 6.625, 6.5], True, []]], [[[0, -3, 0.5, -2], [2, 3], 0.0625, 0.25, [[16, 4, -6, 5, -5], [1, 7, -4, 8, -3], [20, 0, -6, 0, -6], [21, 0, -3, 2, -2]]], [[-0.25, -3.25, 0.875, -1.5625], False, [21]]]], [[[[-3, -1, -2.5, 2], [8, 3], 0.125, 0.25, [[13, 0, 4, 0, 4]]], [[-3.25, -1.25, -1.25, 2.625], True, []]], [[[1, 1, 1.5, 4], [0, 3], 0.25, 0.5, [[2, -2, 2, -2, 4], [3, -8, -3, -6, -3], [23, -4, 2, -4, 3]]], [[0.5, 0.5, 2.0, 5.25], True, []]], [[[2, 2, 4, 2.5], [-12, -3], 0.25, 0.25, [[5, -1, -7, -1, -6], [6, 0, 4, 0, 6]]], [[-1.25, 1.0, 4.25, 2.75], True, []]], [[[3, 1, 5, 1.5], [8, -20], 0.0625, 0.25, [[14, -4, -6, -2, -6], [27, 3, 1, 4, 1], [19, -2, 0, 0, 0], [5, -1, 1, 1, 3], [3, -4, 4, -3, 5]]], [[2.75, -0.5, 5.75, 1.75], True, [27]]], [[[3, -3, 4, 0], [-2, 3], 0.125, 0.0, [[27, 4, 3, 6, 5], [8, -3, 0, -2, 2]]], [[2.75, -3.0, 4.0, 0.375], False, []]], [[[0, 3, 0.5, 6], [-2, 16], 0.125, 0.0, [[21, 0, 2, 1, 4], [9, 5, -5, 7, -3], [1, 0, 2, 1, 2]]], [[-0.25, 3.0, 0.5, 8.0], True, [21]]], [[[3, 0, 5, 3], [2, 16], 0.0625, 0.25, [[28, 1, 0, 2, 1]]], [[2.75, -0.25, 5.375, 4.25], True, []]], [[[-3, -3, -2, -2.5], [2, 3], 0.0625, 0.5, [[15, 7, 7, 7, 8], [5, -7, 4, -6, 4], [9, 8, -8, 8, -8]]], [[-3.5, -3.5, -1.375, -1.8125], False, []]]]]
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.0, -4.4375, -0.75, -0.75], True, []][[-3.0, -4.4375, -0.75, -0.75], True, []]Passed
case 1[[-0.75, 2.0, 2.25, 6.25], False, [1]][[-0.75, 2.0, 2.25, 6.25], False, [1]]Passed
case 2[[0.0, 2.0, 3.875, 4.0], True, []][[0.0, 2.0, 3.875, 4.0], True, []]Passed
case 3[[2.5, 0.5, 5.5, 6.5], True, [7]][[2.5, 0.5, 5.5, 6.5], True, [7]]Passed
case 4[[0.5, 0.5, 4.0, 8.5], True, [15, 18]][[0.5, 0.5, 4.0, 8.5], True, [15, 18]]Passed
case 5[[-2.0, -1.0, -1.0, 2.0], True, []][[-2.0, -1.0, -1.0, 2.0], True, []]Passed
case 6[[2.5, 2.5, 6.0, 5.25], True, []][[2.5, 2.5, 6.0, 5.25], True, []]Passed
case 7[[-2.125, 3.0, -1.5, 4.1875], False, []][[-2.125, 3.0, -1.5, 4.1875], False, []]Passed

SHA-256 / 3326c2b76e2bd75556fb16c62cdc7f0f74e1adb34aae5f0ed9397ed9a608bb10

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

Case digest / 2f7938886566f92ff56e2609553b3f1001afd3518fdca842518551dc38d4e8fb