FAILURE MAP
← Case archive

FA-70801 / GIS polygon topology / Open access

Iterative removal of backtracking spikes: repeat until stable · case 01

Nested spikes are only partly removed.

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

ROOT CAUSE

Only one deletion pass is made, leaving the stub of a nested spike.

VERIFIED REPAIR

At the repeat until stable step restore `while changed and len(pts) >= 3:`, leaving the rest of the model unchanged.

Unsuccessful approach: Two passes remove two-level spikes but not deeper ones.

Case contract

Input: a closed ring of integer vertices. Working on the open vertex cycle, repeatedly delete a vertex whose cyclic predecessor equals its cyclic successor (an exact out-and-back spike) or which equals its predecessor, until no such vertex remains or fewer than 3 vertices are left. Collinear pass-through vertices and partial backtracks are kept. Return None if fewer than 3 vertices remain, else the cycle closed with its first vertex.

Why this case matters

Digitising and snapping leave out-and-back spikes; cleaning must remove nested spikes, including those at the ring start, without changing genuine shape.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    pts = x[:-1]
    changed = True
    for _ in range(1):
        changed = False
        n = len(pts)
        for i in range(n):
            if pts[i - 1] == pts[(i + 1) % n] or pts[i] == pts[i - 1]:
                del pts[i]
                changed = True
                break
    if len(pts) < 3:
        return None
    return pts + [pts[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #1', [[0, 0], [10, 0], [10, 10], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None)], [('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None), ('regression #9', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None), ('regression #9', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]]), ('control #10', [[0, 0], [4, 0], [4, 4], [0, 0]], [[0, 0], [4, 0], [4, 4], [0, 0]]), ('regression #11', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 12], [0, 8], [0, 0]], [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0]]), ('regression #12', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('regression #11', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 12], [0, 8], [0, 0]], [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0]]), ('regression #12', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #1', [[0, 0], [10, 0], [10, 10], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None)]]
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[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #1[[0, 0], [10, 0], [10, 10], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Failed
regression #2[[0, 0], [10, 0], [10, 10], [12, 12], [12, 12], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Failed
regression #3[[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, 0]][[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]Failed
regression #4[[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, 0]][[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]Failed
control #5[[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #6[[0, 0], [10, 0], [10, 10], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Failed
boundary #7NoneNonePassed

SHA-256 / aff54f49cf96d47a7a2acd551a7d4d3f1da696153443e54119bc8f8d683e2011

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    pts = x[:-1]
    changed = True
    for _ in range(2):
        changed = False
        n = len(pts)
        for i in range(n):
            if pts[i - 1] == pts[(i + 1) % n] or pts[i] == pts[i - 1]:
                del pts[i]
                changed = True
                break
    if len(pts) < 3:
        return None
    return pts + [pts[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #1', [[0, 0], [10, 0], [10, 10], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None)], [('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None), ('regression #9', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None), ('regression #9', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]]), ('control #10', [[0, 0], [4, 0], [4, 4], [0, 0]], [[0, 0], [4, 0], [4, 4], [0, 0]]), ('regression #11', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 12], [0, 8], [0, 0]], [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0]]), ('regression #12', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('regression #11', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 12], [0, 8], [0, 0]], [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0]]), ('regression #12', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #1', [[0, 0], [10, 0], [10, 10], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None)]]
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[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #1[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #2[[0, 0], [10, 0], [10, 10], [12, 12], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Failed
regression #3[[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]][[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]Passed
regression #4[[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]][[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]Passed
control #5[[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #6[[0, 0], [10, 0], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Failed
boundary #7NoneNonePassed

SHA-256 / cb0b8a75f3e9f194ab189ad1d4ed2695df232bed84e973136bd0c9c8506b26f9

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    pts = x[:-1]
    changed = True
    while changed and len(pts) >= 3:
        changed = False
        n = len(pts)
        for i in range(n):
            if pts[i - 1] == pts[(i + 1) % n] or pts[i] == pts[i - 1]:
                del pts[i]
                changed = True
                break
    if len(pts) < 3:
        return None
    return pts + [pts[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #1', [[0, 0], [10, 0], [10, 10], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None)], [('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None), ('regression #9', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None), ('regression #9', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]]), ('control #10', [[0, 0], [4, 0], [4, 4], [0, 0]], [[0, 0], [4, 0], [4, 4], [0, 0]]), ('regression #11', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 12], [0, 8], [0, 0]], [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0]]), ('regression #12', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('regression #11', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 12], [0, 8], [0, 0]], [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0]]), ('regression #12', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]]), ('regression #13', [[0, 0], [8, 0], [8, 8], [0, 8], [0, 0], [-3, 0], [-5, 0], [-3, 0], [0, 0]], [[8, 0], [8, 8], [0, 8], [0, 0], [8, 0]])], [('control #0', [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #1', [[0, 0], [10, 0], [10, 10], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #2', [[0, 0], [10, 0], [10, 10], [12, 12], [14, 14], [12, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #3', [[5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3], [5, 0]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('regression #4', [[5, -3], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [5, -3]], [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]), ('control #5', [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('regression #6', [[0, 0], [10, 0], [10, 10], [10, 14], [10, 10], [10, 12], [10, 10], [0, 10], [0, 0]], [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None)]]
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[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #1[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #2[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #3[[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]][[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]Passed
regression #4[[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]][[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]]Passed
control #5[[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
regression #6[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]][[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]Passed
boundary #7NoneNonePassed

SHA-256 / 287c3716449ec2c580614e4a3ff0c3352a618f0dc3dc1911c3a4a1a1873f330b

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

Case digest / 4d9dd3cfdd8adb529dae1a1b6864343493eef593262213a95291d5ede817aaa4