FAILURE MAP
← Case archive

FA-70826 / GIS polygon topology / Open access

Missing node (T-junction) detection in a coverage: distinct vertex walk · case 01

The first vertex of a ring is reported twice.

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

ROOT CAUSE

The closing duplicate vertex is walked as a separate vertex.

VERIFIED REPAIR

At the distinct vertex walk step restore `for v in P[:-1]:`, leaving the rest of the model unchanged.

Unsuccessful approach: Dropping two positions skips the last distinct vertex.

Case contract

Input: polygons as closed integer rings forming a coverage. For each polygon i and each distinct vertex v (closing duplicate excluded), and each other polygon j, report [i, v, j] when v lies exactly on an edge of j (zero cross product, inside the closed segment box) but is not one of that edge endpoints. Return the reports sorted.

Why this case matters

Coverage cleaning requires shared boundaries to have identical vertices; T-junctions cause gaps after simplification and must be noded first.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    polys = x
    out = []
    for i, P in enumerate(polys):
        for v in P:
            for j, Q in enumerate(polys):
                if i == j:
                    continue
                for a, b in zip(Q, Q[1:]):
                    if v == a or v == b:
                        continue
                    cross = (b[0] - a[0]) * (v[1] - a[1]) - (b[1] - a[1]) * (v[0] - a[0])
                    if cross == 0 and min(a[0], b[0]) <= v[0] <= max(a[0], b[0]) and min(a[1], b[1]) <= v[1] <= max(a[1], b[1]):
                        out.append([i, list(v), j])
    return sorted(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #1', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]]], [[1, [4, 2], 0]]), ('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #3', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[0, 4], [4, 4], [4, 8], [0, 8], [0, 4]]], []), ('regression #4', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[2, 4], [6, 4], [6, 8], [2, 8], [2, 4]]], [[0, [4, 4], 1], [1, [2, 4], 0]]), ('regression #5', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[10, 2], [14, 2], [14, 6], [10, 2]]], [[0, [12, 4], 1], [1, [10, 2], 0]]), ('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], [])], [('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #4', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[2, 4], [6, 4], [6, 8], [2, 8], [2, 4]]], [[0, [4, 4], 1], [1, [2, 4], 0]]), ('regression #5', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[10, 2], [14, 2], [14, 6], [10, 2]]], [[0, [12, 4], 1], [1, [10, 2], 0]]), ('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], []), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], [])], [('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('regression #8', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[9, 2], [6, 2], [6, 4], [9, 2]]], [[1, [6, 2], 0], [1, [6, 4], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], []), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('regression #12', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 1], [8, 1], [8, 3], [4, 3], [4, 1]]], [[1, [4, 1], 0], [1, [4, 3], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], [])], [('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('regression #12', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 1], [8, 1], [8, 3], [4, 3], [4, 1]]], [[1, [4, 1], 0], [1, [4, 3], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], []), ('regression #14', [[[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]]], [[1, [2, 4], 0], [1, [6, 4], 0]]), ('regression #15', [[[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]], [[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[0, 8], [8, 8], [8, 12], [0, 12], [0, 8]]], [[0, [2, 4], 1], [0, [2, 8], 2], [0, [6, 4], 1], [0, [6, 8], 2]])], [('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #1', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]]], [[1, [4, 2], 0]]), ('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #3', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[0, 4], [4, 4], [4, 8], [0, 8], [0, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], []), ('regression #14', [[[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]]], [[1, [2, 4], 0], [1, [6, 4], 0]]), ('regression #15', [[[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]], [[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[0, 8], [8, 8], [8, 12], [0, 12], [0, 8]]], [[0, [2, 4], 1], [0, [2, 8], 2], [0, [6, 4], 1], [0, [6, 8], 2]])]]
for label, args, expected in fixtures[N-1]:
    check(label, 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
control #0[][]Passed
regression #1[[1, [4, 2], 0]][[1, [4, 2], 0]]Passed
regression #2[[0, [4, 2], 1]][[0, [4, 2], 1]]Passed
regression #3[][]Passed
regression #4[[0, [4, 4], 1], [1, [2, 4], 0], [1, [2, 4], 0]][[0, [4, 4], 1], [1, [2, 4], 0]]Failed
regression #5[[0, [12, 4], 1], [1, [10, 2], 0], [1, [10, 2], 0]][[0, [12, 4], 1], [1, [10, 2], 0]]Failed
regression #6[[1, [9, 1], 0], [1, [9, 1], 0]][[1, [9, 1], 0]]Failed
control #9[][]Passed

SHA-256 / 57ace488c5f1158cee53d19285beef0e6a82311687633c63de1374a1e869a20c

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    polys = x
    out = []
    for i, P in enumerate(polys):
        for v in P[:-2]:
            for j, Q in enumerate(polys):
                if i == j:
                    continue
                for a, b in zip(Q, Q[1:]):
                    if v == a or v == b:
                        continue
                    cross = (b[0] - a[0]) * (v[1] - a[1]) - (b[1] - a[1]) * (v[0] - a[0])
                    if cross == 0 and min(a[0], b[0]) <= v[0] <= max(a[0], b[0]) and min(a[1], b[1]) <= v[1] <= max(a[1], b[1]):
                        out.append([i, list(v), j])
    return sorted(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #1', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]]], [[1, [4, 2], 0]]), ('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #3', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[0, 4], [4, 4], [4, 8], [0, 8], [0, 4]]], []), ('regression #4', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[2, 4], [6, 4], [6, 8], [2, 8], [2, 4]]], [[0, [4, 4], 1], [1, [2, 4], 0]]), ('regression #5', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[10, 2], [14, 2], [14, 6], [10, 2]]], [[0, [12, 4], 1], [1, [10, 2], 0]]), ('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], [])], [('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #4', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[2, 4], [6, 4], [6, 8], [2, 8], [2, 4]]], [[0, [4, 4], 1], [1, [2, 4], 0]]), ('regression #5', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[10, 2], [14, 2], [14, 6], [10, 2]]], [[0, [12, 4], 1], [1, [10, 2], 0]]), ('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], []), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], [])], [('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('regression #8', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[9, 2], [6, 2], [6, 4], [9, 2]]], [[1, [6, 2], 0], [1, [6, 4], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], []), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('regression #12', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 1], [8, 1], [8, 3], [4, 3], [4, 1]]], [[1, [4, 1], 0], [1, [4, 3], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], [])], [('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('regression #12', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 1], [8, 1], [8, 3], [4, 3], [4, 1]]], [[1, [4, 1], 0], [1, [4, 3], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], []), ('regression #14', [[[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]]], [[1, [2, 4], 0], [1, [6, 4], 0]]), ('regression #15', [[[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]], [[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[0, 8], [8, 8], [8, 12], [0, 12], [0, 8]]], [[0, [2, 4], 1], [0, [2, 8], 2], [0, [6, 4], 1], [0, [6, 8], 2]])], [('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #1', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]]], [[1, [4, 2], 0]]), ('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #3', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[0, 4], [4, 4], [4, 8], [0, 8], [0, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], []), ('regression #14', [[[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]]], [[1, [2, 4], 0], [1, [6, 4], 0]]), ('regression #15', [[[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]], [[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[0, 8], [8, 8], [8, 12], [0, 12], [0, 8]]], [[0, [2, 4], 1], [0, [2, 8], 2], [0, [6, 4], 1], [0, [6, 8], 2]])]]
for label, args, expected in fixtures[N-1]:
    check(label, 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
control #0[][]Passed
regression #1[][[1, [4, 2], 0]]Failed
regression #2[][[0, [4, 2], 1]]Failed
regression #3[][]Passed
regression #4[[0, [4, 4], 1], [1, [2, 4], 0]][[0, [4, 4], 1], [1, [2, 4], 0]]Passed
regression #5[[0, [12, 4], 1], [1, [10, 2], 0]][[0, [12, 4], 1], [1, [10, 2], 0]]Passed
regression #6[[1, [9, 1], 0]][[1, [9, 1], 0]]Passed
control #9[][]Passed

SHA-256 / 0248a8abf6375bbf8d3e66ad0d58a8bb1d8e83b0ea5b7cd1842418a312137b09

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    polys = x
    out = []
    for i, P in enumerate(polys):
        for v in P[:-1]:
            for j, Q in enumerate(polys):
                if i == j:
                    continue
                for a, b in zip(Q, Q[1:]):
                    if v == a or v == b:
                        continue
                    cross = (b[0] - a[0]) * (v[1] - a[1]) - (b[1] - a[1]) * (v[0] - a[0])
                    if cross == 0 and min(a[0], b[0]) <= v[0] <= max(a[0], b[0]) and min(a[1], b[1]) <= v[1] <= max(a[1], b[1]):
                        out.append([i, list(v), j])
    return sorted(out)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #1', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]]], [[1, [4, 2], 0]]), ('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #3', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[0, 4], [4, 4], [4, 8], [0, 8], [0, 4]]], []), ('regression #4', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[2, 4], [6, 4], [6, 8], [2, 8], [2, 4]]], [[0, [4, 4], 1], [1, [2, 4], 0]]), ('regression #5', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[10, 2], [14, 2], [14, 6], [10, 2]]], [[0, [12, 4], 1], [1, [10, 2], 0]]), ('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], [])], [('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #4', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[2, 4], [6, 4], [6, 8], [2, 8], [2, 4]]], [[0, [4, 4], 1], [1, [2, 4], 0]]), ('regression #5', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[10, 2], [14, 2], [14, 6], [10, 2]]], [[0, [12, 4], 1], [1, [10, 2], 0]]), ('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], []), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], [])], [('regression #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 0]]), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('regression #8', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[9, 2], [6, 2], [6, 4], [9, 2]]], [[1, [6, 2], 0], [1, [6, 4], 0]]), ('control #9', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[10, 10], [12, 10], [12, 12], [10, 12], [10, 10]]], []), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('regression #12', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 1], [8, 1], [8, 3], [4, 3], [4, 1]]], [[1, [4, 1], 0], [1, [4, 3], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], [])], [('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #7', [[[0, 0], [6, 0], [6, 6], [0, 6], [0, 0]], [[6, 2], [9, 2], [9, 4], [6, 2]]], [[1, [6, 2], 0]]), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('regression #12', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 1], [8, 1], [8, 3], [4, 3], [4, 1]]], [[1, [4, 1], 0], [1, [4, 3], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], []), ('regression #14', [[[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]]], [[1, [2, 4], 0], [1, [6, 4], 0]]), ('regression #15', [[[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]], [[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[0, 8], [8, 8], [8, 12], [0, 12], [0, 8]]], [[0, [2, 4], 1], [0, [2, 8], 2], [0, [6, 4], 1], [0, [6, 8], 2]])], [('control #0', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]]], []), ('regression #1', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]]], [[1, [4, 2], 0]]), ('regression #2', [[[4, 0], [8, 0], [8, 4], [4, 4], [4, 2], [4, 0]], [[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]]], [[0, [4, 2], 1]]), ('regression #3', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[0, 4], [4, 4], [4, 8], [0, 8], [0, 4]]], []), ('regression #11', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[4, 4], [8, 0], [9, 9], [4, 4]]], [[0, [8, 8], 1], [1, [4, 4], 0]]), ('control #13', [[[0, 0], [4, 0], [4, 4], [0, 4], [0, 0]], [[4, 0], [8, 0], [8, 4], [4, 4], [4, 0]], [[8, 0], [12, 0], [12, 4], [8, 4], [8, 0]]], []), ('regression #14', [[[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]]], [[1, [2, 4], 0], [1, [6, 4], 0]]), ('regression #15', [[[6, 4], [6, 8], [2, 8], [2, 4], [6, 4]], [[0, 0], [8, 0], [8, 4], [0, 4], [0, 0]], [[0, 8], [8, 8], [8, 12], [0, 12], [0, 8]]], [[0, [2, 4], 1], [0, [2, 8], 2], [0, [6, 4], 1], [0, [6, 8], 2]])]]
for label, args, expected in fixtures[N-1]:
    check(label, 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
control #0[][]Passed
regression #1[[1, [4, 2], 0]][[1, [4, 2], 0]]Passed
regression #2[[0, [4, 2], 1]][[0, [4, 2], 1]]Passed
regression #3[][]Passed
regression #4[[0, [4, 4], 1], [1, [2, 4], 0]][[0, [4, 4], 1], [1, [2, 4], 0]]Passed
regression #5[[0, [12, 4], 1], [1, [10, 2], 0]][[0, [12, 4], 1], [1, [10, 2], 0]]Passed
regression #6[[1, [9, 1], 0]][[1, [9, 1], 0]]Passed
control #9[][]Passed

SHA-256 / c61dbdb9ff1fee9a11a1a8970eee8578795d345eb6754c4fcf7ae33905137566

Verification & scope

Stipulated deterministic toy contract on a bounded input domain; results are rounded as stated and no conformance with any published standard or library is claimed. 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:48:24.251867+00:00.

Case digest / e0b7ffd698420f097661eb01d79eb65acb9625ac1c86eb244d05c646cf4b9cd9