FAILURE MAP
← Case archive

FA-87546 / Collision detection broadphase / Open access

Pairs persist when either body is asleep · case 01

Contacts between a sleeping and a departing awake body never end.

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

ROOT CAUSE

The persistence test uses or.

VERIFIED REPAIR

Both bodies must be asleep for the pair to persist unreported.

Unsuccessful approach: Testing only the first body is order dependent.

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 = {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 or 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 = [[[[[[6, 3], [6, 5]], [[7, 2], [4, 1], [5, 6], [6, 7], [6, 6]], [7, 4, 6, 2]], [[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]]], [[[[5, 3], [5, 2], [4, 3], [6, 5], [5, 4], [1, 2]], [[7, 3], [4, 7], [4, 5]], [6, 5, 2, 4]], [[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]]], [[[[2, 6], [5, 7]], [[6, 7], [1, 2], [3, 6], [6, 1], [5, 6]], [3]], [[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []]], [[[[7, 5], [1, 6], [6, 3], [4, 6]], [[7, 3], [6, 2], [3, 2], [1, 3]], []], [[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []]], [[[[6, 2], [7, 5]], [[5, 7]], []], [[], [[2, 6]], [[5, 7]]]], [[[[1, 7], [6, 1], [1, 3], [5, 6]], [[2, 3], [2, 6], [5, 5]], [5, 3]], [[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7], [5, 6]], []]], [[[[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, 1], [7, 2], [5, 3], [3, 7], [7, 2], [4, 3]], [[3, 1], [2, 5]], [5, 2]], [[[1, 3], [2, 5]], [[1, 4], [2, 7], [3, 4], [3, 5], [3, 7]], []]]], [[[[[4, 1], [7, 2], [3, 4], [1, 2]], [[1, 4], [5, 3], [3, 1], [3, 7], [3, 5], [5, 3]], [3, 5]], [[[1, 3], [3, 5], [3, 7]], [[1, 2], [2, 7], [3, 4]], [[1, 4]]]], [[[[3, 2], [2, 3], [6, 2], [7, 2], [6, 2]], [[6, 7], [1, 7], [6, 1], [1, 7], [6, 7]], []], [[[1, 6], [1, 7], [6, 7]], [[2, 3], [2, 6], [2, 7]], []]], [[[[5, 7], [2, 6], [1, 2], [7, 1]], [[3, 1], [4, 3], [2, 4], [1, 1]], [4, 1, 6, 2]], [[[1, 3], [2, 4], [3, 4]], [[1, 7], [5, 7]], [[1, 2], [2, 6]]]], [[[[2, 6], [1, 4], [2, 3]], [[2, 4], [5, 2], [2, 3], [4, 7]], [2, 3, 4]], [[[2, 4], [2, 5], [4, 7]], [[1, 4], [2, 6]], [[2, 3]]]], [[[[3, 4], [4, 5], [7, 1], [1, 3]], [[1, 7], [6, 2], [6, 3], [5, 6], [7, 6], [1, 1]], [2, 3, 7, 4]], [[[2, 6], [3, 6], [5, 6], [6, 7]], [[1, 3], [4, 5]], [[1, 7], [3, 4]]]], [[[[5, 1], [1, 3], [1, 2], [7, 3], [1, 6]], [[5, 3], [4, 5], [3, 1]], []], [[[3, 5], [4, 5]], [[1, 2], [1, 5], [1, 6], [3, 7]], [[1, 3]]]], [[[[2, 1], [5, 1], [6, 4]], [[6, 2], [2, 6], [5, 4], [7, 5], [4, 4]], [1, 3, 2, 7]], [[[2, 6], [4, 5], [5, 7]], [[1, 5], [4, 6]], [[1, 2]]]], [[[[4, 1]], [[7, 1], [2, 1], [2, 4], [7, 1], [3, 6]], [3, 5]], [[[1, 2], [1, 7], [2, 4], [3, 6]], [[1, 4]], []]]], [[[[[7, 3], [1, 3], [4, 7]], [[4, 5], [2, 4]], [6, 5]], [[[2, 4], [4, 5]], [[1, 3], [3, 7], [4, 7]], []]], [[[[3, 2], [7, 2], [1, 7], [4, 6]], [[6, 4], [5, 1], [3, 6], [5, 7], [6, 3], [4, 2]], [4, 2, 7, 6]], [[[1, 5], [2, 4], [3, 6], [5, 7]], [[1, 7], [2, 3]], [[2, 7], [4, 6]]]], [[[[1, 3], [4, 6]], [[2, 1], [6, 4], [5, 6], [3, 7], [3, 6], [2, 5], [3, 3]], [5, 4, 7]], [[[1, 2], [2, 5], [3, 6], [3, 7], [5, 6]], [[1, 3]], [[4, 6]]]], [[[[1, 2], [5, 4], [5, 6]], [[3, 5], [1, 4], [5, 2], [6, 3], [3, 5], [5, 6]], [1]], [[[1, 4], [2, 5], [3, 5], [3, 6]], [[1, 2], [4, 5]], [[5, 6]]]], [[[[2, 3], [6, 7], [5, 6]], [[5, 6], [3, 2], [5, 7]], [3, 5, 7, 1]], [[[5, 7]], [[6, 7]], [[2, 3], [5, 6]]]], [[[[5, 4], [3, 5], [3, 4]], [[1, 2], [1, 1]], [2, 6]], [[[1, 2]], [[3, 4], [3, 5], [4, 5]], []]], [[[[2, 6], [7, 5], [7, 4]], [[4, 3], [5, 2], [2, 4], [7, 2], [4, 7]], [6]], [[[2, 4], [2, 5], [2, 7], [3, 4]], [[2, 6], [5, 7]], [[4, 7]]]], [[[[1, 2]], [[3, 5], [2, 3]], [1, 5, 4]], [[[2, 3], [3, 5]], [[1, 2]], []]]], [[[[[7, 4], [1, 5], [6, 7], [6, 5]], [[2, 3], [3, 4], [2, 4], [5, 4], [7, 2], [4, 5]], [4, 1, 7, 5]], [[[2, 3], [2, 4], [2, 7], [3, 4], [4, 5]], [[5, 6], [6, 7]], [[1, 5], [4, 7]]]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[4, 3], [5, 7], [3, 4], [2, 1], [2, 6], [3, 6]], [[6, 5], [1, 6], [6, 5]], [1, 5, 4, 6]], [[[1, 6], [5, 6]], [[1, 2], [2, 6], [3, 4], [3, 6], [5, 7]], []]], [[[[1, 2], [4, 3], [5, 2], [1, 7]], [[2, 1], [4, 2], [4, 3], [1, 2], [3, 5]], [3]], [[[2, 4], [3, 5]], [[1, 7], [2, 5]], [[1, 2], [3, 4]]]], [[[[2, 5], [4, 5], [3, 1], [6, 4], [1, 5]], [[1, 7], [3, 1], [3, 5], [1, 7], [7, 7]], [3]], [[[1, 7], [3, 5]], [[1, 5], [2, 5], [4, 5], [4, 6]], [[1, 3]]]], [[[[5, 4]], [[5, 1]], []], [[[1, 5]], [[4, 5]], []]], [[[[5, 1]], [[6, 1], [6, 3], [3, 1], [3, 2], [3, 4], [2, 1], [4, 4]], [7, 5]], [[[1, 2], [1, 3], [1, 6], [2, 3], [3, 4], [3, 6]], [[1, 5]], []]], [[[[3, 2], [3, 4], [6, 7], [4, 5], [2, 7], [5, 1]], [[7, 3], [1, 5], [5, 7]], [6, 2, 3]], [[[3, 7], [5, 7]], [[2, 7], [3, 4], [4, 5], [6, 7]], [[1, 5], [2, 3]]]]], [[[[[3, 6], [5, 7], [7, 3]], [[3, 2], [3, 3]], [6, 4, 1]], [[[2, 3]], [[3, 6], [3, 7], [5, 7]], []]], [[[[4, 3], [5, 6], [2, 3], [5, 3], [3, 7]], [[2, 5], [2, 4], [5, 2], [4, 2], [1, 6]], [2, 1, 6]], [[[1, 6], [2, 4], [2, 5]], [[2, 3], [3, 4], [3, 5], [3, 7], [5, 6]], []]], [[[[6, 5], [7, 5], [7, 6], [3, 2], [1, 2]], [[2, 5], [4, 2], [4, 5], [5, 6], [7, 6], [4, 4]], []], [[[2, 4], [2, 5], [4, 5]], [[1, 2], [2, 3], [5, 7]], [[5, 6], [6, 7]]]], [[[[3, 6], [4, 2], [1, 3], [1, 6], [5, 2]], [[1, 5]], [6, 5, 1, 2]], [[[1, 5]], [[1, 3], [2, 4], [3, 6]], [[1, 6], [2, 5]]]], [[[[7, 2], [2, 1], [4, 5], [5, 4], [1, 3], [2, 5]], [[3, 6]], []], [[[3, 6]], [[1, 2], [1, 3], [2, 5], [2, 7], [4, 5]], []]], [[[[5, 7], [7, 5], [1, 3], [2, 6], [5, 6]], [[7, 5], [6, 1], [2, 7], [4, 3], [5, 2]], [7, 2, 6, 5]], [[[1, 6], [2, 5], [2, 7], [3, 4]], [[1, 3]], [[2, 6], [5, 6], [5, 7]]]], [[[[6, 2], [6, 1], [1, 7], [6, 5], [1, 4], [1, 4]], [[6, 7], [3, 6], [6, 1], [5, 1], [3, 5], [1, 7]], [4, 6]], [[[1, 5], [3, 5], [3, 6], [6, 7]], [[1, 4], [2, 6], [5, 6]], [[1, 6], [1, 7]]]], [[[[6, 1], [2, 1], [5, 4], [4, 2], [6, 2], [5, 3]], [[3, 7], [1, 1]], [5]], [[[3, 7]], [[1, 2], [1, 6], [2, 4], [2, 6], [3, 5], [4, 5]], []]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
case 0[[[1, 4], [2, 7], [6, 7]], [], [[3, 6], [5, 6]]][[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]]Failed
case 1[[[3, 7], [4, 7]], [], [[1, 2], [2, 5], [3, 4], [3, 5], [4, 5], [5, 6]]][[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]]Failed
case 2[[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []][[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []]Passed
case 3[[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []][[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []]Passed
case 4[[], [[2, 6]], [[5, 7]]][[], [[2, 6]], [[5, 7]]]Passed
case 5[[[2, 3], [2, 6]], [[1, 6], [1, 7]], [[1, 3], [5, 6]]][[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7], [5, 6]], []]Failed
case 6[[[2, 7], [3, 7]], [], [[1, 2], [1, 7], [4, 5]]][[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]Failed
case 7[[[1, 3], [2, 5]], [[1, 4], [3, 4], [3, 7]], [[2, 7], [3, 5]]][[[1, 3], [2, 5]], [[1, 4], [2, 7], [3, 4], [3, 5], [3, 7]], []]Failed

SHA-256 / a4345b919df187589703f8ad5f8fb0724e1fa6417a738c2fe067992e251a3d90

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 = {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:
            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 = [[[[[[6, 3], [6, 5]], [[7, 2], [4, 1], [5, 6], [6, 7], [6, 6]], [7, 4, 6, 2]], [[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]]], [[[[5, 3], [5, 2], [4, 3], [6, 5], [5, 4], [1, 2]], [[7, 3], [4, 7], [4, 5]], [6, 5, 2, 4]], [[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]]], [[[[2, 6], [5, 7]], [[6, 7], [1, 2], [3, 6], [6, 1], [5, 6]], [3]], [[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []]], [[[[7, 5], [1, 6], [6, 3], [4, 6]], [[7, 3], [6, 2], [3, 2], [1, 3]], []], [[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []]], [[[[6, 2], [7, 5]], [[5, 7]], []], [[], [[2, 6]], [[5, 7]]]], [[[[1, 7], [6, 1], [1, 3], [5, 6]], [[2, 3], [2, 6], [5, 5]], [5, 3]], [[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7], [5, 6]], []]], [[[[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, 1], [7, 2], [5, 3], [3, 7], [7, 2], [4, 3]], [[3, 1], [2, 5]], [5, 2]], [[[1, 3], [2, 5]], [[1, 4], [2, 7], [3, 4], [3, 5], [3, 7]], []]]], [[[[[4, 1], [7, 2], [3, 4], [1, 2]], [[1, 4], [5, 3], [3, 1], [3, 7], [3, 5], [5, 3]], [3, 5]], [[[1, 3], [3, 5], [3, 7]], [[1, 2], [2, 7], [3, 4]], [[1, 4]]]], [[[[3, 2], [2, 3], [6, 2], [7, 2], [6, 2]], [[6, 7], [1, 7], [6, 1], [1, 7], [6, 7]], []], [[[1, 6], [1, 7], [6, 7]], [[2, 3], [2, 6], [2, 7]], []]], [[[[5, 7], [2, 6], [1, 2], [7, 1]], [[3, 1], [4, 3], [2, 4], [1, 1]], [4, 1, 6, 2]], [[[1, 3], [2, 4], [3, 4]], [[1, 7], [5, 7]], [[1, 2], [2, 6]]]], [[[[2, 6], [1, 4], [2, 3]], [[2, 4], [5, 2], [2, 3], [4, 7]], [2, 3, 4]], [[[2, 4], [2, 5], [4, 7]], [[1, 4], [2, 6]], [[2, 3]]]], [[[[3, 4], [4, 5], [7, 1], [1, 3]], [[1, 7], [6, 2], [6, 3], [5, 6], [7, 6], [1, 1]], [2, 3, 7, 4]], [[[2, 6], [3, 6], [5, 6], [6, 7]], [[1, 3], [4, 5]], [[1, 7], [3, 4]]]], [[[[5, 1], [1, 3], [1, 2], [7, 3], [1, 6]], [[5, 3], [4, 5], [3, 1]], []], [[[3, 5], [4, 5]], [[1, 2], [1, 5], [1, 6], [3, 7]], [[1, 3]]]], [[[[2, 1], [5, 1], [6, 4]], [[6, 2], [2, 6], [5, 4], [7, 5], [4, 4]], [1, 3, 2, 7]], [[[2, 6], [4, 5], [5, 7]], [[1, 5], [4, 6]], [[1, 2]]]], [[[[4, 1]], [[7, 1], [2, 1], [2, 4], [7, 1], [3, 6]], [3, 5]], [[[1, 2], [1, 7], [2, 4], [3, 6]], [[1, 4]], []]]], [[[[[7, 3], [1, 3], [4, 7]], [[4, 5], [2, 4]], [6, 5]], [[[2, 4], [4, 5]], [[1, 3], [3, 7], [4, 7]], []]], [[[[3, 2], [7, 2], [1, 7], [4, 6]], [[6, 4], [5, 1], [3, 6], [5, 7], [6, 3], [4, 2]], [4, 2, 7, 6]], [[[1, 5], [2, 4], [3, 6], [5, 7]], [[1, 7], [2, 3]], [[2, 7], [4, 6]]]], [[[[1, 3], [4, 6]], [[2, 1], [6, 4], [5, 6], [3, 7], [3, 6], [2, 5], [3, 3]], [5, 4, 7]], [[[1, 2], [2, 5], [3, 6], [3, 7], [5, 6]], [[1, 3]], [[4, 6]]]], [[[[1, 2], [5, 4], [5, 6]], [[3, 5], [1, 4], [5, 2], [6, 3], [3, 5], [5, 6]], [1]], [[[1, 4], [2, 5], [3, 5], [3, 6]], [[1, 2], [4, 5]], [[5, 6]]]], [[[[2, 3], [6, 7], [5, 6]], [[5, 6], [3, 2], [5, 7]], [3, 5, 7, 1]], [[[5, 7]], [[6, 7]], [[2, 3], [5, 6]]]], [[[[5, 4], [3, 5], [3, 4]], [[1, 2], [1, 1]], [2, 6]], [[[1, 2]], [[3, 4], [3, 5], [4, 5]], []]], [[[[2, 6], [7, 5], [7, 4]], [[4, 3], [5, 2], [2, 4], [7, 2], [4, 7]], [6]], [[[2, 4], [2, 5], [2, 7], [3, 4]], [[2, 6], [5, 7]], [[4, 7]]]], [[[[1, 2]], [[3, 5], [2, 3]], [1, 5, 4]], [[[2, 3], [3, 5]], [[1, 2]], []]]], [[[[[7, 4], [1, 5], [6, 7], [6, 5]], [[2, 3], [3, 4], [2, 4], [5, 4], [7, 2], [4, 5]], [4, 1, 7, 5]], [[[2, 3], [2, 4], [2, 7], [3, 4], [4, 5]], [[5, 6], [6, 7]], [[1, 5], [4, 7]]]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[4, 3], [5, 7], [3, 4], [2, 1], [2, 6], [3, 6]], [[6, 5], [1, 6], [6, 5]], [1, 5, 4, 6]], [[[1, 6], [5, 6]], [[1, 2], [2, 6], [3, 4], [3, 6], [5, 7]], []]], [[[[1, 2], [4, 3], [5, 2], [1, 7]], [[2, 1], [4, 2], [4, 3], [1, 2], [3, 5]], [3]], [[[2, 4], [3, 5]], [[1, 7], [2, 5]], [[1, 2], [3, 4]]]], [[[[2, 5], [4, 5], [3, 1], [6, 4], [1, 5]], [[1, 7], [3, 1], [3, 5], [1, 7], [7, 7]], [3]], [[[1, 7], [3, 5]], [[1, 5], [2, 5], [4, 5], [4, 6]], [[1, 3]]]], [[[[5, 4]], [[5, 1]], []], [[[1, 5]], [[4, 5]], []]], [[[[5, 1]], [[6, 1], [6, 3], [3, 1], [3, 2], [3, 4], [2, 1], [4, 4]], [7, 5]], [[[1, 2], [1, 3], [1, 6], [2, 3], [3, 4], [3, 6]], [[1, 5]], []]], [[[[3, 2], [3, 4], [6, 7], [4, 5], [2, 7], [5, 1]], [[7, 3], [1, 5], [5, 7]], [6, 2, 3]], [[[3, 7], [5, 7]], [[2, 7], [3, 4], [4, 5], [6, 7]], [[1, 5], [2, 3]]]]], [[[[[3, 6], [5, 7], [7, 3]], [[3, 2], [3, 3]], [6, 4, 1]], [[[2, 3]], [[3, 6], [3, 7], [5, 7]], []]], [[[[4, 3], [5, 6], [2, 3], [5, 3], [3, 7]], [[2, 5], [2, 4], [5, 2], [4, 2], [1, 6]], [2, 1, 6]], [[[1, 6], [2, 4], [2, 5]], [[2, 3], [3, 4], [3, 5], [3, 7], [5, 6]], []]], [[[[6, 5], [7, 5], [7, 6], [3, 2], [1, 2]], [[2, 5], [4, 2], [4, 5], [5, 6], [7, 6], [4, 4]], []], [[[2, 4], [2, 5], [4, 5]], [[1, 2], [2, 3], [5, 7]], [[5, 6], [6, 7]]]], [[[[3, 6], [4, 2], [1, 3], [1, 6], [5, 2]], [[1, 5]], [6, 5, 1, 2]], [[[1, 5]], [[1, 3], [2, 4], [3, 6]], [[1, 6], [2, 5]]]], [[[[7, 2], [2, 1], [4, 5], [5, 4], [1, 3], [2, 5]], [[3, 6]], []], [[[3, 6]], [[1, 2], [1, 3], [2, 5], [2, 7], [4, 5]], []]], [[[[5, 7], [7, 5], [1, 3], [2, 6], [5, 6]], [[7, 5], [6, 1], [2, 7], [4, 3], [5, 2]], [7, 2, 6, 5]], [[[1, 6], [2, 5], [2, 7], [3, 4]], [[1, 3]], [[2, 6], [5, 6], [5, 7]]]], [[[[6, 2], [6, 1], [1, 7], [6, 5], [1, 4], [1, 4]], [[6, 7], [3, 6], [6, 1], [5, 1], [3, 5], [1, 7]], [4, 6]], [[[1, 5], [3, 5], [3, 6], [6, 7]], [[1, 4], [2, 6], [5, 6]], [[1, 6], [1, 7]]]], [[[[6, 1], [2, 1], [5, 4], [4, 2], [6, 2], [5, 3]], [[3, 7], [1, 1]], [5]], [[[3, 7]], [[1, 2], [1, 6], [2, 4], [2, 6], [3, 5], [4, 5]], []]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
case 0[[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]][[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]]Passed
case 1[[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]][[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]]Passed
case 2[[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []][[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []]Passed
case 3[[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []][[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []]Passed
case 4[[], [[2, 6]], [[5, 7]]][[], [[2, 6]], [[5, 7]]]Passed
case 5[[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7]], [[5, 6]]][[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7], [5, 6]], []]Failed
case 6[[[2, 7], [3, 7]], [[1, 2], [1, 7]], [[4, 5]]][[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]Failed
case 7[[[1, 3], [2, 5]], [[1, 4], [3, 4], [3, 5], [3, 7]], [[2, 7]]][[[1, 3], [2, 5]], [[1, 4], [2, 7], [3, 4], [3, 5], [3, 7]], []]Failed

SHA-256 / 7ab4e5c713ed176e5025116b072f00808ddfe71e4f0c56b55f286f2ad7bb62ce

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 = [[[[[[6, 3], [6, 5]], [[7, 2], [4, 1], [5, 6], [6, 7], [6, 6]], [7, 4, 6, 2]], [[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]]], [[[[5, 3], [5, 2], [4, 3], [6, 5], [5, 4], [1, 2]], [[7, 3], [4, 7], [4, 5]], [6, 5, 2, 4]], [[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]]], [[[[2, 6], [5, 7]], [[6, 7], [1, 2], [3, 6], [6, 1], [5, 6]], [3]], [[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []]], [[[[7, 5], [1, 6], [6, 3], [4, 6]], [[7, 3], [6, 2], [3, 2], [1, 3]], []], [[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []]], [[[[6, 2], [7, 5]], [[5, 7]], []], [[], [[2, 6]], [[5, 7]]]], [[[[1, 7], [6, 1], [1, 3], [5, 6]], [[2, 3], [2, 6], [5, 5]], [5, 3]], [[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7], [5, 6]], []]], [[[[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, 1], [7, 2], [5, 3], [3, 7], [7, 2], [4, 3]], [[3, 1], [2, 5]], [5, 2]], [[[1, 3], [2, 5]], [[1, 4], [2, 7], [3, 4], [3, 5], [3, 7]], []]]], [[[[[4, 1], [7, 2], [3, 4], [1, 2]], [[1, 4], [5, 3], [3, 1], [3, 7], [3, 5], [5, 3]], [3, 5]], [[[1, 3], [3, 5], [3, 7]], [[1, 2], [2, 7], [3, 4]], [[1, 4]]]], [[[[3, 2], [2, 3], [6, 2], [7, 2], [6, 2]], [[6, 7], [1, 7], [6, 1], [1, 7], [6, 7]], []], [[[1, 6], [1, 7], [6, 7]], [[2, 3], [2, 6], [2, 7]], []]], [[[[5, 7], [2, 6], [1, 2], [7, 1]], [[3, 1], [4, 3], [2, 4], [1, 1]], [4, 1, 6, 2]], [[[1, 3], [2, 4], [3, 4]], [[1, 7], [5, 7]], [[1, 2], [2, 6]]]], [[[[2, 6], [1, 4], [2, 3]], [[2, 4], [5, 2], [2, 3], [4, 7]], [2, 3, 4]], [[[2, 4], [2, 5], [4, 7]], [[1, 4], [2, 6]], [[2, 3]]]], [[[[3, 4], [4, 5], [7, 1], [1, 3]], [[1, 7], [6, 2], [6, 3], [5, 6], [7, 6], [1, 1]], [2, 3, 7, 4]], [[[2, 6], [3, 6], [5, 6], [6, 7]], [[1, 3], [4, 5]], [[1, 7], [3, 4]]]], [[[[5, 1], [1, 3], [1, 2], [7, 3], [1, 6]], [[5, 3], [4, 5], [3, 1]], []], [[[3, 5], [4, 5]], [[1, 2], [1, 5], [1, 6], [3, 7]], [[1, 3]]]], [[[[2, 1], [5, 1], [6, 4]], [[6, 2], [2, 6], [5, 4], [7, 5], [4, 4]], [1, 3, 2, 7]], [[[2, 6], [4, 5], [5, 7]], [[1, 5], [4, 6]], [[1, 2]]]], [[[[4, 1]], [[7, 1], [2, 1], [2, 4], [7, 1], [3, 6]], [3, 5]], [[[1, 2], [1, 7], [2, 4], [3, 6]], [[1, 4]], []]]], [[[[[7, 3], [1, 3], [4, 7]], [[4, 5], [2, 4]], [6, 5]], [[[2, 4], [4, 5]], [[1, 3], [3, 7], [4, 7]], []]], [[[[3, 2], [7, 2], [1, 7], [4, 6]], [[6, 4], [5, 1], [3, 6], [5, 7], [6, 3], [4, 2]], [4, 2, 7, 6]], [[[1, 5], [2, 4], [3, 6], [5, 7]], [[1, 7], [2, 3]], [[2, 7], [4, 6]]]], [[[[1, 3], [4, 6]], [[2, 1], [6, 4], [5, 6], [3, 7], [3, 6], [2, 5], [3, 3]], [5, 4, 7]], [[[1, 2], [2, 5], [3, 6], [3, 7], [5, 6]], [[1, 3]], [[4, 6]]]], [[[[1, 2], [5, 4], [5, 6]], [[3, 5], [1, 4], [5, 2], [6, 3], [3, 5], [5, 6]], [1]], [[[1, 4], [2, 5], [3, 5], [3, 6]], [[1, 2], [4, 5]], [[5, 6]]]], [[[[2, 3], [6, 7], [5, 6]], [[5, 6], [3, 2], [5, 7]], [3, 5, 7, 1]], [[[5, 7]], [[6, 7]], [[2, 3], [5, 6]]]], [[[[5, 4], [3, 5], [3, 4]], [[1, 2], [1, 1]], [2, 6]], [[[1, 2]], [[3, 4], [3, 5], [4, 5]], []]], [[[[2, 6], [7, 5], [7, 4]], [[4, 3], [5, 2], [2, 4], [7, 2], [4, 7]], [6]], [[[2, 4], [2, 5], [2, 7], [3, 4]], [[2, 6], [5, 7]], [[4, 7]]]], [[[[1, 2]], [[3, 5], [2, 3]], [1, 5, 4]], [[[2, 3], [3, 5]], [[1, 2]], []]]], [[[[[7, 4], [1, 5], [6, 7], [6, 5]], [[2, 3], [3, 4], [2, 4], [5, 4], [7, 2], [4, 5]], [4, 1, 7, 5]], [[[2, 3], [2, 4], [2, 7], [3, 4], [4, 5]], [[5, 6], [6, 7]], [[1, 5], [4, 7]]]], [[[[3, 5]], [[7, 3], [1, 4]], [1, 6, 3, 2]], [[[1, 4], [3, 7]], [[3, 5]], []]], [[[[4, 3], [5, 7], [3, 4], [2, 1], [2, 6], [3, 6]], [[6, 5], [1, 6], [6, 5]], [1, 5, 4, 6]], [[[1, 6], [5, 6]], [[1, 2], [2, 6], [3, 4], [3, 6], [5, 7]], []]], [[[[1, 2], [4, 3], [5, 2], [1, 7]], [[2, 1], [4, 2], [4, 3], [1, 2], [3, 5]], [3]], [[[2, 4], [3, 5]], [[1, 7], [2, 5]], [[1, 2], [3, 4]]]], [[[[2, 5], [4, 5], [3, 1], [6, 4], [1, 5]], [[1, 7], [3, 1], [3, 5], [1, 7], [7, 7]], [3]], [[[1, 7], [3, 5]], [[1, 5], [2, 5], [4, 5], [4, 6]], [[1, 3]]]], [[[[5, 4]], [[5, 1]], []], [[[1, 5]], [[4, 5]], []]], [[[[5, 1]], [[6, 1], [6, 3], [3, 1], [3, 2], [3, 4], [2, 1], [4, 4]], [7, 5]], [[[1, 2], [1, 3], [1, 6], [2, 3], [3, 4], [3, 6]], [[1, 5]], []]], [[[[3, 2], [3, 4], [6, 7], [4, 5], [2, 7], [5, 1]], [[7, 3], [1, 5], [5, 7]], [6, 2, 3]], [[[3, 7], [5, 7]], [[2, 7], [3, 4], [4, 5], [6, 7]], [[1, 5], [2, 3]]]]], [[[[[3, 6], [5, 7], [7, 3]], [[3, 2], [3, 3]], [6, 4, 1]], [[[2, 3]], [[3, 6], [3, 7], [5, 7]], []]], [[[[4, 3], [5, 6], [2, 3], [5, 3], [3, 7]], [[2, 5], [2, 4], [5, 2], [4, 2], [1, 6]], [2, 1, 6]], [[[1, 6], [2, 4], [2, 5]], [[2, 3], [3, 4], [3, 5], [3, 7], [5, 6]], []]], [[[[6, 5], [7, 5], [7, 6], [3, 2], [1, 2]], [[2, 5], [4, 2], [4, 5], [5, 6], [7, 6], [4, 4]], []], [[[2, 4], [2, 5], [4, 5]], [[1, 2], [2, 3], [5, 7]], [[5, 6], [6, 7]]]], [[[[3, 6], [4, 2], [1, 3], [1, 6], [5, 2]], [[1, 5]], [6, 5, 1, 2]], [[[1, 5]], [[1, 3], [2, 4], [3, 6]], [[1, 6], [2, 5]]]], [[[[7, 2], [2, 1], [4, 5], [5, 4], [1, 3], [2, 5]], [[3, 6]], []], [[[3, 6]], [[1, 2], [1, 3], [2, 5], [2, 7], [4, 5]], []]], [[[[5, 7], [7, 5], [1, 3], [2, 6], [5, 6]], [[7, 5], [6, 1], [2, 7], [4, 3], [5, 2]], [7, 2, 6, 5]], [[[1, 6], [2, 5], [2, 7], [3, 4]], [[1, 3]], [[2, 6], [5, 6], [5, 7]]]], [[[[6, 2], [6, 1], [1, 7], [6, 5], [1, 4], [1, 4]], [[6, 7], [3, 6], [6, 1], [5, 1], [3, 5], [1, 7]], [4, 6]], [[[1, 5], [3, 5], [3, 6], [6, 7]], [[1, 4], [2, 6], [5, 6]], [[1, 6], [1, 7]]]], [[[[6, 1], [2, 1], [5, 4], [4, 2], [6, 2], [5, 3]], [[3, 7], [1, 1]], [5]], [[[3, 7]], [[1, 2], [1, 6], [2, 4], [2, 6], [3, 5], [4, 5]], []]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("case %d" % i, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
case 0[[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]][[[1, 4], [2, 7], [6, 7]], [[3, 6]], [[5, 6]]]Passed
case 1[[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]][[[3, 7], [4, 7]], [[1, 2], [3, 4], [3, 5]], [[2, 5], [4, 5], [5, 6]]]Passed
case 2[[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []][[[1, 2], [1, 6], [3, 6], [5, 6], [6, 7]], [[2, 6], [5, 7]], []]Passed
case 3[[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []][[[1, 3], [2, 3], [2, 6], [3, 7]], [[1, 6], [3, 6], [4, 6], [5, 7]], []]Passed
case 4[[], [[2, 6]], [[5, 7]]][[], [[2, 6]], [[5, 7]]]Passed
case 5[[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7], [5, 6]], []][[[2, 3], [2, 6]], [[1, 3], [1, 6], [1, 7], [5, 6]], []]Passed
case 6[[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []][[[2, 7], [3, 7]], [[1, 2], [1, 7], [4, 5]], []]Passed
case 7[[[1, 3], [2, 5]], [[1, 4], [2, 7], [3, 4], [3, 5], [3, 7]], []][[[1, 3], [2, 5]], [[1, 4], [2, 7], [3, 4], [3, 5], [3, 7]], []]Passed

SHA-256 / b7cf8f171df296f4296c0d04115a4f754747865fcbcd23cba6816eea76bec88b

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

Case digest / 0bb9b582c71218436af671b3b458d00293957ce0a4bf17cd0aa8878f0357bbca