{"abstract":"Rings reduced to a segment are returned as polygons.","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":"A two-vertex remnant is still returned.","family":"w2-gis-polygon-topology-spike-removal-collapse-threshold","id":"FA-70811","implementations":{"attempt":{"sha256":"0f248eb78c57e607e0965c5e23f25ed4fcdb6e21bb62cf7a298805fd9a47795e","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) < 2:\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]]), ('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 #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]])], [('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]]), ('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]]), ('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 #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]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None)]]\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":"efc166fc3480724f04503b422cf52ada05e6378d5ced7556ffed1bd455fe0f6d","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 not pts:\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]]), ('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 #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]])], [('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]]), ('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]]), ('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 #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]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None)]]\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":"6412a9d3ea63f0610f73c72bcc7b19101f451e165042f1b0a5fdb4812b35e5f8","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]]), ('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 #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]])], [('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]]), ('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]]), ('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 #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]]), ('boundary #7', [[0, 0], [10, 0], [0, 0], [0, 0]], None), ('boundary #8', [[0, 0], [10, 0], [5, 5], [10, 0], [0, 0]], None)]]\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-collapse-threshold","generated_at":"2026-09-29T14:48:24.161719+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 collapse threshold step restore `if len(pts) < 3:     return None`, leaving the rest of the model unchanged.","root_cause":"Only an empty cycle is treated as collapsed.","sha256":"5989f90f176d71646b3ac8b78bbcfa23673b09a0d3bb0a5342e257ab0810bcbe","title":"Iterative removal of backtracking spikes: collapse threshold · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.533,"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":[[10,0],[0,0],[10,0]],"check":"boundary #7","expected":null,"passed":false},{"actual":[[5,5],[10,0],[5,5]],"check":"boundary #8","expected":null,"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\": \"boundary #7\", \"actual\": [[10, 0], [0, 0], [10, 0]], \"expected\": null, \"passed\": false}, {\"check\": \"boundary #8\", \"actual\": [[5, 5], [10, 0], [5, 5]], \"expected\": null, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.636,"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":[[10,0],[0,0],[10,0]],"check":"boundary #7","expected":null,"passed":false},{"actual":[[5,5],[10,0],[5,5]],"check":"boundary #8","expected":null,"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\": \"boundary #7\", \"actual\": [[10, 0], [0, 0], [10, 0]], \"expected\": null, \"passed\": false}, {\"check\": \"boundary #8\", \"actual\": [[5, 5], [10, 0], [5, 5]], \"expected\": null, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.327,"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":null,"check":"boundary #7","expected":null,"passed":true},{"actual":null,"check":"boundary #8","expected":null,"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\": \"boundary #7\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary #8\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}