FAILURE MAP
← Case archive

FA-87536 / Collision detection broadphase / Open access

Previous-frame pairs are not normalized · case 01

Pairs stored as (b,a) end and restart every frame.

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

ROOT CAUSE

P keeps raw tuple orientation.

VERIFIED REPAIR

Normalize both frames to (min,max).

Unsuccessful approach: Normalizing to (max,min) mismatches the current frame the other way.

Case contract

solve(prev, curr, asleep): contact pair cache update. Pairs are unordered; self pairs in curr are ignored. Previous pairs whose two bodies are both asleep persist even if not re-reported. Return [begin, end, persist] as sorted [min,max] lists.

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(prev, curr, asleep):
    def norm(p):
        return (min(p), max(p))
    P = {tuple(p) for p in prev}
    C = {norm(p) for p in curr if p[0] != p[1]}
    sl = set(asleep)
    for p in P:
        if p[0] in sl and p[1] in sl:
            C.add(p)
    begin = sorted(C - P)
    end = sorted(P - C)
    keep = sorted(P & C)
    return [[list(p) for p in begin], [list(p) for p in end], [list(p) for p in keep]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[1, 2], [4, 5], [1, 2], [5, 4], [7, 1]], [[7, 3], [7, 2]], [7, 4, 2]], [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]], [[[[4, 6]], [[4, 1]], [3, 4, 2]], [[[1, 4]], [[4, 6]], []]], [[[[6, 1], [3, 1], [5, 6], [6, 7], [6, 4], [3, 5]], [[3, 2], [1, 4], [6, 5], [1, 3], [1, 7]], [3, 7, 4]], [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]], [[[[5, 3], [6, 3]], [[5, 6], [4, 2]], [6, 5, 4]], [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]], [[[[4, 7], [4, 7], [2, 4], [4, 5]], [[5, 4], [1, 5], [4, 7], [5, 2]], [6]], [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]], [[[[2, 6]], [[3, 6], [4, 5], [1, 7], [3, 5]], [3]], [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]], [[[[2, 4], [4, 3], [4, 6], [1, 3], [7, 5]], [[2, 1], [3, 1], [6, 3]], [1, 6]], [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]], [[[[1, 6], [4, 3]], [[4, 7], [5, 6], [6, 2], [5, 1], [3, 3]], [6]], [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]]], [[[[[7, 3]], [[2, 4], [1, 5], [7, 5]], [7, 4, 6, 2]], [[[1, 5], [2, 4], [5, 7]], [[3, 7]], []]], [[[[5, 4], [7, 2], [4, 3]], [[3, 4], [7, 4], [6, 2], [7, 6], [1, 4], [4, 2], [1, 1]], [7]], [[[1, 4], [2, 4], [2, 6], [4, 7], [6, 7]], [[2, 7], [4, 5]], [[3, 4]]]], [[[[2, 7], [4, 7], [4, 5], [1, 5], [4, 5], [1, 6]], [[3, 4], [4, 1], [5, 1], [5, 7], [7, 5], [6, 2]], [7, 1]], [[[1, 4], [2, 6], [3, 4], [5, 7]], [[1, 6], [2, 7], [4, 5], [4, 7]], [[1, 5]]]], [[[[6, 2], [6, 3], [7, 4]], [[2, 1], [7, 3], [6, 4], [2, 1]], [4]], [[[1, 2], [3, 7], [4, 6]], [[2, 6], [3, 6], [4, 7]], []]], [[[[4, 5], [4, 6], [3, 5], [5, 6], [5, 1]], [[7, 3], [1, 3], [6, 1], [4, 3]], [4, 5]], [[[1, 3], [1, 6], [3, 4], [3, 7]], [[1, 5], [3, 5], [4, 6], [5, 6]], [[4, 5]]]], [[[[2, 7], [1, 2], [1, 5]], [[6, 1], [7, 5], [1, 2], [3, 1], [7, 2], [6, 5]], [1, 5]], [[[1, 3], [1, 6], [5, 6], [5, 7]], [], [[1, 2], [1, 5], [2, 7]]]], [[[[4, 3], [2, 7], [2, 4], [5, 7], [3, 2], [5, 1]], [[6, 3], [6, 7], [4, 2]], [7]], [[[3, 6], [6, 7]], [[1, 5], [2, 3], [2, 7], [3, 4], [5, 7]], [[2, 4]]]], [[[[2, 3], [1, 2]], [[7, 1]], [3, 7]], [[[1, 7]], [[1, 2], [2, 3]], []]]], [[[[[7, 5]], [[4, 1], [3, 3]], [6]], [[[1, 4]], [[5, 7]], []]], [[[[1, 3], [4, 7], [6, 5]], [[3, 1]], [5, 6, 3]], [[], [[4, 7]], [[1, 3], [5, 6]]]], [[[[1, 7], [3, 7], [1, 3]], [[3, 6], [5, 6], [2, 7]], [1, 2, 3, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 7], [3, 7]], [[1, 3]]]], [[[[1, 2]], [[2, 5], [3, 6], [1, 3]], [5]], [[[1, 3], [2, 5], [3, 6]], [[1, 2]], []]], [[[[4, 6], [1, 7], [2, 5]], [[7, 1], [7, 2]], [4, 7, 5]], [[[2, 7]], [[2, 5], [4, 6]], [[1, 7]]]], [[[[5, 4], [3, 5], [3, 2], [2, 7]], [[2, 1], [3, 6], [2, 2]], [3, 1, 5, 7]], [[[1, 2], [3, 6]], [[2, 3], [2, 7], [4, 5]], [[3, 5]]]], [[[[4, 1], [5, 3], [1, 4], [1, 2], [6, 2]], [[2, 7], [5, 3], [5, 6], [3, 6], [3, 6]], [6, 4, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 2], [1, 4], [2, 6]], [[3, 5]]]], [[[[5, 6], [5, 1], [2, 3]], [[5, 2], [7, 1], [7, 1], [4, 6]], [7]], [[[1, 7], [2, 5], [4, 6]], [[1, 5], [2, 3], [5, 6]], []]]], [[[[[5, 6], [1, 3], [4, 7], [3, 6], [7, 2], [5, 3]], [[5, 1], [4, 2], [4, 7], [1, 7]], [1, 5]], [[[1, 5], [1, 7], [2, 4]], [[1, 3], [2, 7], [3, 5], [3, 6], [5, 6]], [[4, 7]]]], [[[[7, 6], [6, 5], [6, 1], [6, 3], [3, 2]], [[1, 6], [1, 7], [2, 5], [1, 4]], []], [[[1, 4], [1, 7], [2, 5]], [[2, 3], [3, 6], [5, 6], [6, 7]], [[1, 6]]]], [[[[2, 4], [4, 5], [4, 6], [1, 5], [6, 7]], [[6, 5], [2, 1]], [6, 3, 2]], [[[1, 2], [5, 6]], [[1, 5], [2, 4], [4, 5], [4, 6], [6, 7]], []]], [[[[4, 2]], [[7, 5], [5, 3], [7, 3]], [4, 5, 2, 3]], [[[3, 5], [3, 7], [5, 7]], [], [[2, 4]]]], [[[[4, 7], [3, 7], [2, 5], [2, 4]], [[6, 4], [1, 4], [7, 1], [5, 2]], [1, 6, 3, 2]], [[[1, 4], [1, 7], [4, 6]], [[2, 4], [3, 7], [4, 7]], [[2, 5]]]], [[[[4, 6], [2, 3], [4, 6]], [[5, 1], [6, 5], [5, 2], [4, 4]], []], [[[1, 5], [2, 5], [5, 6]], [[2, 3], [4, 6]], []]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[7, 3], [6, 4]], [[1, 4], [4, 3], [2, 1], [4, 6], [3, 5]], [4, 7]], [[[1, 2], [1, 4], [3, 4], [3, 5]], [[3, 7]], [[4, 6]]]]], [[[[[2, 5], [1, 7]], [[5, 6], [3, 4]], [6, 5, 3, 1]], [[[3, 4], [5, 6]], [[1, 7], [2, 5]], []]], [[[[1, 3]], [[3, 5], [2, 1], [4, 5], [4, 5], [3, 6]], [6, 5, 2, 1]], [[[1, 2], [3, 5], [3, 6], [4, 5]], [[1, 3]], []]], [[[[7, 5], [4, 2], [1, 5]], [[4, 6], [1, 7], [3, 7], [4, 1], [4, 1], [3, 1]], [7]], [[[1, 3], [1, 4], [1, 7], [3, 7], [4, 6]], [[1, 5], [2, 4], [5, 7]], []]], [[[[5, 1], [7, 1], [5, 3], [6, 2], [7, 5]], [[3, 7], [4, 1], [5, 6], [4, 7]], [1, 6, 4, 5]], [[[1, 4], [3, 7], [4, 7], [5, 6]], [[1, 7], [2, 6], [3, 5], [5, 7]], [[1, 5]]]], [[[[7, 3], [4, 6], [3, 7], [7, 5], [4, 2]], [[2, 3], [1, 5], [6, 1], [7, 5], [4, 4]], [2, 6]], [[[1, 5], [1, 6], [2, 3]], [[2, 4], [3, 7], [4, 6]], [[5, 7]]]], [[[[3, 6], [3, 6]], [[4, 5], [2, 6], [5, 4], [3, 1]], []], [[[1, 3], [2, 6], [4, 5]], [[3, 6]], []]], [[[[5, 1], [2, 5], [5, 1], [6, 2], [6, 3], [6, 4]], [[5, 4], [4, 5], [2, 4], [7, 4], [4, 1], [4, 4]], [2, 3, 5, 4]], [[[1, 4], [2, 4], [4, 5], [4, 7]], [[1, 5], [2, 6], [3, 6], [4, 6]], [[2, 5]]]], [[[[2, 4], [3, 7], [2, 6]], [[3, 1], [3, 1], [2, 1], [3, 3]], [6, 1, 4, 7]], [[[1, 2], [1, 3]], [[2, 4], [2, 6], [3, 7]], []]]]]
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[[[2, 7], [3, 7]], [[1, 2], [4, 5], [5, 4], [7, 1]], []][[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]Failed
case 1[[[1, 4]], [[4, 6]], []][[[1, 4]], [[4, 6]], []]Passed
case 2[[[1, 3], [1, 4], [1, 7], [2, 3]], [[3, 1], [3, 5], [6, 1], [6, 4], [6, 7]], [[5, 6]]][[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]Failed
case 3[[[2, 4], [5, 6]], [[5, 3], [6, 3]], []][[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]Failed
case 4[[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]][[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]Passed
case 5[[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []][[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]Passed
case 6[[[1, 2], [3, 6]], [[2, 4], [4, 3], [4, 6], [7, 5]], [[1, 3]]][[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]Failed
case 7[[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [4, 3]], []][[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]Failed

SHA-256 / a6a5006a964e99d885111845724640b2351b4f621b073bf665bb82c83c7804d7

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(prev, curr, asleep):
    def norm(p):
        return (min(p), max(p))
    P = {(max(p), min(p)) for p in prev}
    C = {norm(p) for p in curr if p[0] != p[1]}
    sl = set(asleep)
    for p in P:
        if p[0] in sl and p[1] in sl:
            C.add(p)
    begin = sorted(C - P)
    end = sorted(P - C)
    keep = sorted(P & C)
    return [[list(p) for p in begin], [list(p) for p in end], [list(p) for p in keep]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[1, 2], [4, 5], [1, 2], [5, 4], [7, 1]], [[7, 3], [7, 2]], [7, 4, 2]], [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]], [[[[4, 6]], [[4, 1]], [3, 4, 2]], [[[1, 4]], [[4, 6]], []]], [[[[6, 1], [3, 1], [5, 6], [6, 7], [6, 4], [3, 5]], [[3, 2], [1, 4], [6, 5], [1, 3], [1, 7]], [3, 7, 4]], [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]], [[[[5, 3], [6, 3]], [[5, 6], [4, 2]], [6, 5, 4]], [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]], [[[[4, 7], [4, 7], [2, 4], [4, 5]], [[5, 4], [1, 5], [4, 7], [5, 2]], [6]], [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]], [[[[2, 6]], [[3, 6], [4, 5], [1, 7], [3, 5]], [3]], [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]], [[[[2, 4], [4, 3], [4, 6], [1, 3], [7, 5]], [[2, 1], [3, 1], [6, 3]], [1, 6]], [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]], [[[[1, 6], [4, 3]], [[4, 7], [5, 6], [6, 2], [5, 1], [3, 3]], [6]], [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]]], [[[[[7, 3]], [[2, 4], [1, 5], [7, 5]], [7, 4, 6, 2]], [[[1, 5], [2, 4], [5, 7]], [[3, 7]], []]], [[[[5, 4], [7, 2], [4, 3]], [[3, 4], [7, 4], [6, 2], [7, 6], [1, 4], [4, 2], [1, 1]], [7]], [[[1, 4], [2, 4], [2, 6], [4, 7], [6, 7]], [[2, 7], [4, 5]], [[3, 4]]]], [[[[2, 7], [4, 7], [4, 5], [1, 5], [4, 5], [1, 6]], [[3, 4], [4, 1], [5, 1], [5, 7], [7, 5], [6, 2]], [7, 1]], [[[1, 4], [2, 6], [3, 4], [5, 7]], [[1, 6], [2, 7], [4, 5], [4, 7]], [[1, 5]]]], [[[[6, 2], [6, 3], [7, 4]], [[2, 1], [7, 3], [6, 4], [2, 1]], [4]], [[[1, 2], [3, 7], [4, 6]], [[2, 6], [3, 6], [4, 7]], []]], [[[[4, 5], [4, 6], [3, 5], [5, 6], [5, 1]], [[7, 3], [1, 3], [6, 1], [4, 3]], [4, 5]], [[[1, 3], [1, 6], [3, 4], [3, 7]], [[1, 5], [3, 5], [4, 6], [5, 6]], [[4, 5]]]], [[[[2, 7], [1, 2], [1, 5]], [[6, 1], [7, 5], [1, 2], [3, 1], [7, 2], [6, 5]], [1, 5]], [[[1, 3], [1, 6], [5, 6], [5, 7]], [], [[1, 2], [1, 5], [2, 7]]]], [[[[4, 3], [2, 7], [2, 4], [5, 7], [3, 2], [5, 1]], [[6, 3], [6, 7], [4, 2]], [7]], [[[3, 6], [6, 7]], [[1, 5], [2, 3], [2, 7], [3, 4], [5, 7]], [[2, 4]]]], [[[[2, 3], [1, 2]], [[7, 1]], [3, 7]], [[[1, 7]], [[1, 2], [2, 3]], []]]], [[[[[7, 5]], [[4, 1], [3, 3]], [6]], [[[1, 4]], [[5, 7]], []]], [[[[1, 3], [4, 7], [6, 5]], [[3, 1]], [5, 6, 3]], [[], [[4, 7]], [[1, 3], [5, 6]]]], [[[[1, 7], [3, 7], [1, 3]], [[3, 6], [5, 6], [2, 7]], [1, 2, 3, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 7], [3, 7]], [[1, 3]]]], [[[[1, 2]], [[2, 5], [3, 6], [1, 3]], [5]], [[[1, 3], [2, 5], [3, 6]], [[1, 2]], []]], [[[[4, 6], [1, 7], [2, 5]], [[7, 1], [7, 2]], [4, 7, 5]], [[[2, 7]], [[2, 5], [4, 6]], [[1, 7]]]], [[[[5, 4], [3, 5], [3, 2], [2, 7]], [[2, 1], [3, 6], [2, 2]], [3, 1, 5, 7]], [[[1, 2], [3, 6]], [[2, 3], [2, 7], [4, 5]], [[3, 5]]]], [[[[4, 1], [5, 3], [1, 4], [1, 2], [6, 2]], [[2, 7], [5, 3], [5, 6], [3, 6], [3, 6]], [6, 4, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 2], [1, 4], [2, 6]], [[3, 5]]]], [[[[5, 6], [5, 1], [2, 3]], [[5, 2], [7, 1], [7, 1], [4, 6]], [7]], [[[1, 7], [2, 5], [4, 6]], [[1, 5], [2, 3], [5, 6]], []]]], [[[[[5, 6], [1, 3], [4, 7], [3, 6], [7, 2], [5, 3]], [[5, 1], [4, 2], [4, 7], [1, 7]], [1, 5]], [[[1, 5], [1, 7], [2, 4]], [[1, 3], [2, 7], [3, 5], [3, 6], [5, 6]], [[4, 7]]]], [[[[7, 6], [6, 5], [6, 1], [6, 3], [3, 2]], [[1, 6], [1, 7], [2, 5], [1, 4]], []], [[[1, 4], [1, 7], [2, 5]], [[2, 3], [3, 6], [5, 6], [6, 7]], [[1, 6]]]], [[[[2, 4], [4, 5], [4, 6], [1, 5], [6, 7]], [[6, 5], [2, 1]], [6, 3, 2]], [[[1, 2], [5, 6]], [[1, 5], [2, 4], [4, 5], [4, 6], [6, 7]], []]], [[[[4, 2]], [[7, 5], [5, 3], [7, 3]], [4, 5, 2, 3]], [[[3, 5], [3, 7], [5, 7]], [], [[2, 4]]]], [[[[4, 7], [3, 7], [2, 5], [2, 4]], [[6, 4], [1, 4], [7, 1], [5, 2]], [1, 6, 3, 2]], [[[1, 4], [1, 7], [4, 6]], [[2, 4], [3, 7], [4, 7]], [[2, 5]]]], [[[[4, 6], [2, 3], [4, 6]], [[5, 1], [6, 5], [5, 2], [4, 4]], []], [[[1, 5], [2, 5], [5, 6]], [[2, 3], [4, 6]], []]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[7, 3], [6, 4]], [[1, 4], [4, 3], [2, 1], [4, 6], [3, 5]], [4, 7]], [[[1, 2], [1, 4], [3, 4], [3, 5]], [[3, 7]], [[4, 6]]]]], [[[[[2, 5], [1, 7]], [[5, 6], [3, 4]], [6, 5, 3, 1]], [[[3, 4], [5, 6]], [[1, 7], [2, 5]], []]], [[[[1, 3]], [[3, 5], [2, 1], [4, 5], [4, 5], [3, 6]], [6, 5, 2, 1]], [[[1, 2], [3, 5], [3, 6], [4, 5]], [[1, 3]], []]], [[[[7, 5], [4, 2], [1, 5]], [[4, 6], [1, 7], [3, 7], [4, 1], [4, 1], [3, 1]], [7]], [[[1, 3], [1, 4], [1, 7], [3, 7], [4, 6]], [[1, 5], [2, 4], [5, 7]], []]], [[[[5, 1], [7, 1], [5, 3], [6, 2], [7, 5]], [[3, 7], [4, 1], [5, 6], [4, 7]], [1, 6, 4, 5]], [[[1, 4], [3, 7], [4, 7], [5, 6]], [[1, 7], [2, 6], [3, 5], [5, 7]], [[1, 5]]]], [[[[7, 3], [4, 6], [3, 7], [7, 5], [4, 2]], [[2, 3], [1, 5], [6, 1], [7, 5], [4, 4]], [2, 6]], [[[1, 5], [1, 6], [2, 3]], [[2, 4], [3, 7], [4, 6]], [[5, 7]]]], [[[[3, 6], [3, 6]], [[4, 5], [2, 6], [5, 4], [3, 1]], []], [[[1, 3], [2, 6], [4, 5]], [[3, 6]], []]], [[[[5, 1], [2, 5], [5, 1], [6, 2], [6, 3], [6, 4]], [[5, 4], [4, 5], [2, 4], [7, 4], [4, 1], [4, 4]], [2, 3, 5, 4]], [[[1, 4], [2, 4], [4, 5], [4, 7]], [[1, 5], [2, 6], [3, 6], [4, 6]], [[2, 5]]]], [[[[2, 4], [3, 7], [2, 6]], [[3, 1], [3, 1], [2, 1], [3, 3]], [6, 1, 4, 7]], [[[1, 2], [1, 3]], [[2, 4], [2, 6], [3, 7]], []]]]]
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[[[2, 7], [3, 7]], [[2, 1], [5, 4], [7, 1]], []][[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]Failed
case 1[[[1, 4]], [[6, 4]], []][[[1, 4]], [[4, 6]], []]Failed
case 2[[[1, 3], [1, 4], [1, 7], [2, 3], [5, 6]], [[3, 1], [5, 3], [6, 1], [6, 4], [6, 5], [7, 6]], []][[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]Failed
case 3[[[2, 4], [5, 6]], [[5, 3], [6, 3]], []][[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]Failed
case 4[[[1, 5], [2, 5], [4, 5], [4, 7]], [[4, 2], [5, 4], [7, 4]], []][[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]Failed
case 5[[[1, 7], [3, 5], [3, 6], [4, 5]], [[6, 2]], []][[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]Failed
case 6[[[1, 2], [1, 3], [3, 6]], [[3, 1], [4, 2], [4, 3], [6, 4], [7, 5]], []][[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]Failed
case 7[[[1, 5], [2, 6], [4, 7], [5, 6]], [[4, 3], [6, 1]], []][[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]Failed

SHA-256 / 8a7685411ff6c7f274d5a244c3d2a3200cbc10636c315009947e8c1a36c77998

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(prev, curr, asleep):
    def norm(p):
        return (min(p), max(p))
    P = {norm(p) for p in prev}
    C = {norm(p) for p in curr if p[0] != p[1]}
    sl = set(asleep)
    for p in P:
        if p[0] in sl and p[1] in sl:
            C.add(p)
    begin = sorted(C - P)
    end = sorted(P - C)
    keep = sorted(P & C)
    return [[list(p) for p in begin], [list(p) for p in end], [list(p) for p in keep]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[[[1, 2], [4, 5], [1, 2], [5, 4], [7, 1]], [[7, 3], [7, 2]], [7, 4, 2]], [[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]], [[[[4, 6]], [[4, 1]], [3, 4, 2]], [[[1, 4]], [[4, 6]], []]], [[[[6, 1], [3, 1], [5, 6], [6, 7], [6, 4], [3, 5]], [[3, 2], [1, 4], [6, 5], [1, 3], [1, 7]], [3, 7, 4]], [[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]], [[[[5, 3], [6, 3]], [[5, 6], [4, 2]], [6, 5, 4]], [[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]], [[[[4, 7], [4, 7], [2, 4], [4, 5]], [[5, 4], [1, 5], [4, 7], [5, 2]], [6]], [[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]], [[[[2, 6]], [[3, 6], [4, 5], [1, 7], [3, 5]], [3]], [[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]], [[[[2, 4], [4, 3], [4, 6], [1, 3], [7, 5]], [[2, 1], [3, 1], [6, 3]], [1, 6]], [[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]], [[[[1, 6], [4, 3]], [[4, 7], [5, 6], [6, 2], [5, 1], [3, 3]], [6]], [[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]]], [[[[[7, 3]], [[2, 4], [1, 5], [7, 5]], [7, 4, 6, 2]], [[[1, 5], [2, 4], [5, 7]], [[3, 7]], []]], [[[[5, 4], [7, 2], [4, 3]], [[3, 4], [7, 4], [6, 2], [7, 6], [1, 4], [4, 2], [1, 1]], [7]], [[[1, 4], [2, 4], [2, 6], [4, 7], [6, 7]], [[2, 7], [4, 5]], [[3, 4]]]], [[[[2, 7], [4, 7], [4, 5], [1, 5], [4, 5], [1, 6]], [[3, 4], [4, 1], [5, 1], [5, 7], [7, 5], [6, 2]], [7, 1]], [[[1, 4], [2, 6], [3, 4], [5, 7]], [[1, 6], [2, 7], [4, 5], [4, 7]], [[1, 5]]]], [[[[6, 2], [6, 3], [7, 4]], [[2, 1], [7, 3], [6, 4], [2, 1]], [4]], [[[1, 2], [3, 7], [4, 6]], [[2, 6], [3, 6], [4, 7]], []]], [[[[4, 5], [4, 6], [3, 5], [5, 6], [5, 1]], [[7, 3], [1, 3], [6, 1], [4, 3]], [4, 5]], [[[1, 3], [1, 6], [3, 4], [3, 7]], [[1, 5], [3, 5], [4, 6], [5, 6]], [[4, 5]]]], [[[[2, 7], [1, 2], [1, 5]], [[6, 1], [7, 5], [1, 2], [3, 1], [7, 2], [6, 5]], [1, 5]], [[[1, 3], [1, 6], [5, 6], [5, 7]], [], [[1, 2], [1, 5], [2, 7]]]], [[[[4, 3], [2, 7], [2, 4], [5, 7], [3, 2], [5, 1]], [[6, 3], [6, 7], [4, 2]], [7]], [[[3, 6], [6, 7]], [[1, 5], [2, 3], [2, 7], [3, 4], [5, 7]], [[2, 4]]]], [[[[2, 3], [1, 2]], [[7, 1]], [3, 7]], [[[1, 7]], [[1, 2], [2, 3]], []]]], [[[[[7, 5]], [[4, 1], [3, 3]], [6]], [[[1, 4]], [[5, 7]], []]], [[[[1, 3], [4, 7], [6, 5]], [[3, 1]], [5, 6, 3]], [[], [[4, 7]], [[1, 3], [5, 6]]]], [[[[1, 7], [3, 7], [1, 3]], [[3, 6], [5, 6], [2, 7]], [1, 2, 3, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 7], [3, 7]], [[1, 3]]]], [[[[1, 2]], [[2, 5], [3, 6], [1, 3]], [5]], [[[1, 3], [2, 5], [3, 6]], [[1, 2]], []]], [[[[4, 6], [1, 7], [2, 5]], [[7, 1], [7, 2]], [4, 7, 5]], [[[2, 7]], [[2, 5], [4, 6]], [[1, 7]]]], [[[[5, 4], [3, 5], [3, 2], [2, 7]], [[2, 1], [3, 6], [2, 2]], [3, 1, 5, 7]], [[[1, 2], [3, 6]], [[2, 3], [2, 7], [4, 5]], [[3, 5]]]], [[[[4, 1], [5, 3], [1, 4], [1, 2], [6, 2]], [[2, 7], [5, 3], [5, 6], [3, 6], [3, 6]], [6, 4, 5]], [[[2, 7], [3, 6], [5, 6]], [[1, 2], [1, 4], [2, 6]], [[3, 5]]]], [[[[5, 6], [5, 1], [2, 3]], [[5, 2], [7, 1], [7, 1], [4, 6]], [7]], [[[1, 7], [2, 5], [4, 6]], [[1, 5], [2, 3], [5, 6]], []]]], [[[[[5, 6], [1, 3], [4, 7], [3, 6], [7, 2], [5, 3]], [[5, 1], [4, 2], [4, 7], [1, 7]], [1, 5]], [[[1, 5], [1, 7], [2, 4]], [[1, 3], [2, 7], [3, 5], [3, 6], [5, 6]], [[4, 7]]]], [[[[7, 6], [6, 5], [6, 1], [6, 3], [3, 2]], [[1, 6], [1, 7], [2, 5], [1, 4]], []], [[[1, 4], [1, 7], [2, 5]], [[2, 3], [3, 6], [5, 6], [6, 7]], [[1, 6]]]], [[[[2, 4], [4, 5], [4, 6], [1, 5], [6, 7]], [[6, 5], [2, 1]], [6, 3, 2]], [[[1, 2], [5, 6]], [[1, 5], [2, 4], [4, 5], [4, 6], [6, 7]], []]], [[[[4, 2]], [[7, 5], [5, 3], [7, 3]], [4, 5, 2, 3]], [[[3, 5], [3, 7], [5, 7]], [], [[2, 4]]]], [[[[4, 7], [3, 7], [2, 5], [2, 4]], [[6, 4], [1, 4], [7, 1], [5, 2]], [1, 6, 3, 2]], [[[1, 4], [1, 7], [4, 6]], [[2, 4], [3, 7], [4, 7]], [[2, 5]]]], [[[[4, 6], [2, 3], [4, 6]], [[5, 1], [6, 5], [5, 2], [4, 4]], []], [[[1, 5], [2, 5], [5, 6]], [[2, 3], [4, 6]], []]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[7, 3], [6, 4]], [[1, 4], [4, 3], [2, 1], [4, 6], [3, 5]], [4, 7]], [[[1, 2], [1, 4], [3, 4], [3, 5]], [[3, 7]], [[4, 6]]]]], [[[[[2, 5], [1, 7]], [[5, 6], [3, 4]], [6, 5, 3, 1]], [[[3, 4], [5, 6]], [[1, 7], [2, 5]], []]], [[[[1, 3]], [[3, 5], [2, 1], [4, 5], [4, 5], [3, 6]], [6, 5, 2, 1]], [[[1, 2], [3, 5], [3, 6], [4, 5]], [[1, 3]], []]], [[[[7, 5], [4, 2], [1, 5]], [[4, 6], [1, 7], [3, 7], [4, 1], [4, 1], [3, 1]], [7]], [[[1, 3], [1, 4], [1, 7], [3, 7], [4, 6]], [[1, 5], [2, 4], [5, 7]], []]], [[[[5, 1], [7, 1], [5, 3], [6, 2], [7, 5]], [[3, 7], [4, 1], [5, 6], [4, 7]], [1, 6, 4, 5]], [[[1, 4], [3, 7], [4, 7], [5, 6]], [[1, 7], [2, 6], [3, 5], [5, 7]], [[1, 5]]]], [[[[7, 3], [4, 6], [3, 7], [7, 5], [4, 2]], [[2, 3], [1, 5], [6, 1], [7, 5], [4, 4]], [2, 6]], [[[1, 5], [1, 6], [2, 3]], [[2, 4], [3, 7], [4, 6]], [[5, 7]]]], [[[[3, 6], [3, 6]], [[4, 5], [2, 6], [5, 4], [3, 1]], []], [[[1, 3], [2, 6], [4, 5]], [[3, 6]], []]], [[[[5, 1], [2, 5], [5, 1], [6, 2], [6, 3], [6, 4]], [[5, 4], [4, 5], [2, 4], [7, 4], [4, 1], [4, 4]], [2, 3, 5, 4]], [[[1, 4], [2, 4], [4, 5], [4, 7]], [[1, 5], [2, 6], [3, 6], [4, 6]], [[2, 5]]]], [[[[2, 4], [3, 7], [2, 6]], [[3, 1], [3, 1], [2, 1], [3, 3]], [6, 1, 4, 7]], [[[1, 2], [1, 3]], [[2, 4], [2, 6], [3, 7]], []]]]]
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[[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []][[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]Passed
case 1[[[1, 4]], [[4, 6]], []][[[1, 4]], [[4, 6]], []]Passed
case 2[[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]][[[1, 4], [1, 7], [2, 3]], [[1, 6], [3, 5], [4, 6], [6, 7]], [[1, 3], [5, 6]]]Passed
case 3[[[2, 4], [5, 6]], [[3, 5], [3, 6]], []][[[2, 4], [5, 6]], [[3, 5], [3, 6]], []]Passed
case 4[[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]][[[1, 5], [2, 5]], [[2, 4]], [[4, 5], [4, 7]]]Passed
case 5[[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []][[[1, 7], [3, 5], [3, 6], [4, 5]], [[2, 6]], []]Passed
case 6[[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]][[[1, 2], [3, 6]], [[2, 4], [3, 4], [4, 6], [5, 7]], [[1, 3]]]Passed
case 7[[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []][[[1, 5], [2, 6], [4, 7], [5, 6]], [[1, 6], [3, 4]], []]Passed

SHA-256 / 5df61d474956f64ee00ec116644c9b9f38fd726e7a315dc3444f6e9fc03e77b5

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

Case digest / 447dcddc72986caf1e45aa498f4e90826f3b4e8418ddb94e3fc5ef40deb38fe0