FAILURE MAP
← Case archive

FA-70831 / GIS polygon topology / Open access

Missing node (T-junction) detection in a coverage: collinearity requirement · case 01

Vertices merely inside the bounding box of a diagonal edge are reported.

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

ROOT CAUSE

Only the segment bounding box is tested, not collinearity.

VERIFIED REPAIR

At the collinearity requirement step restore `if cross == 0 and`, leaving the rest of the model unchanged.

Unsuccessful approach: A cross-product tolerance of 1 flags near-miss vertices on integer grids.

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[:-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 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]]), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], [])], [('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]]), ('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 #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 #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 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 #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 #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[[0, [8, 4], 1], [1, [9, 1], 0]][[1, [9, 1], 0]]Failed
regression #10[[0, [8, 8], 1], [1, [3, 4], 0]][]Failed

SHA-256 / a78f169355fce3d5df926ca692434dbc78acf843ad9669ac43f5f97f00a1dba5

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[:-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 abs(cross) <= 1 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]]), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], [])], [('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]]), ('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 #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 #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 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 #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 #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
regression #10[[0, [8, 8], 1]][]Failed

SHA-256 / 44d7abe7797f6d4f3a8d6f781aed26cc0c140d10765989879a172e812ed32ffd

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]]), ('regression #10', [[[0, 0], [8, 8], [0, 8], [0, 0]], [[3, 4], [9, 1], [9, 9], [3, 4]]], [])], [('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]]), ('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 #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 #6', [[[8, 0], [12, 4], [8, 4], [8, 0]], [[9, 1], [9, 6], [5, 6], [9, 1]]], [[1, [9, 1], 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 #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 #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
regression #10[][]Passed

SHA-256 / a85ceac686cce2332a44c35debb0fe2e8d97bb5c7f0688f1fe67f6ce32bffbf3

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

Case digest / b3fa71bfd80399297974cc298163fe927edd87a0a7ac0667184cf4aa9bd3d1b7