{"abstract":"Polygons that legitimately revisit a vertex lose corners.","category":"Mesh topology invariants","checks":7,"contract":"Input [points, faces, eps]. Points weld when floor(c/eps+0.5) agrees on every coordinate; the welded vertex takes the next new id and is represented by its lowest original index. Remap faces, merge consecutive equal corners (also across the wrap), drop faces with fewer than 3 corners, rotate each face so its smallest id comes first (orientation kept) and drop later copies of an identical rotated face. Return [representatives, faces].","evaluation_group":"w2-mesh_topology_invariants-vertex-welding","failed_approach":"Comparing against the first corner instead of the previous one misses runs in the middle.","family":"w2-mesh_topology_invariants-vertex-welding-consecutive-merge","id":"FA-88591","implementations":{"attempt":{"sha256":"9b4b173d901a6ebfe40bd72380c0adef04eea80ae877846036b58e80f170b3ef","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts,faces,eps=x\n    key_to_new={}\n    remap=[]\n    reps=[]\n    for i,p in enumerate(pts):\n        k=tuple(math.floor(c/eps+0.5) for c in p)\n        if k not in key_to_new:\n            key_to_new[k]=len(reps)\n            reps.append(i)\n        remap.append(key_to_new[k])\n    out=[]\n    seen=set()\n    for f in faces:\n        g=[remap[v] for v in f]\n        h=[]\n        for v in g:\n            if not h or h[0]!=v: h.append(v)\n        while len(h)>1 and h[0]==h[-1]: h.pop()\n        if len(h)<3: continue\n        m=h.index(min(h))\n        c=tuple(h[m:]+h[:m])\n        if c in seen: continue\n        seen.add(c)\n        out.append(list(c))\n    return [reps,out]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]]], [['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]]]]\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":"8cbc68506c3e35482a437c66ba68b29806d9c08a35f86a197dc910ba98c7b51a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts,faces,eps=x\n    key_to_new={}\n    remap=[]\n    reps=[]\n    for i,p in enumerate(pts):\n        k=tuple(math.floor(c/eps+0.5) for c in p)\n        if k not in key_to_new:\n            key_to_new[k]=len(reps)\n            reps.append(i)\n        remap.append(key_to_new[k])\n    out=[]\n    seen=set()\n    for f in faces:\n        g=[remap[v] for v in f]\n        h=[]\n        for v in g:\n            if v not in h: h.append(v)\n        while len(h)>1 and h[0]==h[-1]: h.pop()\n        if len(h)<3: continue\n        m=h.index(min(h))\n        c=tuple(h[m:]+h[:m])\n        if c in seen: continue\n        seen.add(c)\n        out.append(list(c))\n    return [reps,out]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]]], [['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]]]]\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":"ab04d0828bff4013ba127969b1b216a9b467ea87d7c906866d9d9aba6e05f8a1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    pts,faces,eps=x\n    key_to_new={}\n    remap=[]\n    reps=[]\n    for i,p in enumerate(pts):\n        k=tuple(math.floor(c/eps+0.5) for c in p)\n        if k not in key_to_new:\n            key_to_new[k]=len(reps)\n            reps.append(i)\n        remap.append(key_to_new[k])\n    out=[]\n    seen=set()\n    for f in faces:\n        g=[remap[v] for v in f]\n        h=[]\n        for v in g:\n            if not h or h[-1]!=v: h.append(v)\n        while len(h)>1 and h[0]==h[-1]: h.pop()\n        if len(h)<3: continue\n        m=h.index(min(h))\n        c=tuple(h[m:]+h[:m])\n        if c in seen: continue\n        seen.add(c)\n        out.append(list(c))\n    return [reps,out]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]]], [['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]]]]\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":"Pure combinatorial teaching model over integer face lists with a stipulated contract; no geometry kernel or file format is implied. 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-mesh_topology_invariants-vertex-welding-consecutive-merge","generated_at":"2026-09-29T14:51:09.589372+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Mesh processing pipelines (remeshing, export, simulation, printing) trust these topological counts and adjacency answers; a wrong invariant silently accepts broken meshes or rejects valid ones.","repair":"Skip a corner only when it equals the previous kept corner.","root_cause":"Corners are skipped whenever they already appear anywhere in the face.","sha256":"d51353bbd0816fe8c2277751d27460947fe7ee7cfd636b3ae6ba87e82b4a94a3","title":"Welding removes every repeated corner, not only consecutive ones · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.316,"exit_code":1,"observations":[{"actual":[[0,1,2],[[0,1,2]]],"check":"near duplicate corner","expected":[[0,1,2],[[0,1,2]]],"passed":true},{"actual":[[0,1,2,3],[[0,2,3],[1,2,3]]],"check":"negative coordinates","expected":[[0,1,2,3],[[0,2,3],[1,2,3]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,2],[1,2,3]]],"check":"half grid step","expected":[[0,1,2,3],[[0,1,2],[1,2,3]]],"passed":true},{"actual":[[0,2,3],[[0,1,2]]],"check":"collapsing triangle","expected":[[0,2,3],[[0,1,2]]],"passed":true},{"actual":[[0,1,2],[[0,1,2],[0,2,1]]],"check":"rotated duplicate","expected":[[0,1,2],[[0,1,2],[0,2,1]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,3,2,3]]],"check":"non-consecutive repeat kept","expected":[[0,1,2,3],[[0,1,3,2,3]]],"passed":true},{"actual":[[0,1,3,4],[[0,1,1,2,3]]],"check":"bowed quad two repeats","expected":[[0,1,3,4],[[0,1,2,3]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"near duplicate corner\", \"actual\": [[0, 1, 2], [[0, 1, 2]]], \"expected\": [[0, 1, 2], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"negative coordinates\", \"actual\": [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]], \"passed\": true}, {\"check\": \"half grid step\", \"actual\": [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]], \"passed\": true}, {\"check\": \"collapsing triangle\", \"actual\": [[0, 2, 3], [[0, 1, 2]]], \"expected\": [[0, 2, 3], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"rotated duplicate\", \"actual\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"expected\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"passed\": true}, {\"check\": \"non-consecutive repeat kept\", \"actual\": [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]], \"passed\": true}, {\"check\": \"bowed quad two repeats\", \"actual\": [[0, 1, 3, 4], [[0, 1, 1, 2, 3]]], \"expected\": [[0, 1, 3, 4], [[0, 1, 2, 3]]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.837,"exit_code":1,"observations":[{"actual":[[0,1,2],[[0,1,2]]],"check":"near duplicate corner","expected":[[0,1,2],[[0,1,2]]],"passed":true},{"actual":[[0,1,2,3],[[0,2,3],[1,2,3]]],"check":"negative coordinates","expected":[[0,1,2,3],[[0,2,3],[1,2,3]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,2],[1,2,3]]],"check":"half grid step","expected":[[0,1,2,3],[[0,1,2],[1,2,3]]],"passed":true},{"actual":[[0,2,3],[[0,1,2]]],"check":"collapsing triangle","expected":[[0,2,3],[[0,1,2]]],"passed":true},{"actual":[[0,1,2],[[0,1,2],[0,2,1]]],"check":"rotated duplicate","expected":[[0,1,2],[[0,1,2],[0,2,1]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,3,2]]],"check":"non-consecutive repeat kept","expected":[[0,1,2,3],[[0,1,3,2,3]]],"passed":false},{"actual":[[0,1,3,4],[[0,1,2,3]]],"check":"bowed quad two repeats","expected":[[0,1,3,4],[[0,1,2,3]]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"near duplicate corner\", \"actual\": [[0, 1, 2], [[0, 1, 2]]], \"expected\": [[0, 1, 2], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"negative coordinates\", \"actual\": [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]], \"passed\": true}, {\"check\": \"half grid step\", \"actual\": [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]], \"passed\": true}, {\"check\": \"collapsing triangle\", \"actual\": [[0, 2, 3], [[0, 1, 2]]], \"expected\": [[0, 2, 3], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"rotated duplicate\", \"actual\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"expected\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"passed\": true}, {\"check\": \"non-consecutive repeat kept\", \"actual\": [[0, 1, 2, 3], [[0, 1, 3, 2]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]], \"passed\": false}, {\"check\": \"bowed quad two repeats\", \"actual\": [[0, 1, 3, 4], [[0, 1, 2, 3]]], \"expected\": [[0, 1, 3, 4], [[0, 1, 2, 3]]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.861,"exit_code":0,"observations":[{"actual":[[0,1,2],[[0,1,2]]],"check":"near duplicate corner","expected":[[0,1,2],[[0,1,2]]],"passed":true},{"actual":[[0,1,2,3],[[0,2,3],[1,2,3]]],"check":"negative coordinates","expected":[[0,1,2,3],[[0,2,3],[1,2,3]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,2],[1,2,3]]],"check":"half grid step","expected":[[0,1,2,3],[[0,1,2],[1,2,3]]],"passed":true},{"actual":[[0,2,3],[[0,1,2]]],"check":"collapsing triangle","expected":[[0,2,3],[[0,1,2]]],"passed":true},{"actual":[[0,1,2],[[0,1,2],[0,2,1]]],"check":"rotated duplicate","expected":[[0,1,2],[[0,1,2],[0,2,1]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,3,2,3]]],"check":"non-consecutive repeat kept","expected":[[0,1,2,3],[[0,1,3,2,3]]],"passed":true},{"actual":[[0,1,3,4],[[0,1,2,3]]],"check":"bowed quad two repeats","expected":[[0,1,3,4],[[0,1,2,3]]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"near duplicate corner\", \"actual\": [[0, 1, 2], [[0, 1, 2]]], \"expected\": [[0, 1, 2], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"negative coordinates\", \"actual\": [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]], \"passed\": true}, {\"check\": \"half grid step\", \"actual\": [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]], \"passed\": true}, {\"check\": \"collapsing triangle\", \"actual\": [[0, 2, 3], [[0, 1, 2]]], \"expected\": [[0, 2, 3], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"rotated duplicate\", \"actual\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"expected\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"passed\": true}, {\"check\": \"non-consecutive repeat kept\", \"actual\": [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]], \"passed\": true}, {\"check\": \"bowed quad two repeats\", \"actual\": [[0, 1, 3, 4], [[0, 1, 2, 3]]], \"expected\": [[0, 1, 3, 4], [[0, 1, 2, 3]]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}