FAILURE MAP
← Case archive

FA-87471 / Collision detection broadphase / Open access

Objects straddling the x midline are pushed into the left child · case 01

Queries on the right half miss objects that extend across the midline.

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

ROOT CAUSE

The x classification uses only the min corner instead of rejecting straddlers.

VERIFIED REPAIR

Keep objects that straddle a split line in the parent.

Unsuccessful approach: Classifying straddlers by their centroid still hides them from one side.

Case contract

solve(objs, cap, max_depth, q): quadtree over [0,16]^2. Insert [id,minx,miny,maxx,maxy] in order. A node splits when it holds more than cap objects and depth<max_depth; children are ordered cy*2+cx. An object goes to a child only if it fits entirely: maxx<mid -> left, minx>=mid -> right (same for y); straddlers stay. On split all node objects are re-inserted. Query returns [sorted ids of objects in nodes whose closed bounds overlap q, total node count, max depth].

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(objs, cap, max_depth, q):
    def make(x, y, s, d):
        return {'x': x, 'y': y, 's': s, 'd': d, 'objs': [], 'kids': None}
    def child_index(n, o):
        h = n['s'] / 2
        mx, my = n['x'] + h, n['y'] + h
        cx = 1 if o[1] >= mx else 0
        if o[4] < my:
            cy = 0
        elif o[2] >= my:
            cy = 1
        else:
            return -1
        return cy * 2 + cx
    def split(n):
        h = n['s'] / 2
        n['kids'] = [make(n['x'] + (k % 2) * h, n['y'] + (k // 2) * h, h, n['d'] + 1) for k in range(4)]
        old, n['objs'] = n['objs'], []
        for o in old:
            insert(n, o)
    def insert(n, o):
        if n['kids'] is not None:
            k = child_index(n, o)
            if k >= 0:
                insert(n['kids'][k], o)
                return
        n['objs'].append(o)
        if n['kids'] is None and len(n['objs']) > cap and n['d'] < max_depth:
            split(n)
    root = make(0, 0, 16, 0)
    for o in objs:
        insert(root, o)
    found, count, deep = [], 0, 0
    stack = [root]
    while stack:
        n = stack.pop()
        count += 1
        deep = max(deep, n['d'])
        if n['kids']:
            stack.extend(n['kids'])
        if n['x'] <= q[2] and q[0] <= n['x'] + n['s'] and n['y'] <= q[3] and q[1] <= n['y'] + n['s']:
            found.extend(o[0] for o in n['objs'])
    return [sorted(found), count, deep]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[8, 6, 11, 9, 13], [47, 5, 10, 5, 12], [10, 7, 0, 7, 2], [32, 7, 6, 8, 8], [45, 13, 0, 13, 3], [14, 8, 2, 9, 3]], 2, 1, [3, 5, 4, 5]], [[8, 10, 32], 5, 1]], [[[[2, 13, 0, 16, 1], [21, 1, 6, 1, 6], [5, 5, 8, 8, 8], [39, 10, 6, 11, 9]], 2, 2, [14, 1, 19, 6]], [[2, 5, 39], 5, 1]], [[[[29, 1, 10, 1, 12], [19, 5, 10, 6, 11]], 2, 3, [3, 1, 8, 2]], [[19, 29], 1, 0]], [[[[41, 13, 0, 13, 2], [46, 3, 11, 3, 14], [28, 12, 0, 14, 3], [35, 14, 12, 16, 14], [27, 10, 15, 10, 15], [33, 0, 15, 0, 16]], 2, 3, [12, 14, 16, 16]], [[27, 35], 5, 1]], [[[[31, 11, 9, 12, 9], [29, 6, 3, 7, 5], [11, 14, 7, 14, 7], [16, 0, 7, 0, 9], [33, 15, 11, 16, 11], [4, 12, 0, 13, 3], [20, 12, 14, 13, 16], [49, 7, 6, 8, 7]], 1, 3, [12, 4, 14, 6]], [[4, 11, 16, 49], 13, 2]], [[[[43, 0, 6, 3, 7], [10, 9, 12, 9, 12], [14, 14, 11, 16, 13], [6, 9, 12, 11, 13], [27, 0, 5, 2, 7], [7, 5, 2, 8, 3], [23, 8, 2, 9, 4]], 1, 2, [9, 6, 12, 7]], [[7, 23], 13, 2]], [[[[40, 11, 13, 13, 16], [21, 2, 2, 5, 2], [46, 1, 11, 2, 13], [26, 11, 8, 14, 8], [28, 1, 3, 1, 3], [18, 6, 9, 6, 11], [17, 0, 1, 3, 2]], 3, 1, [9, 9, 12, 13]], [[26, 40], 5, 1]], [[[[8, 4, 3, 5, 5], [30, 7, 3, 8, 5], [26, 10, 12, 13, 14], [37, 7, 5, 10, 8], [47, 1, 9, 4, 10], [42, 5, 8, 5, 9], [36, 15, 14, 16, 16]], 1, 2, [8, 5, 13, 7]], [[8, 30, 37], 13, 2]]], [[[[[9, 5, 5, 7, 5], [31, 6, 15, 6, 15], [41, 14, 11, 14, 12], [19, 9, 4, 11, 6], [30, 14, 13, 16, 15], [39, 7, 5, 10, 7], [37, 0, 1, 2, 2], [3, 8, 9, 8, 10], [20, 6, 15, 6, 16]], 3, 1, [5, 9, 7, 9]], [[20, 31, 39], 5, 1]], [[[[20, 12, 5, 13, 6], [26, 14, 0, 16, 1], [6, 1, 2, 1, 5], [35, 9, 1, 12, 1], [23, 3, 15, 4, 16]], 3, 1, [5, 12, 6, 17]], [[23], 5, 1]], [[[[28, 15, 3, 16, 3], [15, 5, 14, 8, 15], [41, 10, 1, 11, 1], [45, 3, 11, 3, 14], [36, 5, 15, 8, 16], [47, 11, 5, 11, 8], [10, 6, 10, 9, 12], [11, 13, 12, 13, 14], [44, 8, 9, 10, 9]], 2, 3, [8, 12, 9, 13]], [[10, 11, 15, 36, 44, 45, 47], 5, 1]], [[[[24, 5, 10, 5, 11], [3, 13, 1, 16, 3], [22, 6, 7, 9, 8]], 3, 3, [10, 6, 15, 9]], [[3, 22, 24], 1, 0]], [[[[23, 10, 9, 10, 9], [14, 9, 3, 11, 3], [32, 14, 5, 16, 5], [40, 3, 2, 4, 4], [9, 5, 3, 8, 4]], 1, 1, [4, 3, 9, 4]], [[9, 14, 32, 40], 5, 1]], [[[[46, 11, 12, 13, 13], [4, 4, 11, 4, 14], [41, 4, 13, 4, 13], [2, 0, 8, 1, 11], [45, 5, 5, 8, 5], [3, 2, 4, 4, 5], [39, 15, 12, 16, 13], [25, 12, 8, 14, 11]], 1, 2, [0, 0, 5, 1]], [[3, 45], 13, 2]], [[[[23, 0, 12, 3, 13], [25, 7, 0, 9, 0], [18, 8, 9, 9, 9], [37, 3, 7, 5, 9], [21, 15, 5, 15, 5], [17, 11, 12, 12, 14], [3, 9, 10, 12, 11], [29, 0, 5, 0, 8], [40, 2, 4, 2, 7]], 1, 1, [12, 14, 12, 17]], [[3, 17, 18, 25, 29, 37], 5, 1]], [[[[31, 2, 8, 2, 11], [49, 7, 12, 7, 15], [38, 6, 6, 8, 7], [3, 8, 14, 8, 14], [48, 8, 9, 11, 11]], 3, 1, [9, 10, 9, 14]], [[3, 38, 48], 5, 1]]], [[[[[27, 14, 9, 16, 12], [35, 3, 9, 5, 11], [46, 6, 2, 6, 4], [32, 9, 6, 10, 8], [23, 4, 12, 5, 13]], 1, 2, [8, 13, 13, 15]], [[23, 27, 32, 35], 9, 2]], [[[[24, 6, 6, 9, 6], [27, 0, 1, 1, 3], [19, 4, 1, 4, 1]], 2, 2, [7, 8, 7, 10]], [[19, 24, 27], 5, 1]], [[[[17, 1, 13, 1, 15], [4, 12, 5, 14, 8], [42, 0, 3, 1, 5], [1, 15, 3, 16, 3]], 2, 1, [13, 14, 18, 18]], [[4], 5, 1]], [[[[15, 10, 8, 13, 11], [12, 14, 4, 16, 5], [28, 15, 13, 16, 13], [5, 3, 1, 4, 4], [29, 3, 0, 6, 2], [14, 6, 11, 8, 11], [37, 3, 11, 4, 13], [26, 13, 11, 15, 13], [35, 13, 9, 16, 12], [9, 15, 9, 16, 12]], 1, 1, [9, 14, 14, 18]], [[9, 14, 15, 26, 28, 35], 5, 1]], [[[[25, 2, 2, 3, 2], [19, 13, 7, 14, 7], [28, 4, 8, 7, 11], [18, 11, 3, 11, 3]], 2, 1, [11, 12, 14, 17]], [[], 5, 1]], [[[[25, 6, 10, 7, 12], [11, 4, 14, 5, 15], [28, 13, 0, 16, 1], [47, 15, 0, 16, 0], [49, 7, 8, 7, 10], [19, 8, 1, 9, 3], [41, 6, 12, 8, 14], [8, 6, 2, 6, 4]], 2, 3, [11, 9, 11, 13]], [[41], 13, 2]], [[[[27, 0, 2, 3, 3], [21, 0, 12, 2, 14], [38, 0, 2, 2, 5], [2, 0, 5, 3, 5], [31, 10, 9, 10, 12], [20, 10, 2, 11, 5]], 2, 2, [2, 10, 6, 14]], [[21], 9, 2]], [[[[8, 15, 5, 16, 6], [23, 12, 4, 12, 5], [39, 8, 1, 8, 1], [41, 13, 11, 15, 14], [27, 12, 11, 12, 12]], 1, 2, [8, 3, 10, 8]], [[27, 39, 41], 13, 2]]], [[[[[34, 6, 9, 8, 12], [46, 8, 0, 9, 2], [4, 8, 14, 11, 15], [16, 13, 9, 16, 11]], 3, 3, [0, 0, 5, 5]], [[34], 5, 1]], [[[[6, 8, 7, 9, 8], [36, 9, 11, 12, 12], [34, 11, 4, 14, 4], [42, 13, 0, 15, 0], [14, 14, 1, 16, 3], [47, 12, 0, 13, 2], [12, 15, 12, 15, 12], [49, 6, 13, 6, 15], [28, 8, 15, 11, 16], [5, 3, 13, 6, 14]], 2, 3, [7, 0, 11, 2]], [[6, 34], 17, 3]], [[[[32, 9, 4, 12, 4], [8, 9, 7, 12, 8], [24, 11, 10, 13, 13], [26, 8, 14, 10, 16], [40, 12, 5, 14, 6], [34, 9, 3, 11, 4], [45, 10, 0, 12, 3]], 3, 1, [5, 11, 5, 13]], [[8], 5, 1]], [[[[21, 14, 12, 16, 15], [13, 14, 8, 14, 8]], 3, 1, [7, 4, 9, 8]], [[13, 21], 1, 0]], [[[[41, 6, 5, 8, 5], [26, 7, 5, 10, 6], [45, 5, 12, 5, 12], [1, 3, 10, 4, 13], [44, 7, 14, 9, 14]], 1, 1, [8, 9, 8, 14]], [[1, 26, 41, 44, 45], 5, 1]], [[[[38, 4, 13, 5, 13], [4, 11, 10, 12, 13], [11, 3, 8, 6, 10], [3, 4, 10, 4, 12]], 1, 3, [11, 5, 13, 5]], [[], 9, 2]], [[[[41, 6, 14, 8, 14], [46, 5, 5, 8, 8], [44, 1, 1, 2, 3], [18, 0, 8, 1, 11], [30, 4, 5, 7, 6]], 3, 1, [10, 11, 10, 11]], [[41, 46], 5, 1]], [[[[7, 13, 7, 14, 10], [49, 6, 5, 9, 6], [35, 8, 9, 10, 9]], 2, 3, [0, 10, 0, 13]], [[7, 49], 5, 1]]], [[[[[39, 1, 10, 2, 13], [45, 11, 10, 13, 11], [12, 7, 6, 7, 6], [33, 6, 15, 9, 16], [47, 1, 8, 4, 11]], 1, 1, [9, 8, 14, 8]], [[33, 45], 5, 1]], [[[[43, 14, 12, 14, 12], [2, 5, 9, 5, 10], [32, 3, 7, 6, 8], [49, 4, 0, 6, 1], [11, 2, 7, 2, 10]], 1, 1, [6, 14, 11, 19]], [[2, 11, 32, 43], 5, 1]], [[[[8, 0, 11, 1, 11], [4, 5, 0, 8, 3], [26, 13, 14, 13, 14], [32, 1, 6, 2, 8], [16, 15, 6, 16, 9], [27, 8, 0, 8, 1], [24, 8, 0, 9, 0], [47, 3, 6, 6, 8], [46, 11, 7, 12, 8], [21, 5, 4, 8, 6], [6, 11, 10, 12, 13], [49, 9, 13, 9, 16]], 1, 2, [0, 9, 0, 14]], [[4, 8, 16, 21, 32, 46, 47], 13, 2]], [[[[34, 13, 8, 16, 9], [35, 0, 9, 2, 12], [8, 11, 12, 13, 13], [43, 12, 9, 15, 9], [42, 12, 3, 15, 5], [21, 13, 3, 13, 3], [27, 12, 0, 12, 3], [37, 6, 2, 8, 5], [25, 0, 9, 2, 12]], 2, 3, [10, 6, 10, 11]], [[8, 37, 42], 13, 2]], [[[[17, 13, 7, 13, 8], [34, 1, 4, 3, 5], [18, 0, 15, 2, 16], [28, 8, 6, 11, 8], [23, 1, 2, 3, 2], [1, 0, 0, 3, 0], [40, 1, 0, 3, 1], [22, 5, 9, 6, 12], [38, 11, 3, 11, 6], [6, 0, 5, 0, 8]], 1, 2, [13, 0, 14, 4]], [[6, 17, 28, 38], 13, 2]], [[[[41, 10, 13, 10, 13], [4, 5, 13, 5, 14], [36, 10, 15, 12, 16], [35, 5, 5, 7, 6], [47, 9, 4, 10, 5], [27, 10, 14, 13, 14], [13, 8, 8, 10, 10], [15, 6, 14, 8, 14], [11, 11, 3, 13, 4]], 2, 2, [7, 2, 7, 7]], [[15, 35], 9, 2]], [[[[4, 15, 8, 16, 9], [30, 1, 0, 2, 0], [35, 15, 6, 16, 9], [12, 10, 4, 13, 7], [1, 2, 14, 5, 15], [28, 5, 2, 5, 5], [20, 15, 1, 15, 4], [46, 9, 0, 12, 0], [19, 4, 5, 5, 5], [43, 0, 9, 2, 11], [38, 6, 1, 9, 3], [7, 15, 6, 16, 8]], 3, 2, [14, 9, 16, 11]], [[4, 7, 35, 38], 5, 1]], [[[[46, 8, 9, 8, 9], [32, 1, 4, 1, 6], [8, 4, 11, 5, 13], [41, 1, 15, 3, 16], [28, 4, 14, 4, 16], [22, 10, 8, 12, 9], [26, 4, 0, 5, 0], [49, 8, 15, 8, 16], [4, 14, 9, 15, 12]], 3, 2, [14, 1, 16, 1]], [[], 9, 2]]]]
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[[10, 32], 5, 1][[8, 10, 32], 5, 1]Failed
case 1[[2, 39], 5, 1][[2, 5, 39], 5, 1]Failed
case 2[[19, 29], 1, 0][[19, 29], 1, 0]Passed
case 3[[27, 35], 5, 1][[27, 35], 5, 1]Passed
case 4[[4, 11, 16], 17, 2][[4, 11, 16, 49], 13, 2]Failed
case 5[[23], 13, 2][[7, 23], 13, 2]Failed
case 6[[26, 40], 5, 1][[26, 40], 5, 1]Passed
case 7[[8, 30, 37], 17, 2][[8, 30, 37], 13, 2]Failed

SHA-256 / 201efb3e5b232687e5a38fce3302394a50be38d80d5a492886f04337f5b6d8bc

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(objs, cap, max_depth, q):
    def make(x, y, s, d):
        return {'x': x, 'y': y, 's': s, 'd': d, 'objs': [], 'kids': None}
    def child_index(n, o):
        h = n['s'] / 2
        mx, my = n['x'] + h, n['y'] + h
        cx = 1 if (o[1] + o[3]) / 2 >= mx else 0
        if o[4] < my:
            cy = 0
        elif o[2] >= my:
            cy = 1
        else:
            return -1
        return cy * 2 + cx
    def split(n):
        h = n['s'] / 2
        n['kids'] = [make(n['x'] + (k % 2) * h, n['y'] + (k // 2) * h, h, n['d'] + 1) for k in range(4)]
        old, n['objs'] = n['objs'], []
        for o in old:
            insert(n, o)
    def insert(n, o):
        if n['kids'] is not None:
            k = child_index(n, o)
            if k >= 0:
                insert(n['kids'][k], o)
                return
        n['objs'].append(o)
        if n['kids'] is None and len(n['objs']) > cap and n['d'] < max_depth:
            split(n)
    root = make(0, 0, 16, 0)
    for o in objs:
        insert(root, o)
    found, count, deep = [], 0, 0
    stack = [root]
    while stack:
        n = stack.pop()
        count += 1
        deep = max(deep, n['d'])
        if n['kids']:
            stack.extend(n['kids'])
        if n['x'] <= q[2] and q[0] <= n['x'] + n['s'] and n['y'] <= q[3] and q[1] <= n['y'] + n['s']:
            found.extend(o[0] for o in n['objs'])
    return [sorted(found), count, deep]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[8, 6, 11, 9, 13], [47, 5, 10, 5, 12], [10, 7, 0, 7, 2], [32, 7, 6, 8, 8], [45, 13, 0, 13, 3], [14, 8, 2, 9, 3]], 2, 1, [3, 5, 4, 5]], [[8, 10, 32], 5, 1]], [[[[2, 13, 0, 16, 1], [21, 1, 6, 1, 6], [5, 5, 8, 8, 8], [39, 10, 6, 11, 9]], 2, 2, [14, 1, 19, 6]], [[2, 5, 39], 5, 1]], [[[[29, 1, 10, 1, 12], [19, 5, 10, 6, 11]], 2, 3, [3, 1, 8, 2]], [[19, 29], 1, 0]], [[[[41, 13, 0, 13, 2], [46, 3, 11, 3, 14], [28, 12, 0, 14, 3], [35, 14, 12, 16, 14], [27, 10, 15, 10, 15], [33, 0, 15, 0, 16]], 2, 3, [12, 14, 16, 16]], [[27, 35], 5, 1]], [[[[31, 11, 9, 12, 9], [29, 6, 3, 7, 5], [11, 14, 7, 14, 7], [16, 0, 7, 0, 9], [33, 15, 11, 16, 11], [4, 12, 0, 13, 3], [20, 12, 14, 13, 16], [49, 7, 6, 8, 7]], 1, 3, [12, 4, 14, 6]], [[4, 11, 16, 49], 13, 2]], [[[[43, 0, 6, 3, 7], [10, 9, 12, 9, 12], [14, 14, 11, 16, 13], [6, 9, 12, 11, 13], [27, 0, 5, 2, 7], [7, 5, 2, 8, 3], [23, 8, 2, 9, 4]], 1, 2, [9, 6, 12, 7]], [[7, 23], 13, 2]], [[[[40, 11, 13, 13, 16], [21, 2, 2, 5, 2], [46, 1, 11, 2, 13], [26, 11, 8, 14, 8], [28, 1, 3, 1, 3], [18, 6, 9, 6, 11], [17, 0, 1, 3, 2]], 3, 1, [9, 9, 12, 13]], [[26, 40], 5, 1]], [[[[8, 4, 3, 5, 5], [30, 7, 3, 8, 5], [26, 10, 12, 13, 14], [37, 7, 5, 10, 8], [47, 1, 9, 4, 10], [42, 5, 8, 5, 9], [36, 15, 14, 16, 16]], 1, 2, [8, 5, 13, 7]], [[8, 30, 37], 13, 2]]], [[[[[9, 5, 5, 7, 5], [31, 6, 15, 6, 15], [41, 14, 11, 14, 12], [19, 9, 4, 11, 6], [30, 14, 13, 16, 15], [39, 7, 5, 10, 7], [37, 0, 1, 2, 2], [3, 8, 9, 8, 10], [20, 6, 15, 6, 16]], 3, 1, [5, 9, 7, 9]], [[20, 31, 39], 5, 1]], [[[[20, 12, 5, 13, 6], [26, 14, 0, 16, 1], [6, 1, 2, 1, 5], [35, 9, 1, 12, 1], [23, 3, 15, 4, 16]], 3, 1, [5, 12, 6, 17]], [[23], 5, 1]], [[[[28, 15, 3, 16, 3], [15, 5, 14, 8, 15], [41, 10, 1, 11, 1], [45, 3, 11, 3, 14], [36, 5, 15, 8, 16], [47, 11, 5, 11, 8], [10, 6, 10, 9, 12], [11, 13, 12, 13, 14], [44, 8, 9, 10, 9]], 2, 3, [8, 12, 9, 13]], [[10, 11, 15, 36, 44, 45, 47], 5, 1]], [[[[24, 5, 10, 5, 11], [3, 13, 1, 16, 3], [22, 6, 7, 9, 8]], 3, 3, [10, 6, 15, 9]], [[3, 22, 24], 1, 0]], [[[[23, 10, 9, 10, 9], [14, 9, 3, 11, 3], [32, 14, 5, 16, 5], [40, 3, 2, 4, 4], [9, 5, 3, 8, 4]], 1, 1, [4, 3, 9, 4]], [[9, 14, 32, 40], 5, 1]], [[[[46, 11, 12, 13, 13], [4, 4, 11, 4, 14], [41, 4, 13, 4, 13], [2, 0, 8, 1, 11], [45, 5, 5, 8, 5], [3, 2, 4, 4, 5], [39, 15, 12, 16, 13], [25, 12, 8, 14, 11]], 1, 2, [0, 0, 5, 1]], [[3, 45], 13, 2]], [[[[23, 0, 12, 3, 13], [25, 7, 0, 9, 0], [18, 8, 9, 9, 9], [37, 3, 7, 5, 9], [21, 15, 5, 15, 5], [17, 11, 12, 12, 14], [3, 9, 10, 12, 11], [29, 0, 5, 0, 8], [40, 2, 4, 2, 7]], 1, 1, [12, 14, 12, 17]], [[3, 17, 18, 25, 29, 37], 5, 1]], [[[[31, 2, 8, 2, 11], [49, 7, 12, 7, 15], [38, 6, 6, 8, 7], [3, 8, 14, 8, 14], [48, 8, 9, 11, 11]], 3, 1, [9, 10, 9, 14]], [[3, 38, 48], 5, 1]]], [[[[[27, 14, 9, 16, 12], [35, 3, 9, 5, 11], [46, 6, 2, 6, 4], [32, 9, 6, 10, 8], [23, 4, 12, 5, 13]], 1, 2, [8, 13, 13, 15]], [[23, 27, 32, 35], 9, 2]], [[[[24, 6, 6, 9, 6], [27, 0, 1, 1, 3], [19, 4, 1, 4, 1]], 2, 2, [7, 8, 7, 10]], [[19, 24, 27], 5, 1]], [[[[17, 1, 13, 1, 15], [4, 12, 5, 14, 8], [42, 0, 3, 1, 5], [1, 15, 3, 16, 3]], 2, 1, [13, 14, 18, 18]], [[4], 5, 1]], [[[[15, 10, 8, 13, 11], [12, 14, 4, 16, 5], [28, 15, 13, 16, 13], [5, 3, 1, 4, 4], [29, 3, 0, 6, 2], [14, 6, 11, 8, 11], [37, 3, 11, 4, 13], [26, 13, 11, 15, 13], [35, 13, 9, 16, 12], [9, 15, 9, 16, 12]], 1, 1, [9, 14, 14, 18]], [[9, 14, 15, 26, 28, 35], 5, 1]], [[[[25, 2, 2, 3, 2], [19, 13, 7, 14, 7], [28, 4, 8, 7, 11], [18, 11, 3, 11, 3]], 2, 1, [11, 12, 14, 17]], [[], 5, 1]], [[[[25, 6, 10, 7, 12], [11, 4, 14, 5, 15], [28, 13, 0, 16, 1], [47, 15, 0, 16, 0], [49, 7, 8, 7, 10], [19, 8, 1, 9, 3], [41, 6, 12, 8, 14], [8, 6, 2, 6, 4]], 2, 3, [11, 9, 11, 13]], [[41], 13, 2]], [[[[27, 0, 2, 3, 3], [21, 0, 12, 2, 14], [38, 0, 2, 2, 5], [2, 0, 5, 3, 5], [31, 10, 9, 10, 12], [20, 10, 2, 11, 5]], 2, 2, [2, 10, 6, 14]], [[21], 9, 2]], [[[[8, 15, 5, 16, 6], [23, 12, 4, 12, 5], [39, 8, 1, 8, 1], [41, 13, 11, 15, 14], [27, 12, 11, 12, 12]], 1, 2, [8, 3, 10, 8]], [[27, 39, 41], 13, 2]]], [[[[[34, 6, 9, 8, 12], [46, 8, 0, 9, 2], [4, 8, 14, 11, 15], [16, 13, 9, 16, 11]], 3, 3, [0, 0, 5, 5]], [[34], 5, 1]], [[[[6, 8, 7, 9, 8], [36, 9, 11, 12, 12], [34, 11, 4, 14, 4], [42, 13, 0, 15, 0], [14, 14, 1, 16, 3], [47, 12, 0, 13, 2], [12, 15, 12, 15, 12], [49, 6, 13, 6, 15], [28, 8, 15, 11, 16], [5, 3, 13, 6, 14]], 2, 3, [7, 0, 11, 2]], [[6, 34], 17, 3]], [[[[32, 9, 4, 12, 4], [8, 9, 7, 12, 8], [24, 11, 10, 13, 13], [26, 8, 14, 10, 16], [40, 12, 5, 14, 6], [34, 9, 3, 11, 4], [45, 10, 0, 12, 3]], 3, 1, [5, 11, 5, 13]], [[8], 5, 1]], [[[[21, 14, 12, 16, 15], [13, 14, 8, 14, 8]], 3, 1, [7, 4, 9, 8]], [[13, 21], 1, 0]], [[[[41, 6, 5, 8, 5], [26, 7, 5, 10, 6], [45, 5, 12, 5, 12], [1, 3, 10, 4, 13], [44, 7, 14, 9, 14]], 1, 1, [8, 9, 8, 14]], [[1, 26, 41, 44, 45], 5, 1]], [[[[38, 4, 13, 5, 13], [4, 11, 10, 12, 13], [11, 3, 8, 6, 10], [3, 4, 10, 4, 12]], 1, 3, [11, 5, 13, 5]], [[], 9, 2]], [[[[41, 6, 14, 8, 14], [46, 5, 5, 8, 8], [44, 1, 1, 2, 3], [18, 0, 8, 1, 11], [30, 4, 5, 7, 6]], 3, 1, [10, 11, 10, 11]], [[41, 46], 5, 1]], [[[[7, 13, 7, 14, 10], [49, 6, 5, 9, 6], [35, 8, 9, 10, 9]], 2, 3, [0, 10, 0, 13]], [[7, 49], 5, 1]]], [[[[[39, 1, 10, 2, 13], [45, 11, 10, 13, 11], [12, 7, 6, 7, 6], [33, 6, 15, 9, 16], [47, 1, 8, 4, 11]], 1, 1, [9, 8, 14, 8]], [[33, 45], 5, 1]], [[[[43, 14, 12, 14, 12], [2, 5, 9, 5, 10], [32, 3, 7, 6, 8], [49, 4, 0, 6, 1], [11, 2, 7, 2, 10]], 1, 1, [6, 14, 11, 19]], [[2, 11, 32, 43], 5, 1]], [[[[8, 0, 11, 1, 11], [4, 5, 0, 8, 3], [26, 13, 14, 13, 14], [32, 1, 6, 2, 8], [16, 15, 6, 16, 9], [27, 8, 0, 8, 1], [24, 8, 0, 9, 0], [47, 3, 6, 6, 8], [46, 11, 7, 12, 8], [21, 5, 4, 8, 6], [6, 11, 10, 12, 13], [49, 9, 13, 9, 16]], 1, 2, [0, 9, 0, 14]], [[4, 8, 16, 21, 32, 46, 47], 13, 2]], [[[[34, 13, 8, 16, 9], [35, 0, 9, 2, 12], [8, 11, 12, 13, 13], [43, 12, 9, 15, 9], [42, 12, 3, 15, 5], [21, 13, 3, 13, 3], [27, 12, 0, 12, 3], [37, 6, 2, 8, 5], [25, 0, 9, 2, 12]], 2, 3, [10, 6, 10, 11]], [[8, 37, 42], 13, 2]], [[[[17, 13, 7, 13, 8], [34, 1, 4, 3, 5], [18, 0, 15, 2, 16], [28, 8, 6, 11, 8], [23, 1, 2, 3, 2], [1, 0, 0, 3, 0], [40, 1, 0, 3, 1], [22, 5, 9, 6, 12], [38, 11, 3, 11, 6], [6, 0, 5, 0, 8]], 1, 2, [13, 0, 14, 4]], [[6, 17, 28, 38], 13, 2]], [[[[41, 10, 13, 10, 13], [4, 5, 13, 5, 14], [36, 10, 15, 12, 16], [35, 5, 5, 7, 6], [47, 9, 4, 10, 5], [27, 10, 14, 13, 14], [13, 8, 8, 10, 10], [15, 6, 14, 8, 14], [11, 11, 3, 13, 4]], 2, 2, [7, 2, 7, 7]], [[15, 35], 9, 2]], [[[[4, 15, 8, 16, 9], [30, 1, 0, 2, 0], [35, 15, 6, 16, 9], [12, 10, 4, 13, 7], [1, 2, 14, 5, 15], [28, 5, 2, 5, 5], [20, 15, 1, 15, 4], [46, 9, 0, 12, 0], [19, 4, 5, 5, 5], [43, 0, 9, 2, 11], [38, 6, 1, 9, 3], [7, 15, 6, 16, 8]], 3, 2, [14, 9, 16, 11]], [[4, 7, 35, 38], 5, 1]], [[[[46, 8, 9, 8, 9], [32, 1, 4, 1, 6], [8, 4, 11, 5, 13], [41, 1, 15, 3, 16], [28, 4, 14, 4, 16], [22, 10, 8, 12, 9], [26, 4, 0, 5, 0], [49, 8, 15, 8, 16], [4, 14, 9, 15, 12]], 3, 2, [14, 1, 16, 1]], [[], 9, 2]]]]
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[[10, 32], 5, 1][[8, 10, 32], 5, 1]Failed
case 1[[2, 39], 5, 1][[2, 5, 39], 5, 1]Failed
case 2[[19, 29], 1, 0][[19, 29], 1, 0]Passed
case 3[[27, 35], 5, 1][[27, 35], 5, 1]Passed
case 4[[4, 11, 16], 17, 2][[4, 11, 16, 49], 13, 2]Failed
case 5[[23], 13, 2][[7, 23], 13, 2]Failed
case 6[[26, 40], 5, 1][[26, 40], 5, 1]Passed
case 7[[8, 30, 37], 17, 2][[8, 30, 37], 13, 2]Failed

SHA-256 / b7b4627e0658d6a483e4c1087d4e9109fc3882c97fb555dd12d64b1235fc145a

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(objs, cap, max_depth, q):
    def make(x, y, s, d):
        return {'x': x, 'y': y, 's': s, 'd': d, 'objs': [], 'kids': None}
    def child_index(n, o):
        h = n['s'] / 2
        mx, my = n['x'] + h, n['y'] + h
        if o[3] < mx:
            cx = 0
        elif o[1] >= mx:
            cx = 1
        else:
            return -1
        if o[4] < my:
            cy = 0
        elif o[2] >= my:
            cy = 1
        else:
            return -1
        return cy * 2 + cx
    def split(n):
        h = n['s'] / 2
        n['kids'] = [make(n['x'] + (k % 2) * h, n['y'] + (k // 2) * h, h, n['d'] + 1) for k in range(4)]
        old, n['objs'] = n['objs'], []
        for o in old:
            insert(n, o)
    def insert(n, o):
        if n['kids'] is not None:
            k = child_index(n, o)
            if k >= 0:
                insert(n['kids'][k], o)
                return
        n['objs'].append(o)
        if n['kids'] is None and len(n['objs']) > cap and n['d'] < max_depth:
            split(n)
    root = make(0, 0, 16, 0)
    for o in objs:
        insert(root, o)
    found, count, deep = [], 0, 0
    stack = [root]
    while stack:
        n = stack.pop()
        count += 1
        deep = max(deep, n['d'])
        if n['kids']:
            stack.extend(n['kids'])
        if n['x'] <= q[2] and q[0] <= n['x'] + n['s'] and n['y'] <= q[3] and q[1] <= n['y'] + n['s']:
            found.extend(o[0] for o in n['objs'])
    return [sorted(found), count, deep]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[8, 6, 11, 9, 13], [47, 5, 10, 5, 12], [10, 7, 0, 7, 2], [32, 7, 6, 8, 8], [45, 13, 0, 13, 3], [14, 8, 2, 9, 3]], 2, 1, [3, 5, 4, 5]], [[8, 10, 32], 5, 1]], [[[[2, 13, 0, 16, 1], [21, 1, 6, 1, 6], [5, 5, 8, 8, 8], [39, 10, 6, 11, 9]], 2, 2, [14, 1, 19, 6]], [[2, 5, 39], 5, 1]], [[[[29, 1, 10, 1, 12], [19, 5, 10, 6, 11]], 2, 3, [3, 1, 8, 2]], [[19, 29], 1, 0]], [[[[41, 13, 0, 13, 2], [46, 3, 11, 3, 14], [28, 12, 0, 14, 3], [35, 14, 12, 16, 14], [27, 10, 15, 10, 15], [33, 0, 15, 0, 16]], 2, 3, [12, 14, 16, 16]], [[27, 35], 5, 1]], [[[[31, 11, 9, 12, 9], [29, 6, 3, 7, 5], [11, 14, 7, 14, 7], [16, 0, 7, 0, 9], [33, 15, 11, 16, 11], [4, 12, 0, 13, 3], [20, 12, 14, 13, 16], [49, 7, 6, 8, 7]], 1, 3, [12, 4, 14, 6]], [[4, 11, 16, 49], 13, 2]], [[[[43, 0, 6, 3, 7], [10, 9, 12, 9, 12], [14, 14, 11, 16, 13], [6, 9, 12, 11, 13], [27, 0, 5, 2, 7], [7, 5, 2, 8, 3], [23, 8, 2, 9, 4]], 1, 2, [9, 6, 12, 7]], [[7, 23], 13, 2]], [[[[40, 11, 13, 13, 16], [21, 2, 2, 5, 2], [46, 1, 11, 2, 13], [26, 11, 8, 14, 8], [28, 1, 3, 1, 3], [18, 6, 9, 6, 11], [17, 0, 1, 3, 2]], 3, 1, [9, 9, 12, 13]], [[26, 40], 5, 1]], [[[[8, 4, 3, 5, 5], [30, 7, 3, 8, 5], [26, 10, 12, 13, 14], [37, 7, 5, 10, 8], [47, 1, 9, 4, 10], [42, 5, 8, 5, 9], [36, 15, 14, 16, 16]], 1, 2, [8, 5, 13, 7]], [[8, 30, 37], 13, 2]]], [[[[[9, 5, 5, 7, 5], [31, 6, 15, 6, 15], [41, 14, 11, 14, 12], [19, 9, 4, 11, 6], [30, 14, 13, 16, 15], [39, 7, 5, 10, 7], [37, 0, 1, 2, 2], [3, 8, 9, 8, 10], [20, 6, 15, 6, 16]], 3, 1, [5, 9, 7, 9]], [[20, 31, 39], 5, 1]], [[[[20, 12, 5, 13, 6], [26, 14, 0, 16, 1], [6, 1, 2, 1, 5], [35, 9, 1, 12, 1], [23, 3, 15, 4, 16]], 3, 1, [5, 12, 6, 17]], [[23], 5, 1]], [[[[28, 15, 3, 16, 3], [15, 5, 14, 8, 15], [41, 10, 1, 11, 1], [45, 3, 11, 3, 14], [36, 5, 15, 8, 16], [47, 11, 5, 11, 8], [10, 6, 10, 9, 12], [11, 13, 12, 13, 14], [44, 8, 9, 10, 9]], 2, 3, [8, 12, 9, 13]], [[10, 11, 15, 36, 44, 45, 47], 5, 1]], [[[[24, 5, 10, 5, 11], [3, 13, 1, 16, 3], [22, 6, 7, 9, 8]], 3, 3, [10, 6, 15, 9]], [[3, 22, 24], 1, 0]], [[[[23, 10, 9, 10, 9], [14, 9, 3, 11, 3], [32, 14, 5, 16, 5], [40, 3, 2, 4, 4], [9, 5, 3, 8, 4]], 1, 1, [4, 3, 9, 4]], [[9, 14, 32, 40], 5, 1]], [[[[46, 11, 12, 13, 13], [4, 4, 11, 4, 14], [41, 4, 13, 4, 13], [2, 0, 8, 1, 11], [45, 5, 5, 8, 5], [3, 2, 4, 4, 5], [39, 15, 12, 16, 13], [25, 12, 8, 14, 11]], 1, 2, [0, 0, 5, 1]], [[3, 45], 13, 2]], [[[[23, 0, 12, 3, 13], [25, 7, 0, 9, 0], [18, 8, 9, 9, 9], [37, 3, 7, 5, 9], [21, 15, 5, 15, 5], [17, 11, 12, 12, 14], [3, 9, 10, 12, 11], [29, 0, 5, 0, 8], [40, 2, 4, 2, 7]], 1, 1, [12, 14, 12, 17]], [[3, 17, 18, 25, 29, 37], 5, 1]], [[[[31, 2, 8, 2, 11], [49, 7, 12, 7, 15], [38, 6, 6, 8, 7], [3, 8, 14, 8, 14], [48, 8, 9, 11, 11]], 3, 1, [9, 10, 9, 14]], [[3, 38, 48], 5, 1]]], [[[[[27, 14, 9, 16, 12], [35, 3, 9, 5, 11], [46, 6, 2, 6, 4], [32, 9, 6, 10, 8], [23, 4, 12, 5, 13]], 1, 2, [8, 13, 13, 15]], [[23, 27, 32, 35], 9, 2]], [[[[24, 6, 6, 9, 6], [27, 0, 1, 1, 3], [19, 4, 1, 4, 1]], 2, 2, [7, 8, 7, 10]], [[19, 24, 27], 5, 1]], [[[[17, 1, 13, 1, 15], [4, 12, 5, 14, 8], [42, 0, 3, 1, 5], [1, 15, 3, 16, 3]], 2, 1, [13, 14, 18, 18]], [[4], 5, 1]], [[[[15, 10, 8, 13, 11], [12, 14, 4, 16, 5], [28, 15, 13, 16, 13], [5, 3, 1, 4, 4], [29, 3, 0, 6, 2], [14, 6, 11, 8, 11], [37, 3, 11, 4, 13], [26, 13, 11, 15, 13], [35, 13, 9, 16, 12], [9, 15, 9, 16, 12]], 1, 1, [9, 14, 14, 18]], [[9, 14, 15, 26, 28, 35], 5, 1]], [[[[25, 2, 2, 3, 2], [19, 13, 7, 14, 7], [28, 4, 8, 7, 11], [18, 11, 3, 11, 3]], 2, 1, [11, 12, 14, 17]], [[], 5, 1]], [[[[25, 6, 10, 7, 12], [11, 4, 14, 5, 15], [28, 13, 0, 16, 1], [47, 15, 0, 16, 0], [49, 7, 8, 7, 10], [19, 8, 1, 9, 3], [41, 6, 12, 8, 14], [8, 6, 2, 6, 4]], 2, 3, [11, 9, 11, 13]], [[41], 13, 2]], [[[[27, 0, 2, 3, 3], [21, 0, 12, 2, 14], [38, 0, 2, 2, 5], [2, 0, 5, 3, 5], [31, 10, 9, 10, 12], [20, 10, 2, 11, 5]], 2, 2, [2, 10, 6, 14]], [[21], 9, 2]], [[[[8, 15, 5, 16, 6], [23, 12, 4, 12, 5], [39, 8, 1, 8, 1], [41, 13, 11, 15, 14], [27, 12, 11, 12, 12]], 1, 2, [8, 3, 10, 8]], [[27, 39, 41], 13, 2]]], [[[[[34, 6, 9, 8, 12], [46, 8, 0, 9, 2], [4, 8, 14, 11, 15], [16, 13, 9, 16, 11]], 3, 3, [0, 0, 5, 5]], [[34], 5, 1]], [[[[6, 8, 7, 9, 8], [36, 9, 11, 12, 12], [34, 11, 4, 14, 4], [42, 13, 0, 15, 0], [14, 14, 1, 16, 3], [47, 12, 0, 13, 2], [12, 15, 12, 15, 12], [49, 6, 13, 6, 15], [28, 8, 15, 11, 16], [5, 3, 13, 6, 14]], 2, 3, [7, 0, 11, 2]], [[6, 34], 17, 3]], [[[[32, 9, 4, 12, 4], [8, 9, 7, 12, 8], [24, 11, 10, 13, 13], [26, 8, 14, 10, 16], [40, 12, 5, 14, 6], [34, 9, 3, 11, 4], [45, 10, 0, 12, 3]], 3, 1, [5, 11, 5, 13]], [[8], 5, 1]], [[[[21, 14, 12, 16, 15], [13, 14, 8, 14, 8]], 3, 1, [7, 4, 9, 8]], [[13, 21], 1, 0]], [[[[41, 6, 5, 8, 5], [26, 7, 5, 10, 6], [45, 5, 12, 5, 12], [1, 3, 10, 4, 13], [44, 7, 14, 9, 14]], 1, 1, [8, 9, 8, 14]], [[1, 26, 41, 44, 45], 5, 1]], [[[[38, 4, 13, 5, 13], [4, 11, 10, 12, 13], [11, 3, 8, 6, 10], [3, 4, 10, 4, 12]], 1, 3, [11, 5, 13, 5]], [[], 9, 2]], [[[[41, 6, 14, 8, 14], [46, 5, 5, 8, 8], [44, 1, 1, 2, 3], [18, 0, 8, 1, 11], [30, 4, 5, 7, 6]], 3, 1, [10, 11, 10, 11]], [[41, 46], 5, 1]], [[[[7, 13, 7, 14, 10], [49, 6, 5, 9, 6], [35, 8, 9, 10, 9]], 2, 3, [0, 10, 0, 13]], [[7, 49], 5, 1]]], [[[[[39, 1, 10, 2, 13], [45, 11, 10, 13, 11], [12, 7, 6, 7, 6], [33, 6, 15, 9, 16], [47, 1, 8, 4, 11]], 1, 1, [9, 8, 14, 8]], [[33, 45], 5, 1]], [[[[43, 14, 12, 14, 12], [2, 5, 9, 5, 10], [32, 3, 7, 6, 8], [49, 4, 0, 6, 1], [11, 2, 7, 2, 10]], 1, 1, [6, 14, 11, 19]], [[2, 11, 32, 43], 5, 1]], [[[[8, 0, 11, 1, 11], [4, 5, 0, 8, 3], [26, 13, 14, 13, 14], [32, 1, 6, 2, 8], [16, 15, 6, 16, 9], [27, 8, 0, 8, 1], [24, 8, 0, 9, 0], [47, 3, 6, 6, 8], [46, 11, 7, 12, 8], [21, 5, 4, 8, 6], [6, 11, 10, 12, 13], [49, 9, 13, 9, 16]], 1, 2, [0, 9, 0, 14]], [[4, 8, 16, 21, 32, 46, 47], 13, 2]], [[[[34, 13, 8, 16, 9], [35, 0, 9, 2, 12], [8, 11, 12, 13, 13], [43, 12, 9, 15, 9], [42, 12, 3, 15, 5], [21, 13, 3, 13, 3], [27, 12, 0, 12, 3], [37, 6, 2, 8, 5], [25, 0, 9, 2, 12]], 2, 3, [10, 6, 10, 11]], [[8, 37, 42], 13, 2]], [[[[17, 13, 7, 13, 8], [34, 1, 4, 3, 5], [18, 0, 15, 2, 16], [28, 8, 6, 11, 8], [23, 1, 2, 3, 2], [1, 0, 0, 3, 0], [40, 1, 0, 3, 1], [22, 5, 9, 6, 12], [38, 11, 3, 11, 6], [6, 0, 5, 0, 8]], 1, 2, [13, 0, 14, 4]], [[6, 17, 28, 38], 13, 2]], [[[[41, 10, 13, 10, 13], [4, 5, 13, 5, 14], [36, 10, 15, 12, 16], [35, 5, 5, 7, 6], [47, 9, 4, 10, 5], [27, 10, 14, 13, 14], [13, 8, 8, 10, 10], [15, 6, 14, 8, 14], [11, 11, 3, 13, 4]], 2, 2, [7, 2, 7, 7]], [[15, 35], 9, 2]], [[[[4, 15, 8, 16, 9], [30, 1, 0, 2, 0], [35, 15, 6, 16, 9], [12, 10, 4, 13, 7], [1, 2, 14, 5, 15], [28, 5, 2, 5, 5], [20, 15, 1, 15, 4], [46, 9, 0, 12, 0], [19, 4, 5, 5, 5], [43, 0, 9, 2, 11], [38, 6, 1, 9, 3], [7, 15, 6, 16, 8]], 3, 2, [14, 9, 16, 11]], [[4, 7, 35, 38], 5, 1]], [[[[46, 8, 9, 8, 9], [32, 1, 4, 1, 6], [8, 4, 11, 5, 13], [41, 1, 15, 3, 16], [28, 4, 14, 4, 16], [22, 10, 8, 12, 9], [26, 4, 0, 5, 0], [49, 8, 15, 8, 16], [4, 14, 9, 15, 12]], 3, 2, [14, 1, 16, 1]], [[], 9, 2]]]]
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[[8, 10, 32], 5, 1][[8, 10, 32], 5, 1]Passed
case 1[[2, 5, 39], 5, 1][[2, 5, 39], 5, 1]Passed
case 2[[19, 29], 1, 0][[19, 29], 1, 0]Passed
case 3[[27, 35], 5, 1][[27, 35], 5, 1]Passed
case 4[[4, 11, 16, 49], 13, 2][[4, 11, 16, 49], 13, 2]Passed
case 5[[7, 23], 13, 2][[7, 23], 13, 2]Passed
case 6[[26, 40], 5, 1][[26, 40], 5, 1]Passed
case 7[[8, 30, 37], 13, 2][[8, 30, 37], 13, 2]Passed

SHA-256 / a2674a018bd88eb1b2762f9172294cb2750c9e3126f992940b3a541e91e925bb

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

Case digest / 8e117692a51fe2310503f96afbfdaa79782c362c4b134a5b7f2ba45f4660d562