FA-70806 / GIS polygon topology / Open access
Iterative removal of backtracking spikes: spike predicate · case 01
Straight-through vertices are deleted as if they were spikes.
ROOT CAUSE
Any collinear vertex is treated as a spike.
VERIFIED REPAIR
At the spike predicate step restore `if pts[i - 1] == pts[(i + 1) % n] or`, leaving the rest of the model unchanged.
Unsuccessful approach: Deleting collinear reversals also removes partial backtracks that the contract keeps.
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
while changed and len(pts) >= 3:
changed = False
n = len(pts)
for i in range(n):
if (pts[i][0] - pts[i - 1][0]) * (pts[(i + 1) % n][1] - pts[i][1]) - (pts[i][1] - pts[i - 1][1]) * (pts[(i + 1) % n][0] - pts[i][0]) == 0 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]]), ('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 #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), ('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]])], [('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), ('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 #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 #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 #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]]), ('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]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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], [10, 0]] | [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]] | Failed |
| regression #4 | [[10, 0], [10, 10], [0, 10], [0, 0], [10, 0]] | [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]] | Failed |
| control #5 | [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]] | [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]] | Failed |
| regression #6 | [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]] | [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]] | Passed |
| regression #9 | [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]] | [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]] | Failed |
SHA-256 / 1a97955cc905186991f57f2acae74a89b3fa51e920f24b98dc979515459c90f0
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
while changed and len(pts) >= 3:
changed = False
n = len(pts)
for i in range(n):
if (pts[i][0] - pts[i - 1][0]) * (pts[(i + 1) % n][1] - pts[i][1]) - (pts[i][1] - pts[i - 1][1]) * (pts[(i + 1) % n][0] - pts[i][0]) == 0 and (pts[i][0] - pts[i - 1][0]) * (pts[(i + 1) % n][0] - pts[i][0]) + (pts[i][1] - pts[i - 1][1]) * (pts[(i + 1) % n][1] - pts[i][1]) < 0 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]]), ('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 #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), ('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]])], [('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), ('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 #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 #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 #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]]), ('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]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 |
| regression #9 | [[0, 0], [10, 0], [10, 8], [10, 10], [0, 10], [0, 0]] | [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]] | Failed |
SHA-256 / 6bb5d78a4d1b237ca474053627b319ab4668d2e69a6330d99e60d819568a0067
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]]), ('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 #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), ('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]])], [('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), ('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 #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 #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 #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]]), ('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]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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 |
| 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]] | Passed |
SHA-256 / b804f6c5d3d42a855914b1e157daf6cd5bd47ac86a8adc498653af2bba0dc912
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.122043+00:00.
Case digest / 8837f9b5f52958662dc3044a805ab6b2d646aa07a459e95c7c620bd18d5519b9