{"abstract":"Vertices that overshoot the end of the base segment are dropped as if they lay on it.","category":"GIS polygon topology","checks":8,"contract":"Input [points, tol]: an arc as integer [x, y] positions (possibly closed, first == last). Keep both endpoints; recursively (explicit stack) find the interior vertex farthest from the SEGMENT between the current endpoints (projection clamped to the segment; distance to the point itself if the endpoints coincide), taking the first maximum; keep it and split when that distance is strictly greater than tol. Return kept positions in order.","evaluation_group":"w2-gis-polygon-topology-douglas-peucker-arc","failed_approach":"Clamping only the lower end still measures overshoot beyond the far endpoint to the line.","family":"w2-gis-polygon-topology-douglas-peucker-arc-segment-projection-clamp","id":"FA-70586","implementations":{"attempt":{"sha256":"106c9bd6744c2af8674e7a2eba52ee6ade028895e63fd392d9906677315d8dac","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts, tol = x\n    def dist(p, a, b):\n        dx, dy = b[0] - a[0], b[1] - a[1]\n        if dx == 0 and dy == 0:\n            return math.hypot(p[0] - a[0], p[1] - a[1])\n        t = ((p[0] - a[0]) * dx + (p[1] - a[1]) * dy) / (dx * dx + dy * dy)\n        t = max(0.0, t)\n        return math.hypot(p[0] - a[0] - t * dx, p[1] - a[1] - t * dy)\n    keep = [False] * len(pts)\n    keep[0] = keep[-1] = True\n    stack = [(0, len(pts) - 1)]\n    while stack:\n        i, j = stack.pop()\n        best, idx = -1.0, -1\n        for k in range(i + 1, j):\n            d = dist(pts[k], pts[i], pts[j])\n            if d > best:\n                best, idx = d, k\n        if idx != -1 and best > tol:\n            keep[idx] = True\n            stack.append((i, idx))\n            stack.append((idx, j))\n    return [p for p, f in zip(pts, keep) if f]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [[[0, 0], [3, 1], [6, -1], [9, 1], [12, 1], [15, 4], [18, 1], [21, -2], [24, 1]], 2], [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]]), ('control #1', [[[0, 3], [3, -4], [6, 1], [9, 3], [12, -4], [15, 1], [18, -1]], 1], [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]]), ('control #2', [[[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], 0], [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]]), ('control #3', [[[0, -3], [3, -1], [6, -3], [9, -2]], 3], [[0, -3], [9, -2]]), ('control #4', [[[0, -2], [3, -4], [6, -1], [9, -4], [12, 1], [15, 2]], 3], [[0, -2], [9, -4], [15, 2]]), ('control #5', [[[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], 0], [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]])], [('control #3', [[[0, -3], [3, -1], [6, -3], [9, -2]], 3], [[0, -3], [9, -2]]), ('control #4', [[[0, -2], [3, -4], [6, -1], [9, -4], [12, 1], [15, 2]], 3], [[0, -2], [9, -4], [15, 2]]), ('control #5', [[[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], 0], [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]]), ('control #6', [[[0, 4], [3, -1], [6, 2], [9, 2], [12, 2]], 3], [[0, 4], [3, -1], [12, 2]]), ('control #7', [[[0, -4], [3, 0], [6, -3], [9, 1], [12, 1], [15, 3]], 2], [[0, -4], [3, 0], [6, -3], [15, 3]]), ('control #8', [[[0, -4], [3, -4], [6, 1], [9, 3], [12, 3], [15, -4]], 1], [[0, -4], [3, -4], [9, 3], [12, 3], [15, -4]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #6', [[[0, 4], [3, -1], [6, 2], [9, 2], [12, 2]], 3], [[0, 4], [3, -1], [12, 2]]), ('control #7', [[[0, -4], [3, 0], [6, -3], [9, 1], [12, 1], [15, 3]], 2], [[0, -4], [3, 0], [6, -3], [15, 3]]), ('control #8', [[[0, -4], [3, -4], [6, 1], [9, 3], [12, 3], [15, -4]], 1], [[0, -4], [3, -4], [9, 3], [12, 3], [15, -4]]), ('control #9', [[[0, -3], [3, 4], [6, 0], [9, -4], [12, 0], [15, -1], [18, 4]], 0], [[0, -3], [3, 4], [9, -4], [12, 0], [15, -1], [18, 4]]), ('control #10', [[[0, -4], [3, -2], [6, 1], [9, 1]], 2], [[0, -4], [9, 1]]), ('control #11', [[[0, 4], [3, -3], [6, -2], [9, -4], [12, 4], [15, 4], [18, -1]], 2], [[0, 4], [3, -3], [9, -4], [12, 4], [18, -1]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #9', [[[0, -3], [3, 4], [6, 0], [9, -4], [12, 0], [15, -1], [18, 4]], 0], [[0, -3], [3, 4], [9, -4], [12, 0], [15, -1], [18, 4]]), ('control #10', [[[0, -4], [3, -2], [6, 1], [9, 1]], 2], [[0, -4], [9, 1]]), ('control #11', [[[0, 4], [3, -3], [6, -2], [9, -4], [12, 4], [15, 4], [18, -1]], 2], [[0, 4], [3, -3], [9, -4], [12, 4], [18, -1]]), ('control #12', [[[0, 2], [3, -3], [6, 3], [9, -1]], 1], [[0, 2], [3, -3], [6, 3], [9, -1]]), ('control #13', [[[0, 4], [3, -1], [6, -4], [9, -2], [12, 4], [15, -3], [18, -1], [21, 0]], 3], [[0, 4], [6, -4], [12, 4], [15, -3], [21, 0]]), ('regression #14', [[[0, 0], [10, 0], [14, 3], [20, 0]], 2], [[0, 0], [10, 0], [14, 3], [20, 0]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #12', [[[0, 2], [3, -3], [6, 3], [9, -1]], 1], [[0, 2], [3, -3], [6, 3], [9, -1]]), ('control #13', [[[0, 4], [3, -1], [6, -4], [9, -2], [12, 4], [15, -3], [18, -1], [21, 0]], 3], [[0, 4], [6, -4], [12, 4], [15, -3], [21, 0]]), ('regression #14', [[[0, 0], [10, 0], [14, 3], [20, 0]], 2], [[0, 0], [10, 0], [14, 3], [20, 0]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #16', [[[0, 0], [4, 4], [8, 0], [4, -4], [0, 0]], 1], [[0, 0], [4, 4], [8, 0], [4, -4], [0, 0]]), ('regression #17', [[[0, 0], [6, 1], [6, 7], [0, 6], [0, 0]], 2], [[0, 0], [6, 1], [6, 7], [0, 6], [0, 0]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"9a3a1692a149de1f8d7c1403b1c341b4af429f26261e849a7c626022d16bc051","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts, tol = x\n    def dist(p, a, b):\n        dx, dy = b[0] - a[0], b[1] - a[1]\n        if dx == 0 and dy == 0:\n            return math.hypot(p[0] - a[0], p[1] - a[1])\n        t = ((p[0] - a[0]) * dx + (p[1] - a[1]) * dy) / (dx * dx + dy * dy)\n        t = t\n        return math.hypot(p[0] - a[0] - t * dx, p[1] - a[1] - t * dy)\n    keep = [False] * len(pts)\n    keep[0] = keep[-1] = True\n    stack = [(0, len(pts) - 1)]\n    while stack:\n        i, j = stack.pop()\n        best, idx = -1.0, -1\n        for k in range(i + 1, j):\n            d = dist(pts[k], pts[i], pts[j])\n            if d > best:\n                best, idx = d, k\n        if idx != -1 and best > tol:\n            keep[idx] = True\n            stack.append((i, idx))\n            stack.append((idx, j))\n    return [p for p, f in zip(pts, keep) if f]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [[[0, 0], [3, 1], [6, -1], [9, 1], [12, 1], [15, 4], [18, 1], [21, -2], [24, 1]], 2], [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]]), ('control #1', [[[0, 3], [3, -4], [6, 1], [9, 3], [12, -4], [15, 1], [18, -1]], 1], [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]]), ('control #2', [[[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], 0], [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]]), ('control #3', [[[0, -3], [3, -1], [6, -3], [9, -2]], 3], [[0, -3], [9, -2]]), ('control #4', [[[0, -2], [3, -4], [6, -1], [9, -4], [12, 1], [15, 2]], 3], [[0, -2], [9, -4], [15, 2]]), ('control #5', [[[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], 0], [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]])], [('control #3', [[[0, -3], [3, -1], [6, -3], [9, -2]], 3], [[0, -3], [9, -2]]), ('control #4', [[[0, -2], [3, -4], [6, -1], [9, -4], [12, 1], [15, 2]], 3], [[0, -2], [9, -4], [15, 2]]), ('control #5', [[[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], 0], [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]]), ('control #6', [[[0, 4], [3, -1], [6, 2], [9, 2], [12, 2]], 3], [[0, 4], [3, -1], [12, 2]]), ('control #7', [[[0, -4], [3, 0], [6, -3], [9, 1], [12, 1], [15, 3]], 2], [[0, -4], [3, 0], [6, -3], [15, 3]]), ('control #8', [[[0, -4], [3, -4], [6, 1], [9, 3], [12, 3], [15, -4]], 1], [[0, -4], [3, -4], [9, 3], [12, 3], [15, -4]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #6', [[[0, 4], [3, -1], [6, 2], [9, 2], [12, 2]], 3], [[0, 4], [3, -1], [12, 2]]), ('control #7', [[[0, -4], [3, 0], [6, -3], [9, 1], [12, 1], [15, 3]], 2], [[0, -4], [3, 0], [6, -3], [15, 3]]), ('control #8', [[[0, -4], [3, -4], [6, 1], [9, 3], [12, 3], [15, -4]], 1], [[0, -4], [3, -4], [9, 3], [12, 3], [15, -4]]), ('control #9', [[[0, -3], [3, 4], [6, 0], [9, -4], [12, 0], [15, -1], [18, 4]], 0], [[0, -3], [3, 4], [9, -4], [12, 0], [15, -1], [18, 4]]), ('control #10', [[[0, -4], [3, -2], [6, 1], [9, 1]], 2], [[0, -4], [9, 1]]), ('control #11', [[[0, 4], [3, -3], [6, -2], [9, -4], [12, 4], [15, 4], [18, -1]], 2], [[0, 4], [3, -3], [9, -4], [12, 4], [18, -1]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #9', [[[0, -3], [3, 4], [6, 0], [9, -4], [12, 0], [15, -1], [18, 4]], 0], [[0, -3], [3, 4], [9, -4], [12, 0], [15, -1], [18, 4]]), ('control #10', [[[0, -4], [3, -2], [6, 1], [9, 1]], 2], [[0, -4], [9, 1]]), ('control #11', [[[0, 4], [3, -3], [6, -2], [9, -4], [12, 4], [15, 4], [18, -1]], 2], [[0, 4], [3, -3], [9, -4], [12, 4], [18, -1]]), ('control #12', [[[0, 2], [3, -3], [6, 3], [9, -1]], 1], [[0, 2], [3, -3], [6, 3], [9, -1]]), ('control #13', [[[0, 4], [3, -1], [6, -4], [9, -2], [12, 4], [15, -3], [18, -1], [21, 0]], 3], [[0, 4], [6, -4], [12, 4], [15, -3], [21, 0]]), ('regression #14', [[[0, 0], [10, 0], [14, 3], [20, 0]], 2], [[0, 0], [10, 0], [14, 3], [20, 0]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #12', [[[0, 2], [3, -3], [6, 3], [9, -1]], 1], [[0, 2], [3, -3], [6, 3], [9, -1]]), ('control #13', [[[0, 4], [3, -1], [6, -4], [9, -2], [12, 4], [15, -3], [18, -1], [21, 0]], 3], [[0, 4], [6, -4], [12, 4], [15, -3], [21, 0]]), ('regression #14', [[[0, 0], [10, 0], [14, 3], [20, 0]], 2], [[0, 0], [10, 0], [14, 3], [20, 0]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #16', [[[0, 0], [4, 4], [8, 0], [4, -4], [0, 0]], 1], [[0, 0], [4, 4], [8, 0], [4, -4], [0, 0]]), ('regression #17', [[[0, 0], [6, 1], [6, 7], [0, 6], [0, 0]], 2], [[0, 0], [6, 1], [6, 7], [0, 6], [0, 0]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"e576a23dd28aa833d6a1d5673f07348d2e8550a9705f654d2455b8251c416a1c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts, tol = x\n    def dist(p, a, b):\n        dx, dy = b[0] - a[0], b[1] - a[1]\n        if dx == 0 and dy == 0:\n            return math.hypot(p[0] - a[0], p[1] - a[1])\n        t = ((p[0] - a[0]) * dx + (p[1] - a[1]) * dy) / (dx * dx + dy * dy)\n        t = max(0.0, min(1.0, t))\n        return math.hypot(p[0] - a[0] - t * dx, p[1] - a[1] - t * dy)\n    keep = [False] * len(pts)\n    keep[0] = keep[-1] = True\n    stack = [(0, len(pts) - 1)]\n    while stack:\n        i, j = stack.pop()\n        best, idx = -1.0, -1\n        for k in range(i + 1, j):\n            d = dist(pts[k], pts[i], pts[j])\n            if d > best:\n                best, idx = d, k\n        if idx != -1 and best > tol:\n            keep[idx] = True\n            stack.append((i, idx))\n            stack.append((idx, j))\n    return [p for p, f in zip(pts, keep) if f]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [[[0, 0], [3, 1], [6, -1], [9, 1], [12, 1], [15, 4], [18, 1], [21, -2], [24, 1]], 2], [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]]), ('control #1', [[[0, 3], [3, -4], [6, 1], [9, 3], [12, -4], [15, 1], [18, -1]], 1], [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]]), ('control #2', [[[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], 0], [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]]), ('control #3', [[[0, -3], [3, -1], [6, -3], [9, -2]], 3], [[0, -3], [9, -2]]), ('control #4', [[[0, -2], [3, -4], [6, -1], [9, -4], [12, 1], [15, 2]], 3], [[0, -2], [9, -4], [15, 2]]), ('control #5', [[[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], 0], [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]])], [('control #3', [[[0, -3], [3, -1], [6, -3], [9, -2]], 3], [[0, -3], [9, -2]]), ('control #4', [[[0, -2], [3, -4], [6, -1], [9, -4], [12, 1], [15, 2]], 3], [[0, -2], [9, -4], [15, 2]]), ('control #5', [[[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], 0], [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]]), ('control #6', [[[0, 4], [3, -1], [6, 2], [9, 2], [12, 2]], 3], [[0, 4], [3, -1], [12, 2]]), ('control #7', [[[0, -4], [3, 0], [6, -3], [9, 1], [12, 1], [15, 3]], 2], [[0, -4], [3, 0], [6, -3], [15, 3]]), ('control #8', [[[0, -4], [3, -4], [6, 1], [9, 3], [12, 3], [15, -4]], 1], [[0, -4], [3, -4], [9, 3], [12, 3], [15, -4]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #6', [[[0, 4], [3, -1], [6, 2], [9, 2], [12, 2]], 3], [[0, 4], [3, -1], [12, 2]]), ('control #7', [[[0, -4], [3, 0], [6, -3], [9, 1], [12, 1], [15, 3]], 2], [[0, -4], [3, 0], [6, -3], [15, 3]]), ('control #8', [[[0, -4], [3, -4], [6, 1], [9, 3], [12, 3], [15, -4]], 1], [[0, -4], [3, -4], [9, 3], [12, 3], [15, -4]]), ('control #9', [[[0, -3], [3, 4], [6, 0], [9, -4], [12, 0], [15, -1], [18, 4]], 0], [[0, -3], [3, 4], [9, -4], [12, 0], [15, -1], [18, 4]]), ('control #10', [[[0, -4], [3, -2], [6, 1], [9, 1]], 2], [[0, -4], [9, 1]]), ('control #11', [[[0, 4], [3, -3], [6, -2], [9, -4], [12, 4], [15, 4], [18, -1]], 2], [[0, 4], [3, -3], [9, -4], [12, 4], [18, -1]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #9', [[[0, -3], [3, 4], [6, 0], [9, -4], [12, 0], [15, -1], [18, 4]], 0], [[0, -3], [3, 4], [9, -4], [12, 0], [15, -1], [18, 4]]), ('control #10', [[[0, -4], [3, -2], [6, 1], [9, 1]], 2], [[0, -4], [9, 1]]), ('control #11', [[[0, 4], [3, -3], [6, -2], [9, -4], [12, 4], [15, 4], [18, -1]], 2], [[0, 4], [3, -3], [9, -4], [12, 4], [18, -1]]), ('control #12', [[[0, 2], [3, -3], [6, 3], [9, -1]], 1], [[0, 2], [3, -3], [6, 3], [9, -1]]), ('control #13', [[[0, 4], [3, -1], [6, -4], [9, -2], [12, 4], [15, -3], [18, -1], [21, 0]], 3], [[0, 4], [6, -4], [12, 4], [15, -3], [21, 0]]), ('regression #14', [[[0, 0], [10, 0], [14, 3], [20, 0]], 2], [[0, 0], [10, 0], [14, 3], [20, 0]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])], [('control #12', [[[0, 2], [3, -3], [6, 3], [9, -1]], 1], [[0, 2], [3, -3], [6, 3], [9, -1]]), ('control #13', [[[0, 4], [3, -1], [6, -4], [9, -2], [12, 4], [15, -3], [18, -1], [21, 0]], 3], [[0, 4], [6, -4], [12, 4], [15, -3], [21, 0]]), ('regression #14', [[[0, 0], [10, 0], [14, 3], [20, 0]], 2], [[0, 0], [10, 0], [14, 3], [20, 0]]), ('regression #15', [[[0, 0], [5, 0], [-6, 1], [10, 0]], 2], [[0, 0], [5, 0], [-6, 1], [10, 0]]), ('regression #16', [[[0, 0], [4, 4], [8, 0], [4, -4], [0, 0]], 1], [[0, 0], [4, 4], [8, 0], [4, -4], [0, 0]]), ('regression #17', [[[0, 0], [6, 1], [6, 7], [0, 6], [0, 0]], 2], [[0, 0], [6, 1], [6, 7], [0, 6], [0, 0]]), ('regression #25', [[[0, 0], [14, 1], [10, 0]], 2], [[0, 0], [14, 1], [10, 0]]), ('regression #26', [[[0, 0], [5, 1], [17, 2], [12, 0]], 2], [[0, 0], [17, 2], [12, 0]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-gis-polygon-topology-douglas-peucker-arc-segment-projection-clamp","generated_at":"2026-09-29T14:48:22.061017+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Shared arcs are simplified once so adjacent polygons stay gap-free; distance and split errors change which boundary vertices survive.","repair":"At the segment projection clamp step restore `t = max(0.0, min(1.0, t))`, leaving the rest of the model unchanged.","root_cause":"Distance is measured to the infinite line rather than the segment.","sha256":"75174801414695025678f9e5204321ed3630a934f4c29adb9479dc2166365fe4","title":"Douglas-Peucker simplification of a topology arc: segment projection clamp · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.405,"exit_code":1,"observations":[{"actual":[[0,0],[6,-1],[15,4],[21,-2],[24,1]],"check":"control #0","expected":[[0,0],[6,-1],[15,4],[21,-2],[24,1]],"passed":true},{"actual":[[0,3],[3,-4],[9,3],[12,-4],[15,1],[18,-1]],"check":"control #1","expected":[[0,3],[3,-4],[9,3],[12,-4],[15,1],[18,-1]],"passed":true},{"actual":[[0,-4],[3,3],[6,-2],[9,-1],[12,2],[15,1],[18,1]],"check":"control #2","expected":[[0,-4],[3,3],[6,-2],[9,-1],[12,2],[15,1],[18,1]],"passed":true},{"actual":[[0,-3],[9,-2]],"check":"control #3","expected":[[0,-3],[9,-2]],"passed":true},{"actual":[[0,-2],[9,-4],[15,2]],"check":"control #4","expected":[[0,-2],[9,-4],[15,2]],"passed":true},{"actual":[[0,-2],[3,2],[6,2],[9,-3],[12,3],[15,4],[18,2],[21,-2]],"check":"control #5","expected":[[0,-2],[3,2],[6,2],[9,-3],[12,3],[15,4],[18,2],[21,-2]],"passed":true},{"actual":[[0,0],[5,0],[-6,1],[10,0]],"check":"regression #15","expected":[[0,0],[5,0],[-6,1],[10,0]],"passed":true},{"actual":[[0,0],[10,0]],"check":"regression #25","expected":[[0,0],[14,1],[10,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]], \"expected\": [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]], \"expected\": [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], \"expected\": [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], \"passed\": true}, {\"check\": \"control #3\", \"actual\": [[0, -3], [9, -2]], \"expected\": [[0, -3], [9, -2]], \"passed\": true}, {\"check\": \"control #4\", \"actual\": [[0, -2], [9, -4], [15, 2]], \"expected\": [[0, -2], [9, -4], [15, 2]], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], \"expected\": [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], \"passed\": true}, {\"check\": \"regression #15\", \"actual\": [[0, 0], [5, 0], [-6, 1], [10, 0]], \"expected\": [[0, 0], [5, 0], [-6, 1], [10, 0]], \"passed\": true}, {\"check\": \"regression #25\", \"actual\": [[0, 0], [10, 0]], \"expected\": [[0, 0], [14, 1], [10, 0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.625,"exit_code":1,"observations":[{"actual":[[0,0],[6,-1],[15,4],[21,-2],[24,1]],"check":"control #0","expected":[[0,0],[6,-1],[15,4],[21,-2],[24,1]],"passed":true},{"actual":[[0,3],[3,-4],[9,3],[12,-4],[15,1],[18,-1]],"check":"control #1","expected":[[0,3],[3,-4],[9,3],[12,-4],[15,1],[18,-1]],"passed":true},{"actual":[[0,-4],[3,3],[6,-2],[9,-1],[12,2],[15,1],[18,1]],"check":"control #2","expected":[[0,-4],[3,3],[6,-2],[9,-1],[12,2],[15,1],[18,1]],"passed":true},{"actual":[[0,-3],[9,-2]],"check":"control #3","expected":[[0,-3],[9,-2]],"passed":true},{"actual":[[0,-2],[9,-4],[15,2]],"check":"control #4","expected":[[0,-2],[9,-4],[15,2]],"passed":true},{"actual":[[0,-2],[3,2],[6,2],[9,-3],[12,3],[15,4],[18,2],[21,-2]],"check":"control #5","expected":[[0,-2],[3,2],[6,2],[9,-3],[12,3],[15,4],[18,2],[21,-2]],"passed":true},{"actual":[[0,0],[10,0]],"check":"regression #15","expected":[[0,0],[5,0],[-6,1],[10,0]],"passed":false},{"actual":[[0,0],[10,0]],"check":"regression #25","expected":[[0,0],[14,1],[10,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]], \"expected\": [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]], \"expected\": [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], \"expected\": [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], \"passed\": true}, {\"check\": \"control #3\", \"actual\": [[0, -3], [9, -2]], \"expected\": [[0, -3], [9, -2]], \"passed\": true}, {\"check\": \"control #4\", \"actual\": [[0, -2], [9, -4], [15, 2]], \"expected\": [[0, -2], [9, -4], [15, 2]], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], \"expected\": [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], \"passed\": true}, {\"check\": \"regression #15\", \"actual\": [[0, 0], [10, 0]], \"expected\": [[0, 0], [5, 0], [-6, 1], [10, 0]], \"passed\": false}, {\"check\": \"regression #25\", \"actual\": [[0, 0], [10, 0]], \"expected\": [[0, 0], [14, 1], [10, 0]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.049,"exit_code":0,"observations":[{"actual":[[0,0],[6,-1],[15,4],[21,-2],[24,1]],"check":"control #0","expected":[[0,0],[6,-1],[15,4],[21,-2],[24,1]],"passed":true},{"actual":[[0,3],[3,-4],[9,3],[12,-4],[15,1],[18,-1]],"check":"control #1","expected":[[0,3],[3,-4],[9,3],[12,-4],[15,1],[18,-1]],"passed":true},{"actual":[[0,-4],[3,3],[6,-2],[9,-1],[12,2],[15,1],[18,1]],"check":"control #2","expected":[[0,-4],[3,3],[6,-2],[9,-1],[12,2],[15,1],[18,1]],"passed":true},{"actual":[[0,-3],[9,-2]],"check":"control #3","expected":[[0,-3],[9,-2]],"passed":true},{"actual":[[0,-2],[9,-4],[15,2]],"check":"control #4","expected":[[0,-2],[9,-4],[15,2]],"passed":true},{"actual":[[0,-2],[3,2],[6,2],[9,-3],[12,3],[15,4],[18,2],[21,-2]],"check":"control #5","expected":[[0,-2],[3,2],[6,2],[9,-3],[12,3],[15,4],[18,2],[21,-2]],"passed":true},{"actual":[[0,0],[5,0],[-6,1],[10,0]],"check":"regression #15","expected":[[0,0],[5,0],[-6,1],[10,0]],"passed":true},{"actual":[[0,0],[14,1],[10,0]],"check":"regression #25","expected":[[0,0],[14,1],[10,0]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]], \"expected\": [[0, 0], [6, -1], [15, 4], [21, -2], [24, 1]], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]], \"expected\": [[0, 3], [3, -4], [9, 3], [12, -4], [15, 1], [18, -1]], \"passed\": true}, {\"check\": \"control #2\", \"actual\": [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], \"expected\": [[0, -4], [3, 3], [6, -2], [9, -1], [12, 2], [15, 1], [18, 1]], \"passed\": true}, {\"check\": \"control #3\", \"actual\": [[0, -3], [9, -2]], \"expected\": [[0, -3], [9, -2]], \"passed\": true}, {\"check\": \"control #4\", \"actual\": [[0, -2], [9, -4], [15, 2]], \"expected\": [[0, -2], [9, -4], [15, 2]], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], \"expected\": [[0, -2], [3, 2], [6, 2], [9, -3], [12, 3], [15, 4], [18, 2], [21, -2]], \"passed\": true}, {\"check\": \"regression #15\", \"actual\": [[0, 0], [5, 0], [-6, 1], [10, 0]], \"expected\": [[0, 0], [5, 0], [-6, 1], [10, 0]], \"passed\": true}, {\"check\": \"regression #25\", \"actual\": [[0, 0], [14, 1], [10, 0]], \"expected\": [[0, 0], [14, 1], [10, 0]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}