{"abstract":"Straight-through vertices are deleted as if they were spikes.","category":"GIS polygon topology","checks":8,"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.","evaluation_group":"w2-gis-polygon-topology-spike-removal","failed_approach":"Deleting collinear reversals also removes partial backtracks that the contract keeps.","family":"w2-gis-polygon-topology-spike-removal-spike-predicate","id":"FA-70806","implementations":{"attempt":{"sha256":"6bb5d78a4d1b237ca474053627b319ab4668d2e69a6330d99e60d819568a0067","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts = x[:-1]\n    changed = True\n    while changed and len(pts) >= 3:\n        changed = False\n        n = len(pts)\n        for i in range(n):\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]:\n                del pts[i]\n                changed = True\n                break\n    if len(pts) < 3:\n        return None\n    return pts + [pts[0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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]])]]\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":"1a97955cc905186991f57f2acae74a89b3fa51e920f24b98dc979515459c90f0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts = x[:-1]\n    changed = True\n    while changed and len(pts) >= 3:\n        changed = False\n        n = len(pts)\n        for i in range(n):\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]:\n                del pts[i]\n                changed = True\n                break\n    if len(pts) < 3:\n        return None\n    return pts + [pts[0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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]])]]\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":"b804f6c5d3d42a855914b1e157daf6cd5bd47ac86a8adc498653af2bba0dc912","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts = x[:-1]\n    changed = True\n    while changed and len(pts) >= 3:\n        changed = False\n        n = len(pts)\n        for i in range(n):\n            if pts[i - 1] == pts[(i + 1) % n] or pts[i] == pts[i - 1]:\n                del pts[i]\n                changed = True\n                break\n    if len(pts) < 3:\n        return None\n    return pts + [pts[0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('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]])]]\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-spike-removal-spike-predicate","generated_at":"2026-09-29T14:48:24.122043+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Digitising and snapping leave out-and-back spikes; cleaning must remove nested spikes, including those at the ring start, without changing genuine shape.","repair":"At the spike predicate step restore `if pts[i - 1] == pts[(i + 1) % n] or`, leaving the rest of the model unchanged.","root_cause":"Any collinear vertex is treated as a spike.","sha256":"8837f9b5f52958662dc3044a805ab6b2d646aa07a459e95c7c620bd18d5519b9","title":"Iterative removal of backtracking spikes: spike predicate · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.325,"exit_code":1,"observations":[{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"control #0","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #1","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #2","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"check":"regression #3","expected":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"passed":true},{"actual":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"check":"regression #4","expected":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"passed":true},{"actual":[[0,0],[5,0],[10,0],[10,10],[0,10],[0,0]],"check":"control #5","expected":[[0,0],[5,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #6","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,8],[10,10],[0,10],[0,0]],"check":"regression #9","expected":[[0,0],[10,0],[10,10],[10,14],[10,8],[10,10],[0,10],[0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #1\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #2\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #3\", \"actual\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"expected\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"passed\": true}, {\"check\": \"regression #4\", \"actual\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"expected\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #6\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #9\", \"actual\": [[0, 0], [10, 0], [10, 8], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.203,"exit_code":1,"observations":[{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"control #0","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #1","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #2","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[10,0],[10,10],[0,10],[0,0],[10,0]],"check":"regression #3","expected":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"passed":false},{"actual":[[10,0],[10,10],[0,10],[0,0],[10,0]],"check":"regression #4","expected":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"passed":false},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"control #5","expected":[[0,0],[5,0],[10,0],[10,10],[0,10],[0,0]],"passed":false},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #6","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #9","expected":[[0,0],[10,0],[10,10],[10,14],[10,8],[10,10],[0,10],[0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #1\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #2\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #3\", \"actual\": [[10, 0], [10, 10], [0, 10], [0, 0], [10, 0]], \"expected\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"passed\": false}, {\"check\": \"regression #4\", \"actual\": [[10, 0], [10, 10], [0, 10], [0, 0], [10, 0]], \"expected\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"passed\": false}, {\"check\": \"control #5\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": false}, {\"check\": \"regression #6\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #9\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.318,"exit_code":0,"observations":[{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"control #0","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #1","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #2","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"check":"regression #3","expected":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"passed":true},{"actual":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"check":"regression #4","expected":[[10,0],[10,10],[0,10],[0,0],[5,0],[10,0]],"passed":true},{"actual":[[0,0],[5,0],[10,0],[10,10],[0,10],[0,0]],"check":"control #5","expected":[[0,0],[5,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[0,10],[0,0]],"check":"regression #6","expected":[[0,0],[10,0],[10,10],[0,10],[0,0]],"passed":true},{"actual":[[0,0],[10,0],[10,10],[10,14],[10,8],[10,10],[0,10],[0,0]],"check":"regression #9","expected":[[0,0],[10,0],[10,10],[10,14],[10,8],[10,10],[0,10],[0,0]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #1\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #2\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #3\", \"actual\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"expected\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"passed\": true}, {\"check\": \"regression #4\", \"actual\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"expected\": [[10, 0], [10, 10], [0, 10], [0, 0], [5, 0], [10, 0]], \"passed\": true}, {\"check\": \"control #5\", \"actual\": [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [5, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #6\", \"actual\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], \"passed\": true}, {\"check\": \"regression #9\", \"actual\": [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], \"expected\": [[0, 0], [10, 0], [10, 10], [10, 14], [10, 8], [10, 10], [0, 10], [0, 0]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}