FAILURE MAP
← Case archive

FA-87701 / Collision detection broadphase / Open access

Fast-mover test uses speed instead of displacement · case 01

At high frame rates everything is flagged for CCD.

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

ROOT CAUSE

The test measures |vel| rather than |vel*dt|.

VERIFIED REPAIR

Compare the per-step displacement length.

Unsuccessful approach: Dropping the one-half factor flags too few objects.

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 = min(box[2] - box[0], box[3] - box[1])
    fast = math.hypot(vel[0], vel[1]) > 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 = [[[[[4, 2, 6, 2.5], [-2, 3], 0.125, 0.25, [[16, -4, 4, -3, 5], [3, -1, 6, 0, 6]]], [[3.5, 1.75, 6.25, 3.125], True, []]], [[[1, 1, 1.5, 4], [-2, 16], 0.125, 0.25, [[3, 3, 2, 3, 4], [21, 6, 4, 6, 4]]], [[0.5, 0.75, 1.75, 6.25], True, []]], [[[-3, 2, -2, 5], [-2, 3], 0.0625, 0.5, [[21, -4, -7, -4, -5], [3, -1, 7, 0, 7], [8, 2, -3, 2, -1], [5, 7, 0, 9, 1], [14, -4, -4, -4, -2]]], [[-3.625, 1.5, -1.5, 5.6875], False, []]], [[[0, -1, 2, 2], [2, -3], 0.125, 0.0, [[22, -8, 2, -8, 3], [11, -7, -4, -7, -2]]], [[0.0, -1.375, 2.25, 2.0], False, []]], [[[-1, 3, 1, 3.5], [-12, -3], 0.25, 0.0, [[15, -3, -7, -2, -7], [23, 1, -3, 2, -1], [6, -2, 6, -2, 7]]], [[-4.0, 2.25, 1.0, 3.5], True, []]], [[[-3, 3, -2.5, 4], [-2, 3], 0.25, 0.0, [[9, -8, 8, -6, 10], [14, -8, 0, -8, 0]]], [[-3.5, 3.0, -2.5, 4.75], True, []]], [[[-3, 2, -2, 5], [2, 0], 0.125, 0.0, [[17, -8, -8, -8, -7]]], [[-3.0, 2.0, -1.75, 5.0], False, []]], [[[-2, -3, -1.5, -2], [2, 0], 0.25, 0.25, [[3, 3, 2, 4, 4], [2, -8, 2, -6, 4], [14, -8, -4, -8, -2]]], [[-2.25, -3.25, -0.75, -1.75], True, []]]], [[[[-2, 2, 0, 5], [30, 16], 0.125, 0.25, [[11, -1, 8, -1, 9], [1, -6, 3, -5, 4], [15, -1, 2, 1, 4], [20, 2, 4, 2, 5], [14, -4, 3, -3, 4]]], [[-2.25, 1.75, 4.0, 7.25], True, [15, 20]]], [[[1, -3, 3, 0], [8, -3], 0.0625, 0.0, [[27, -7, 7, -7, 8], [5, -3, 0, -2, 2], [21, 2, 2, 2, 3]]], [[1.0, -3.1875, 3.5, 0.0], False, []]], [[[3, 1, 4, 2], [-2, -3], 0.25, 0.25, [[2, -6, -4, -4, -3], [22, -6, 1, -6, 1], [11, 1, 5, 2, 5], [15, -1, -8, 0, -8]]], [[2.25, 0.0, 4.25, 2.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, -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, 4], [0, -3], 0.25, 0.5, [[17, -6, 0, -6, 2], [11, -5, -5, -4, -3]]], [[0.5, -0.25, 3.5, 4.5], False, []]], [[[-3, -3, -1, -2], [-12, 3], 0.0625, 0.5, [[3, -3, -5, -1, -5], [24, -6, -2, -5, -1]]], [[-4.25, -3.5, -0.5, -1.3125], True, []]], [[[-4, -4, -2, -3], [-2, 3], 0.0625, 0.0, [[22, -7, -8, -7, -6], [20, 1, -3, 3, -1]]], [[-4.125, -4.0, -2.0, -2.8125], False, []]]], [[[[-3, -2, -2, -1], [-2, -3], 0.25, 0.5, [[29, -1, -6, 1, -6], [3, -3, -5, -2, -4], [13, -8, 0, -6, 0]]], [[-4.0, -3.25, -1.5, -0.5], True, []]], [[[3, -2, 3.5, -1], [2, 0], 0.125, 0.0, [[7, 3, 4, 3, 6], [18, 0, -1, 2, 0], [23, -3, -8, -1, -8]]], [[3.0, -2.0, 3.75, -1.0], False, []]], [[[1, 0, 1.5, 0.5], [-2, 0], 0.25, 0.0, [[21, 2, 4, 3, 6], [14, 3, 7, 3, 9], [9, 1, 2, 2, 3], [25, 8, 2, 10, 2], [20, -4, -5, -3, -5]]], [[0.5, 0.0, 1.5, 0.5], True, []]], [[[-2, -4, -1.5, -1], [0, 16], 0.0625, 0.25, [[27, 3, 5, 4, 6], [10, 8, 3, 10, 3], [2, -2, 6, -1, 8], [15, -2, 0, 0, 0], [12, 2, -7, 3, -7]]], [[-2.25, -4.25, -1.25, 0.25], True, [15]]], [[[-2, -2, -1, -1.5], [-2, -3], 0.0625, 0.25, [[14, 0, 7, 0, 8], [20, -2, 2, -1, 4]]], [[-2.375, -2.4375, -0.75, -1.25], False, []]], [[[-3, -4, -2, -3], [8, 0], 0.0625, 0.25, [[8, 2, -1, 3, 0], [16, -1, 8, -1, 10]]], [[-3.25, -4.25, -1.25, -2.75], False, []]], [[[-2, 2, -1.5, 5], [0, -3], 0.125, 0.5, [[23, -4, 0, -4, 2], [22, -6, -3, -6, -1], [7, 8, -1, 8, 1], [4, -4, -4, -3, -2]]], [[-2.5, 1.125, -1.0, 5.5], True, []]], [[[-2, 3, -1.5, 6], [30, -3], 0.125, 0.25, [[21, 1, 4, 3, 4], [25, -1, 2, 0, 4], [8, -3, 4, -1, 5], [6, 2, -2, 4, 0], [16, 2, 7, 4, 9]]], [[-2.25, 2.375, 2.5, 6.25], True, [8, 21, 25]]]], [[[[-3, -4, -2, -3], [-2, 3], 0.25, 0.25, [[28, 6, 3, 7, 3], [20, 1, 3, 3, 4], [17, -5, -6, -4, -5]]], [[-3.75, -4.25, -1.75, -2.0], True, []]], [[[4, -1, 5, 0], [0, 3], 0.125, 0.5, [[11, 7, -5, 7, -5], [17, -1, -1, 0, 0], [8, -5, 0, -5, 0]]], [[3.5, -1.5, 5.5, 0.875], False, []]], [[[1, 0, 3, 3], [30, -20], 0.25, 0.0, [[10, -5, -3, -3, -3], [20, -7, -1, -7, 0], [17, -8, -6, -6, -4]]], [[1.0, -5.0, 10.5, 3.0], True, []]], [[[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, []]], [[[-3, -3, -2.5, -2.5], [2, 16], 0.25, 0.25, [[7, -5, 6, -5, 8], [16, -1, 7, 0, 9], [26, 4, 7, 6, 8], [27, 4, 4, 6, 5]]], [[-3.25, -3.25, -1.75, 1.75], True, []]], [[[-4, -2, -2, -1.5], [8, 0], 0.0625, 0.25, [[11, -7, 8, -6, 9], [19, 5, -3, 6, -1], [29, -3, 3, -2, 5], [6, 3, 8, 4, 8], [16, -7, -8, -7, -7]]], [[-4.25, -2.25, -1.25, -1.25], 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]]], [[[2, -4, 3, -1], [30, 0], 0.25, 0.5, [[19, 8, -3, 9, -3], [21, -7, -8, -7, -7], [26, 4, 7, 5, 7], [27, 3, 4, 4, 4]]], [[1.5, -4.5, 11.0, -0.5], True, [19]]]], [[[[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, 0, 4, 1], [-2, 3], 0.0625, 0.0, [[26, 3, 4, 3, 6], [10, -1, -4, 1, -4]]], [[2.875, 0.0, 4.0, 1.1875], False, []]], [[[-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, []]], [[[-4, -3, -3, -2], [2, 3], 0.25, 0.0, [[20, 1, 0, 3, 1], [25, 5, -2, 6, -1], [9, 6, -3, 7, -3], [15, 1, 0, 1, 0], [19, 0, -6, 2, -6]]], [[-4.0, -3.0, -2.5, -1.25], True, []]], [[[-1, 1, -0.5, 2], [0, 0], 0.0625, 0.5, [[27, -3, -8, -2, -8]]], [[-1.5, 0.5, 0.0, 2.5], False, []]], [[[-1, 1, -0.5, 1.5], [-2, 0], 0.25, 0.25, [[20, 6, 5, 6, 7], [13, -5, 6, -5, 8], [12, 0, -2, 2, 0]]], [[-1.75, 0.75, -0.25, 1.75], True, []]], [[[4, 2, 5, 5], [0, 3], 0.125, 0.5, [[15, 7, -4, 9, -3], [4, 6, 8, 8, 8], [9, 2, 1, 2, 2], [19, 2, 6, 3, 8], [24, 5, -2, 6, 0]]], [[3.5, 1.5, 5.5, 5.875], False, []]], [[[-3, 4, -1, 7], [30, 0], 0.0625, 0.5, [[13, -6, -8, -6, -7]]], [[-3.5, 3.5, 1.375, 7.5], True, []]]]]
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.5, 1.75, 6.25, 3.125], True, []][[3.5, 1.75, 6.25, 3.125], True, []]Passed
case 1[[0.5, 0.75, 1.75, 6.25], True, []][[0.5, 0.75, 1.75, 6.25], True, []]Passed
case 2[[-3.625, 1.5, -1.5, 5.6875], True, []][[-3.625, 1.5, -1.5, 5.6875], False, []]Failed
case 3[[0.0, -1.375, 2.25, 2.0], True, []][[0.0, -1.375, 2.25, 2.0], False, []]Failed
case 4[[-4.0, 2.25, 1.0, 3.5], True, []][[-4.0, 2.25, 1.0, 3.5], True, []]Passed
case 5[[-3.5, 3.0, -2.5, 4.75], True, []][[-3.5, 3.0, -2.5, 4.75], True, []]Passed
case 6[[-3.0, 2.0, -1.75, 5.0], True, []][[-3.0, 2.0, -1.75, 5.0], False, []]Failed
case 7[[-2.25, -3.25, -0.75, -1.75], True, []][[-2.25, -3.25, -0.75, -1.75], True, []]Passed

SHA-256 / d7d3d5b1d0ba73eb0eccea5464f361b6ddfe3d2aa998321fad13e793763544c8

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 = math.hypot(vel[0], vel[1]) * dt > 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 = [[[[[4, 2, 6, 2.5], [-2, 3], 0.125, 0.25, [[16, -4, 4, -3, 5], [3, -1, 6, 0, 6]]], [[3.5, 1.75, 6.25, 3.125], True, []]], [[[1, 1, 1.5, 4], [-2, 16], 0.125, 0.25, [[3, 3, 2, 3, 4], [21, 6, 4, 6, 4]]], [[0.5, 0.75, 1.75, 6.25], True, []]], [[[-3, 2, -2, 5], [-2, 3], 0.0625, 0.5, [[21, -4, -7, -4, -5], [3, -1, 7, 0, 7], [8, 2, -3, 2, -1], [5, 7, 0, 9, 1], [14, -4, -4, -4, -2]]], [[-3.625, 1.5, -1.5, 5.6875], False, []]], [[[0, -1, 2, 2], [2, -3], 0.125, 0.0, [[22, -8, 2, -8, 3], [11, -7, -4, -7, -2]]], [[0.0, -1.375, 2.25, 2.0], False, []]], [[[-1, 3, 1, 3.5], [-12, -3], 0.25, 0.0, [[15, -3, -7, -2, -7], [23, 1, -3, 2, -1], [6, -2, 6, -2, 7]]], [[-4.0, 2.25, 1.0, 3.5], True, []]], [[[-3, 3, -2.5, 4], [-2, 3], 0.25, 0.0, [[9, -8, 8, -6, 10], [14, -8, 0, -8, 0]]], [[-3.5, 3.0, -2.5, 4.75], True, []]], [[[-3, 2, -2, 5], [2, 0], 0.125, 0.0, [[17, -8, -8, -8, -7]]], [[-3.0, 2.0, -1.75, 5.0], False, []]], [[[-2, -3, -1.5, -2], [2, 0], 0.25, 0.25, [[3, 3, 2, 4, 4], [2, -8, 2, -6, 4], [14, -8, -4, -8, -2]]], [[-2.25, -3.25, -0.75, -1.75], True, []]]], [[[[-2, 2, 0, 5], [30, 16], 0.125, 0.25, [[11, -1, 8, -1, 9], [1, -6, 3, -5, 4], [15, -1, 2, 1, 4], [20, 2, 4, 2, 5], [14, -4, 3, -3, 4]]], [[-2.25, 1.75, 4.0, 7.25], True, [15, 20]]], [[[1, -3, 3, 0], [8, -3], 0.0625, 0.0, [[27, -7, 7, -7, 8], [5, -3, 0, -2, 2], [21, 2, 2, 2, 3]]], [[1.0, -3.1875, 3.5, 0.0], False, []]], [[[3, 1, 4, 2], [-2, -3], 0.25, 0.25, [[2, -6, -4, -4, -3], [22, -6, 1, -6, 1], [11, 1, 5, 2, 5], [15, -1, -8, 0, -8]]], [[2.25, 0.0, 4.25, 2.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, -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, 4], [0, -3], 0.25, 0.5, [[17, -6, 0, -6, 2], [11, -5, -5, -4, -3]]], [[0.5, -0.25, 3.5, 4.5], False, []]], [[[-3, -3, -1, -2], [-12, 3], 0.0625, 0.5, [[3, -3, -5, -1, -5], [24, -6, -2, -5, -1]]], [[-4.25, -3.5, -0.5, -1.3125], True, []]], [[[-4, -4, -2, -3], [-2, 3], 0.0625, 0.0, [[22, -7, -8, -7, -6], [20, 1, -3, 3, -1]]], [[-4.125, -4.0, -2.0, -2.8125], False, []]]], [[[[-3, -2, -2, -1], [-2, -3], 0.25, 0.5, [[29, -1, -6, 1, -6], [3, -3, -5, -2, -4], [13, -8, 0, -6, 0]]], [[-4.0, -3.25, -1.5, -0.5], True, []]], [[[3, -2, 3.5, -1], [2, 0], 0.125, 0.0, [[7, 3, 4, 3, 6], [18, 0, -1, 2, 0], [23, -3, -8, -1, -8]]], [[3.0, -2.0, 3.75, -1.0], False, []]], [[[1, 0, 1.5, 0.5], [-2, 0], 0.25, 0.0, [[21, 2, 4, 3, 6], [14, 3, 7, 3, 9], [9, 1, 2, 2, 3], [25, 8, 2, 10, 2], [20, -4, -5, -3, -5]]], [[0.5, 0.0, 1.5, 0.5], True, []]], [[[-2, -4, -1.5, -1], [0, 16], 0.0625, 0.25, [[27, 3, 5, 4, 6], [10, 8, 3, 10, 3], [2, -2, 6, -1, 8], [15, -2, 0, 0, 0], [12, 2, -7, 3, -7]]], [[-2.25, -4.25, -1.25, 0.25], True, [15]]], [[[-2, -2, -1, -1.5], [-2, -3], 0.0625, 0.25, [[14, 0, 7, 0, 8], [20, -2, 2, -1, 4]]], [[-2.375, -2.4375, -0.75, -1.25], False, []]], [[[-3, -4, -2, -3], [8, 0], 0.0625, 0.25, [[8, 2, -1, 3, 0], [16, -1, 8, -1, 10]]], [[-3.25, -4.25, -1.25, -2.75], False, []]], [[[-2, 2, -1.5, 5], [0, -3], 0.125, 0.5, [[23, -4, 0, -4, 2], [22, -6, -3, -6, -1], [7, 8, -1, 8, 1], [4, -4, -4, -3, -2]]], [[-2.5, 1.125, -1.0, 5.5], True, []]], [[[-2, 3, -1.5, 6], [30, -3], 0.125, 0.25, [[21, 1, 4, 3, 4], [25, -1, 2, 0, 4], [8, -3, 4, -1, 5], [6, 2, -2, 4, 0], [16, 2, 7, 4, 9]]], [[-2.25, 2.375, 2.5, 6.25], True, [8, 21, 25]]]], [[[[-3, -4, -2, -3], [-2, 3], 0.25, 0.25, [[28, 6, 3, 7, 3], [20, 1, 3, 3, 4], [17, -5, -6, -4, -5]]], [[-3.75, -4.25, -1.75, -2.0], True, []]], [[[4, -1, 5, 0], [0, 3], 0.125, 0.5, [[11, 7, -5, 7, -5], [17, -1, -1, 0, 0], [8, -5, 0, -5, 0]]], [[3.5, -1.5, 5.5, 0.875], False, []]], [[[1, 0, 3, 3], [30, -20], 0.25, 0.0, [[10, -5, -3, -3, -3], [20, -7, -1, -7, 0], [17, -8, -6, -6, -4]]], [[1.0, -5.0, 10.5, 3.0], True, []]], [[[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, []]], [[[-3, -3, -2.5, -2.5], [2, 16], 0.25, 0.25, [[7, -5, 6, -5, 8], [16, -1, 7, 0, 9], [26, 4, 7, 6, 8], [27, 4, 4, 6, 5]]], [[-3.25, -3.25, -1.75, 1.75], True, []]], [[[-4, -2, -2, -1.5], [8, 0], 0.0625, 0.25, [[11, -7, 8, -6, 9], [19, 5, -3, 6, -1], [29, -3, 3, -2, 5], [6, 3, 8, 4, 8], [16, -7, -8, -7, -7]]], [[-4.25, -2.25, -1.25, -1.25], 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]]], [[[2, -4, 3, -1], [30, 0], 0.25, 0.5, [[19, 8, -3, 9, -3], [21, -7, -8, -7, -7], [26, 4, 7, 5, 7], [27, 3, 4, 4, 4]]], [[1.5, -4.5, 11.0, -0.5], True, [19]]]], [[[[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, 0, 4, 1], [-2, 3], 0.0625, 0.0, [[26, 3, 4, 3, 6], [10, -1, -4, 1, -4]]], [[2.875, 0.0, 4.0, 1.1875], False, []]], [[[-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, []]], [[[-4, -3, -3, -2], [2, 3], 0.25, 0.0, [[20, 1, 0, 3, 1], [25, 5, -2, 6, -1], [9, 6, -3, 7, -3], [15, 1, 0, 1, 0], [19, 0, -6, 2, -6]]], [[-4.0, -3.0, -2.5, -1.25], True, []]], [[[-1, 1, -0.5, 2], [0, 0], 0.0625, 0.5, [[27, -3, -8, -2, -8]]], [[-1.5, 0.5, 0.0, 2.5], False, []]], [[[-1, 1, -0.5, 1.5], [-2, 0], 0.25, 0.25, [[20, 6, 5, 6, 7], [13, -5, 6, -5, 8], [12, 0, -2, 2, 0]]], [[-1.75, 0.75, -0.25, 1.75], True, []]], [[[4, 2, 5, 5], [0, 3], 0.125, 0.5, [[15, 7, -4, 9, -3], [4, 6, 8, 8, 8], [9, 2, 1, 2, 2], [19, 2, 6, 3, 8], [24, 5, -2, 6, 0]]], [[3.5, 1.5, 5.5, 5.875], False, []]], [[[-3, 4, -1, 7], [30, 0], 0.0625, 0.5, [[13, -6, -8, -6, -7]]], [[-3.5, 3.5, 1.375, 7.5], True, []]]]]
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.5, 1.75, 6.25, 3.125], False, []][[3.5, 1.75, 6.25, 3.125], True, []]Failed
case 1[[0.5, 0.75, 1.75, 6.25], True, []][[0.5, 0.75, 1.75, 6.25], True, []]Passed
case 2[[-3.625, 1.5, -1.5, 5.6875], False, []][[-3.625, 1.5, -1.5, 5.6875], False, []]Passed
case 3[[0.0, -1.375, 2.25, 2.0], False, []][[0.0, -1.375, 2.25, 2.0], False, []]Passed
case 4[[-4.0, 2.25, 1.0, 3.5], True, []][[-4.0, 2.25, 1.0, 3.5], True, []]Passed
case 5[[-3.5, 3.0, -2.5, 4.75], True, []][[-3.5, 3.0, -2.5, 4.75], True, []]Passed
case 6[[-3.0, 2.0, -1.75, 5.0], False, []][[-3.0, 2.0, -1.75, 5.0], False, []]Passed
case 7[[-2.25, -3.25, -0.75, -1.75], False, []][[-2.25, -3.25, -0.75, -1.75], True, []]Failed

SHA-256 / ab5c453ce2e207bfa3dea5c38f2d7b18183213a3a20e29cc52094642d6b63d86

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 = [[[[[4, 2, 6, 2.5], [-2, 3], 0.125, 0.25, [[16, -4, 4, -3, 5], [3, -1, 6, 0, 6]]], [[3.5, 1.75, 6.25, 3.125], True, []]], [[[1, 1, 1.5, 4], [-2, 16], 0.125, 0.25, [[3, 3, 2, 3, 4], [21, 6, 4, 6, 4]]], [[0.5, 0.75, 1.75, 6.25], True, []]], [[[-3, 2, -2, 5], [-2, 3], 0.0625, 0.5, [[21, -4, -7, -4, -5], [3, -1, 7, 0, 7], [8, 2, -3, 2, -1], [5, 7, 0, 9, 1], [14, -4, -4, -4, -2]]], [[-3.625, 1.5, -1.5, 5.6875], False, []]], [[[0, -1, 2, 2], [2, -3], 0.125, 0.0, [[22, -8, 2, -8, 3], [11, -7, -4, -7, -2]]], [[0.0, -1.375, 2.25, 2.0], False, []]], [[[-1, 3, 1, 3.5], [-12, -3], 0.25, 0.0, [[15, -3, -7, -2, -7], [23, 1, -3, 2, -1], [6, -2, 6, -2, 7]]], [[-4.0, 2.25, 1.0, 3.5], True, []]], [[[-3, 3, -2.5, 4], [-2, 3], 0.25, 0.0, [[9, -8, 8, -6, 10], [14, -8, 0, -8, 0]]], [[-3.5, 3.0, -2.5, 4.75], True, []]], [[[-3, 2, -2, 5], [2, 0], 0.125, 0.0, [[17, -8, -8, -8, -7]]], [[-3.0, 2.0, -1.75, 5.0], False, []]], [[[-2, -3, -1.5, -2], [2, 0], 0.25, 0.25, [[3, 3, 2, 4, 4], [2, -8, 2, -6, 4], [14, -8, -4, -8, -2]]], [[-2.25, -3.25, -0.75, -1.75], True, []]]], [[[[-2, 2, 0, 5], [30, 16], 0.125, 0.25, [[11, -1, 8, -1, 9], [1, -6, 3, -5, 4], [15, -1, 2, 1, 4], [20, 2, 4, 2, 5], [14, -4, 3, -3, 4]]], [[-2.25, 1.75, 4.0, 7.25], True, [15, 20]]], [[[1, -3, 3, 0], [8, -3], 0.0625, 0.0, [[27, -7, 7, -7, 8], [5, -3, 0, -2, 2], [21, 2, 2, 2, 3]]], [[1.0, -3.1875, 3.5, 0.0], False, []]], [[[3, 1, 4, 2], [-2, -3], 0.25, 0.25, [[2, -6, -4, -4, -3], [22, -6, 1, -6, 1], [11, 1, 5, 2, 5], [15, -1, -8, 0, -8]]], [[2.25, 0.0, 4.25, 2.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, -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, 4], [0, -3], 0.25, 0.5, [[17, -6, 0, -6, 2], [11, -5, -5, -4, -3]]], [[0.5, -0.25, 3.5, 4.5], False, []]], [[[-3, -3, -1, -2], [-12, 3], 0.0625, 0.5, [[3, -3, -5, -1, -5], [24, -6, -2, -5, -1]]], [[-4.25, -3.5, -0.5, -1.3125], True, []]], [[[-4, -4, -2, -3], [-2, 3], 0.0625, 0.0, [[22, -7, -8, -7, -6], [20, 1, -3, 3, -1]]], [[-4.125, -4.0, -2.0, -2.8125], False, []]]], [[[[-3, -2, -2, -1], [-2, -3], 0.25, 0.5, [[29, -1, -6, 1, -6], [3, -3, -5, -2, -4], [13, -8, 0, -6, 0]]], [[-4.0, -3.25, -1.5, -0.5], True, []]], [[[3, -2, 3.5, -1], [2, 0], 0.125, 0.0, [[7, 3, 4, 3, 6], [18, 0, -1, 2, 0], [23, -3, -8, -1, -8]]], [[3.0, -2.0, 3.75, -1.0], False, []]], [[[1, 0, 1.5, 0.5], [-2, 0], 0.25, 0.0, [[21, 2, 4, 3, 6], [14, 3, 7, 3, 9], [9, 1, 2, 2, 3], [25, 8, 2, 10, 2], [20, -4, -5, -3, -5]]], [[0.5, 0.0, 1.5, 0.5], True, []]], [[[-2, -4, -1.5, -1], [0, 16], 0.0625, 0.25, [[27, 3, 5, 4, 6], [10, 8, 3, 10, 3], [2, -2, 6, -1, 8], [15, -2, 0, 0, 0], [12, 2, -7, 3, -7]]], [[-2.25, -4.25, -1.25, 0.25], True, [15]]], [[[-2, -2, -1, -1.5], [-2, -3], 0.0625, 0.25, [[14, 0, 7, 0, 8], [20, -2, 2, -1, 4]]], [[-2.375, -2.4375, -0.75, -1.25], False, []]], [[[-3, -4, -2, -3], [8, 0], 0.0625, 0.25, [[8, 2, -1, 3, 0], [16, -1, 8, -1, 10]]], [[-3.25, -4.25, -1.25, -2.75], False, []]], [[[-2, 2, -1.5, 5], [0, -3], 0.125, 0.5, [[23, -4, 0, -4, 2], [22, -6, -3, -6, -1], [7, 8, -1, 8, 1], [4, -4, -4, -3, -2]]], [[-2.5, 1.125, -1.0, 5.5], True, []]], [[[-2, 3, -1.5, 6], [30, -3], 0.125, 0.25, [[21, 1, 4, 3, 4], [25, -1, 2, 0, 4], [8, -3, 4, -1, 5], [6, 2, -2, 4, 0], [16, 2, 7, 4, 9]]], [[-2.25, 2.375, 2.5, 6.25], True, [8, 21, 25]]]], [[[[-3, -4, -2, -3], [-2, 3], 0.25, 0.25, [[28, 6, 3, 7, 3], [20, 1, 3, 3, 4], [17, -5, -6, -4, -5]]], [[-3.75, -4.25, -1.75, -2.0], True, []]], [[[4, -1, 5, 0], [0, 3], 0.125, 0.5, [[11, 7, -5, 7, -5], [17, -1, -1, 0, 0], [8, -5, 0, -5, 0]]], [[3.5, -1.5, 5.5, 0.875], False, []]], [[[1, 0, 3, 3], [30, -20], 0.25, 0.0, [[10, -5, -3, -3, -3], [20, -7, -1, -7, 0], [17, -8, -6, -6, -4]]], [[1.0, -5.0, 10.5, 3.0], True, []]], [[[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, []]], [[[-3, -3, -2.5, -2.5], [2, 16], 0.25, 0.25, [[7, -5, 6, -5, 8], [16, -1, 7, 0, 9], [26, 4, 7, 6, 8], [27, 4, 4, 6, 5]]], [[-3.25, -3.25, -1.75, 1.75], True, []]], [[[-4, -2, -2, -1.5], [8, 0], 0.0625, 0.25, [[11, -7, 8, -6, 9], [19, 5, -3, 6, -1], [29, -3, 3, -2, 5], [6, 3, 8, 4, 8], [16, -7, -8, -7, -7]]], [[-4.25, -2.25, -1.25, -1.25], 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]]], [[[2, -4, 3, -1], [30, 0], 0.25, 0.5, [[19, 8, -3, 9, -3], [21, -7, -8, -7, -7], [26, 4, 7, 5, 7], [27, 3, 4, 4, 4]]], [[1.5, -4.5, 11.0, -0.5], True, [19]]]], [[[[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, 0, 4, 1], [-2, 3], 0.0625, 0.0, [[26, 3, 4, 3, 6], [10, -1, -4, 1, -4]]], [[2.875, 0.0, 4.0, 1.1875], False, []]], [[[-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, []]], [[[-4, -3, -3, -2], [2, 3], 0.25, 0.0, [[20, 1, 0, 3, 1], [25, 5, -2, 6, -1], [9, 6, -3, 7, -3], [15, 1, 0, 1, 0], [19, 0, -6, 2, -6]]], [[-4.0, -3.0, -2.5, -1.25], True, []]], [[[-1, 1, -0.5, 2], [0, 0], 0.0625, 0.5, [[27, -3, -8, -2, -8]]], [[-1.5, 0.5, 0.0, 2.5], False, []]], [[[-1, 1, -0.5, 1.5], [-2, 0], 0.25, 0.25, [[20, 6, 5, 6, 7], [13, -5, 6, -5, 8], [12, 0, -2, 2, 0]]], [[-1.75, 0.75, -0.25, 1.75], True, []]], [[[4, 2, 5, 5], [0, 3], 0.125, 0.5, [[15, 7, -4, 9, -3], [4, 6, 8, 8, 8], [9, 2, 1, 2, 2], [19, 2, 6, 3, 8], [24, 5, -2, 6, 0]]], [[3.5, 1.5, 5.5, 5.875], False, []]], [[[-3, 4, -1, 7], [30, 0], 0.0625, 0.5, [[13, -6, -8, -6, -7]]], [[-3.5, 3.5, 1.375, 7.5], True, []]]]]
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.5, 1.75, 6.25, 3.125], True, []][[3.5, 1.75, 6.25, 3.125], True, []]Passed
case 1[[0.5, 0.75, 1.75, 6.25], True, []][[0.5, 0.75, 1.75, 6.25], True, []]Passed
case 2[[-3.625, 1.5, -1.5, 5.6875], False, []][[-3.625, 1.5, -1.5, 5.6875], False, []]Passed
case 3[[0.0, -1.375, 2.25, 2.0], False, []][[0.0, -1.375, 2.25, 2.0], False, []]Passed
case 4[[-4.0, 2.25, 1.0, 3.5], True, []][[-4.0, 2.25, 1.0, 3.5], True, []]Passed
case 5[[-3.5, 3.0, -2.5, 4.75], True, []][[-3.5, 3.0, -2.5, 4.75], True, []]Passed
case 6[[-3.0, 2.0, -1.75, 5.0], False, []][[-3.0, 2.0, -1.75, 5.0], False, []]Passed
case 7[[-2.25, -3.25, -0.75, -1.75], True, []][[-2.25, -3.25, -0.75, -1.75], True, []]Passed

SHA-256 / e7096208f1170e35b6caa18971ef2354351393170efa7b25eda991ebd36933fe

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

Case digest / d9dbbc51ae6dc7f1effb49c128a7f3ac61676d198c1d0c3e9b3243a9721a6235