{"abstract":"The output vertex order depends on face order instead of the original index order.","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":"Descending order reverses the vertex array.","family":"w2-mesh_topology_invariants-vertex-compaction-renumbering-order","id":"FA-88571","implementations":{"attempt":{"sha256":"c5942366f0f6f8372f6661bd5dba60897185d1a22fcad1aa873bfe1d8b074c6d","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},reverse=True)\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]]]]], [['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]]]], ['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]]]], ['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]]]], ['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]]]]], [['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]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]]], [['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]]]]]]\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":"577d1757af01d29d07de74a4eeb4f6545dd612a69ac18e047091b7fc05ced4b3","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=list(dict.fromkeys(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]]]]], [['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]]]], ['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]]]], ['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]]]], ['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]]]]], [['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]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]]], [['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]]]]]]\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":"a62b52aa7e433b7eb466d5b09bd4bf1658b3d2bbd5b8b2d121dfe3fce8039a7e","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]]]]], [['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]]]], ['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]]]], ['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]]]], ['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]]]]], [['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]]]], ['degenerate references isolated vertex', [[['a', 'b', 'c', 'd', 'e'], [[1, 2, 3], [0, 0, 4]]]], [['b', 'c', 'd'], [[0, 1, 2]]]]], [['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]]]]]]\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-renumbering-order","generated_at":"2026-09-29T14:51:09.414325+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":"Assign new indices by increasing old index.","root_cause":"New indices follow the first appearance in faces.","sha256":"14552ad04f93c7930cb0e2e53ff58f1d83aed55cfe7c183ed8b20ce619ecb9b8","title":"Compaction numbers vertices in first-use order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.551,"exit_code":1,"observations":[{"actual":[["e","d","c","a"],[[3,2,1],[2,0,1]]],"check":"gap and degenerate","expected":[["a","c","d","e"],[[0,1,2],[1,3,2]]],"passed":false},{"actual":[["s","r","q","p"],[[3,2,2,1],[1,2,0]]],"check":"repeated but valid quad","expected":[["p","q","r","s"],[[0,1,1,2],[2,1,3]]],"passed":false},{"actual":[["v4","v3","v2","v0"],[[0,2,1],[1,2,3]]],"check":"first use differs from index order","expected":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"passed":false},{"actual":[[],[]],"check":"only degenerate","expected":[[],[]],"passed":true},{"actual":[["w","z","y"],[[2,1,0]]],"check":"two-corner face","expected":[["y","z","w"],[[0,1,2]]],"passed":false},{"actual":[["d","c","b","a"],[[3,1,2],[3,2,0],[2,1,0],[3,0,1]]],"check":"no gaps","expected":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"passed":false},{"actual":[["h","g","f","b"],[[2,1,0],[0,1,2,3]]],"check":"high gap","expected":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gap and degenerate\", \"actual\": [[\"e\", \"d\", \"c\", \"a\"], [[3, 2, 1], [2, 0, 1]]], \"expected\": [[\"a\", \"c\", \"d\", \"e\"], [[0, 1, 2], [1, 3, 2]]], \"passed\": false}, {\"check\": \"repeated but valid quad\", \"actual\": [[\"s\", \"r\", \"q\", \"p\"], [[3, 2, 2, 1], [1, 2, 0]]], \"expected\": [[\"p\", \"q\", \"r\", \"s\"], [[0, 1, 1, 2], [2, 1, 3]]], \"passed\": false}, {\"check\": \"first use differs from index order\", \"actual\": [[\"v4\", \"v3\", \"v2\", \"v0\"], [[0, 2, 1], [1, 2, 3]]], \"expected\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"passed\": false}, {\"check\": \"only degenerate\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"two-corner face\", \"actual\": [[\"w\", \"z\", \"y\"], [[2, 1, 0]]], \"expected\": [[\"y\", \"z\", \"w\"], [[0, 1, 2]]], \"passed\": false}, {\"check\": \"no gaps\", \"actual\": [[\"d\", \"c\", \"b\", \"a\"], [[3, 1, 2], [3, 2, 0], [2, 1, 0], [3, 0, 1]]], \"expected\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"passed\": false}, {\"check\": \"high gap\", \"actual\": [[\"h\", \"g\", \"f\", \"b\"], [[2, 1, 0], [0, 1, 2, 3]]], \"expected\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.771,"exit_code":1,"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":[["v4","v2","v3","v0"],[[0,1,2],[2,1,3]]],"check":"first use differs from index order","expected":[["v0","v2","v3","v4"],[[3,1,2],[2,1,0]]],"passed":false},{"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","c","b","d"],[[0,1,2],[0,2,3],[2,1,3],[0,3,1]]],"check":"no gaps","expected":[["a","b","c","d"],[[0,2,1],[0,1,3],[1,2,3],[0,3,2]]],"passed":false},{"actual":[["f","g","h","b"],[[0,1,2],[2,1,0,3]]],"check":"high gap","expected":[["b","f","g","h"],[[1,2,3],[3,2,1,0]]],"passed":false}],"passed":false,"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\": [[\"v4\", \"v2\", \"v3\", \"v0\"], [[0, 1, 2], [2, 1, 3]]], \"expected\": [[\"v0\", \"v2\", \"v3\", \"v4\"], [[3, 1, 2], [2, 1, 0]]], \"passed\": false}, {\"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\", \"c\", \"b\", \"d\"], [[0, 1, 2], [0, 2, 3], [2, 1, 3], [0, 3, 1]]], \"expected\": [[\"a\", \"b\", \"c\", \"d\"], [[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]]], \"passed\": false}, {\"check\": \"high gap\", \"actual\": [[\"f\", \"g\", \"h\", \"b\"], [[0, 1, 2], [2, 1, 0, 3]]], \"expected\": [[\"b\", \"f\", \"g\", \"h\"], [[1, 2, 3], [3, 2, 1, 0]]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.784,"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"}