{"abstract":"The same face listed from a different start corner is kept twice.","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":"Sorting the corners also merges faces with opposite orientation.","family":"w2-mesh_topology_invariants-vertex-welding-rotation-canonical-form","id":"FA-88601","implementations":{"attempt":{"sha256":"e5958dd4428151bc39b45a3aca67b86df99e98e36ec0574099dc48db5fe64554","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(sorted(h))\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]]]], ['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]]]]], [['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]]]], ['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]]]]], [['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]]]], ['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]]]], ['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]]]]]]\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":"0402793e0adea09ac5cc2f17820c44a405239717f02713eb1c3051f00414f5ba","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)\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]]]], ['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]]]]], [['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]]]], ['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]]]]], [['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]]]], ['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]]]], ['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]]]]]]\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":"e3220ff45c6c577c0722e691a2f64214afa621f19961292ef57ecb3676037614","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]]]], ['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]]]]], [['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]]]], ['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]]]]], [['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]]]], ['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]]]], ['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]]]]]]\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-rotation-canonical-form","generated_at":"2026-09-29T14:51:09.592633+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":"Rotate so the smallest id is first, preserving orientation.","root_cause":"Duplicate detection uses the face tuple as stored.","sha256":"ba216c7d508635d6e5192cd58c328562ae19316409940b8f692c3c66638435b6","title":"Welding compares faces without canonical rotation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.634,"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]]],"check":"rotated duplicate","expected":[[0,1,2],[[0,1,2],[0,2,1]]],"passed":false},{"actual":[[0,1,2],[[0,1,2]]],"check":"wrap-around duplicate","expected":[[0,1,2],[[0,1,2]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,2],[0,2,3]]],"check":"trailing repeats","expected":[[0,1,2,3],[[0,1,2],[0,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]]], \"expected\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"passed\": false}, {\"check\": \"wrap-around duplicate\", \"actual\": [[0, 1, 2], [[0, 1, 2]]], \"expected\": [[0, 1, 2], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"trailing repeats\", \"actual\": [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.496,"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],[3,1,2]]],"check":"half grid step","expected":[[0,1,2,3],[[0,1,2],[1,2,3]]],"passed":false},{"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],[1,2,0],[2,1,0]]],"check":"rotated duplicate","expected":[[0,1,2],[[0,1,2],[0,2,1]]],"passed":false},{"actual":[[0,1,2],[[0,1,2]]],"check":"wrap-around duplicate","expected":[[0,1,2],[[0,1,2]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,2],[0,2,3]]],"check":"trailing repeats","expected":[[0,1,2,3],[[0,1,2],[0,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], [3, 1, 2]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]], \"passed\": false}, {\"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], [1, 2, 0], [2, 1, 0]]], \"expected\": [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]], \"passed\": false}, {\"check\": \"wrap-around duplicate\", \"actual\": [[0, 1, 2], [[0, 1, 2]]], \"expected\": [[0, 1, 2], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"trailing repeats\", \"actual\": [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.184,"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],[[0,1,2]]],"check":"wrap-around duplicate","expected":[[0,1,2],[[0,1,2]]],"passed":true},{"actual":[[0,1,2,3],[[0,1,2],[0,2,3]]],"check":"trailing repeats","expected":[[0,1,2,3],[[0,1,2],[0,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\": \"wrap-around duplicate\", \"actual\": [[0, 1, 2], [[0, 1, 2]]], \"expected\": [[0, 1, 2], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"trailing repeats\", \"actual\": [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]], \"expected\": [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}