{"abstract":"Orphan vertices from discarded degenerate faces remain in the output.","category":"Mesh topology invariants","checks":7,"contract":"Input [verts, faces]: drop faces with fewer than 3 distinct vertices, then keep only vertices referenced by remaining faces, renumbered 0-based in increasing old-index order. Faces keep their corner order. Return [kept vertex payloads, remapped faces].","evaluation_group":"w2-mesh_topology_invariants-vertex-compaction","failed_approach":"Filtering by corner count still keeps vertices of faces like [0,0,5].","family":"w2-mesh_topology_invariants-vertex-compaction-reference-scan-source","id":"FA-88566","implementations":{"attempt":{"sha256":"16084d3831b9307b93c0fe166676feebcacdccf6e6f30b59097e4a8ca7161ebb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    verts,faces=x\n    keep=[]\n    for f in faces:\n        if len(set(f))<3: continue\n        keep.append(f)\n    used=sorted({v for f in faces if len(f)>=3 for v in f})\n    remap={old:new for new,old in enumerate(used)}\n    return [[verts[o] for o in used],[[remap[v] for v in f] for f in keep]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]]], [['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 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":"7a1b0dc7b712448ce2e34e6ddd0f8f480f03b656d84cda235c745ffe713939e6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    verts,faces=x\n    keep=[]\n    for f in faces:\n        if len(set(f))<3: continue\n        keep.append(f)\n    used=sorted({v for f in faces for v in f})\n    remap={old:new for new,old in enumerate(used)}\n    return [[verts[o] for o in used],[[remap[v] for v in f] for f in keep]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]]], [['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 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":"d56b285559711f25fc2bcb0ee99d2b37f24eb025fb6136e296ca70c48075818d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    verts,faces=x\n    keep=[]\n    for f in faces:\n        if len(set(f))<3: continue\n        keep.append(f)\n    used=sorted({v for f in keep for v in f})\n    remap={old:new for new,old in enumerate(used)}\n    return [[verts[o] for o in used],[[remap[v] for v in f] for f in keep]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]]], [['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['first use differs from index order', [[['v0', 'v1', 'v2', 'v3', 'v4'], [[4, 2, 3], [3, 2, 0]]]], [['v0', 'v2', 'v3', 'v4'], [[3, 1, 2], [2, 1, 0]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['two-corner face', [[['x', 'y', 'z', 'w'], [[0, 1], [1, 2, 3]]]], [['y', 'z', 'w'], [[0, 1, 2]]]], ['no gaps', [[['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], [['a', 'b', 'c', 'd'], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]]], [['gap and degenerate', [[['a', 'b', 'c', 'd', 'e', 'f'], [[0, 2, 3], [3, 3, 5], [2, 4, 3]]]], [['a', 'c', 'd', 'e'], [[0, 1, 2], [1, 3, 2]]]], ['repeated but valid quad', [[['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], [['p', 'q', 'r', 's'], [[0, 1, 1, 2], [2, 1, 3]]]], ['only degenerate', [[['x', 'y', 'z'], [[0, 0, 1], [1, 2, 2]]]], [[], []]], ['high gap', [[['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], [[5, 6, 7], [7, 6, 5, 1]]]], [['b', 'f', 'g', 'h'], [[1, 2, 3], [3, 2, 1, 0]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]], ['polygon with non-consecutive repeat', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 1, 3], [4, 3, 2]]]], [['b', 'c', 'd', 'e'], [[0, 1, 0, 2], [3, 2, 1]]]], ['single triangle offset', [[['a', 'b', 'c', 'd', 'e', 'f'], [[3, 4, 5]]]], [['d', 'e', 'f'], [[0, 1, 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-compaction-reference-scan-source","generated_at":"2026-09-29T14:51:09.411333+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":"Collect references after the degenerate faces are removed.","root_cause":"Referenced vertices are collected from all input faces instead of the kept faces.","sha256":"ae0541565b69b9454cc233db5b984809647a35b7694d7af83d5bd67606bb5643","title":"Compaction keeps vertices referenced only by dropped faces · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.28,"exit_code":1,"observations":[{"actual":[["a","c","d","e","f"],[[0,1,2],[1,3,2]]],"check":"gap and degenerate","expected":[["a","c","d","e"],[[0,1,2],[1,3,2]]],"passed":false},{"actual":[["p","q","r","s"],[[0,1,1,2],[2,1,3]]],"check":"repeated but valid quad","expected":[["p","q","r","s"],[[0,1,1,2],[2,1,3]]],"passed":true},{"actual":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"check":"first use differs from index order","expected":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"passed":true},{"actual":[["x","y","z"],[]],"check":"only degenerate","expected":[[],[]],"passed":false},{"actual":[["y","z","w"],[[0,1,2]]],"check":"two-corner face","expected":[["y","z","w"],[[0,1,2]]],"passed":true},{"actual":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"check":"no gaps","expected":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"passed":true},{"actual":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"check":"high gap","expected":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gap and degenerate\", \"actual\": [[\"a\", \"c\", \"d\", \"e\", \"f\"], [[0, 1, 2], [1, 3, 2]]], \"expected\": [[\"a\", \"c\", \"d\", \"e\"], [[0, 1, 2], [1, 3, 2]]], \"passed\": false}, {\"check\": \"repeated but valid quad\", \"actual\": [[\"p\", \"q\", \"r\", \"s\"], [[0, 1, 1, 2], [2, 1, 3]]], \"expected\": [[\"p\", \"q\", \"r\", \"s\"], [[0, 1, 1, 2], [2, 1, 3]]], \"passed\": true}, {\"check\": \"first use differs from index order\", \"actual\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"expected\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"passed\": true}, {\"check\": \"only degenerate\", \"actual\": [[\"x\", \"y\", \"z\"], []], \"expected\": [[], []], \"passed\": false}, {\"check\": \"two-corner face\", \"actual\": [[\"y\", \"z\", \"w\"], [[0, 1, 2]]], \"expected\": [[\"y\", \"z\", \"w\"], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"no gaps\", \"actual\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"expected\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"passed\": true}, {\"check\": \"high gap\", \"actual\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"expected\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.422,"exit_code":1,"observations":[{"actual":[["a","c","d","e","f"],[[0,1,2],[1,3,2]]],"check":"gap and degenerate","expected":[["a","c","d","e"],[[0,1,2],[1,3,2]]],"passed":false},{"actual":[["p","q","r","s"],[[0,1,1,2],[2,1,3]]],"check":"repeated but valid quad","expected":[["p","q","r","s"],[[0,1,1,2],[2,1,3]]],"passed":true},{"actual":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"check":"first use differs from index order","expected":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"passed":true},{"actual":[["x","y","z"],[]],"check":"only degenerate","expected":[[],[]],"passed":false},{"actual":[["x","y","z","w"],[[1,2,3]]],"check":"two-corner face","expected":[["y","z","w"],[[0,1,2]]],"passed":false},{"actual":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"check":"no gaps","expected":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"passed":true},{"actual":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"check":"high gap","expected":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gap and degenerate\", \"actual\": [[\"a\", \"c\", \"d\", \"e\", \"f\"], [[0, 1, 2], [1, 3, 2]]], \"expected\": [[\"a\", \"c\", \"d\", \"e\"], [[0, 1, 2], [1, 3, 2]]], \"passed\": false}, {\"check\": \"repeated but valid quad\", \"actual\": [[\"p\", \"q\", \"r\", \"s\"], [[0, 1, 1, 2], [2, 1, 3]]], \"expected\": [[\"p\", \"q\", \"r\", \"s\"], [[0, 1, 1, 2], [2, 1, 3]]], \"passed\": true}, {\"check\": \"first use differs from index order\", \"actual\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"expected\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"passed\": true}, {\"check\": \"only degenerate\", \"actual\": [[\"x\", \"y\", \"z\"], []], \"expected\": [[], []], \"passed\": false}, {\"check\": \"two-corner face\", \"actual\": [[\"x\", \"y\", \"z\", \"w\"], [[1, 2, 3]]], \"expected\": [[\"y\", \"z\", \"w\"], [[0, 1, 2]]], \"passed\": false}, {\"check\": \"no gaps\", \"actual\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"expected\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"passed\": true}, {\"check\": \"high gap\", \"actual\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"expected\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.429,"exit_code":0,"observations":[{"actual":[["a","c","d","e"],[[0,1,2],[1,3,2]]],"check":"gap and degenerate","expected":[["a","c","d","e"],[[0,1,2],[1,3,2]]],"passed":true},{"actual":[["p","q","r","s"],[[0,1,1,2],[2,1,3]]],"check":"repeated but valid quad","expected":[["p","q","r","s"],[[0,1,1,2],[2,1,3]]],"passed":true},{"actual":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"check":"first use differs from index order","expected":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"passed":true},{"actual":[[],[]],"check":"only degenerate","expected":[[],[]],"passed":true},{"actual":[["y","z","w"],[[0,1,2]]],"check":"two-corner face","expected":[["y","z","w"],[[0,1,2]]],"passed":true},{"actual":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"check":"no gaps","expected":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"passed":true},{"actual":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"check":"high gap","expected":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gap and degenerate\", \"actual\": [[\"a\", \"c\", \"d\", \"e\"], [[0, 1, 2], [1, 3, 2]]], \"expected\": [[\"a\", \"c\", \"d\", \"e\"], [[0, 1, 2], [1, 3, 2]]], \"passed\": true}, {\"check\": \"repeated but valid quad\", \"actual\": [[\"p\", \"q\", \"r\", \"s\"], [[0, 1, 1, 2], [2, 1, 3]]], \"expected\": [[\"p\", \"q\", \"r\", \"s\"], [[0, 1, 1, 2], [2, 1, 3]]], \"passed\": true}, {\"check\": \"first use differs from index order\", \"actual\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"expected\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"passed\": true}, {\"check\": \"only degenerate\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"two-corner face\", \"actual\": [[\"y\", \"z\", \"w\"], [[0, 1, 2]]], \"expected\": [[\"y\", \"z\", \"w\"], [[0, 1, 2]]], \"passed\": true}, {\"check\": \"no gaps\", \"actual\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"expected\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"passed\": true}, {\"check\": \"high gap\", \"actual\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"expected\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}