FA-88606 / Mesh topology invariants / Open access
Welding judges collapse on the original face size · case 01
Faces that weld down to one or two corners are kept.
ROOT CAUSE
The size test uses the input face length instead of the merged corner list.
VERIFIED REPAIR
Drop faces whose merged corner list has fewer than 3 entries.
Unsuccessful approach: Counting distinct ids drops faces like [0,1,0,1] that the contract keeps.
Case 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].
Why this case matters
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.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
pts,faces,eps=x
key_to_new={}
remap=[]
reps=[]
for i,p in enumerate(pts):
k=tuple(math.floor(c/eps+0.5) for c in p)
if k not in key_to_new:
key_to_new[k]=len(reps)
reps.append(i)
remap.append(key_to_new[k])
out=[]
seen=set()
for f in faces:
g=[remap[v] for v in f]
h=[]
for v in g:
if not h or h[-1]!=v: h.append(v)
while len(h)>1 and h[0]==h[-1]: h.pop()
if len(f)<3: continue
m=h.index(min(h))
c=tuple(h[m:]+h[:m])
if c in seen: continue
seen.add(c)
out.append(list(c))
return [reps,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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]]]], ['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]]]]], [['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]]]]], [['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| near duplicate corner | [[0, 1, 2], [[0, 1, 2], [1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Failed |
| negative coordinates | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | Passed |
| half grid step | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | Passed |
| collapsing triangle | [[0, 2, 3], [[0, 1], [0, 1, 2]]] | [[0, 2, 3], [[0, 1, 2]]] | Failed |
| rotated duplicate | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | Passed |
| wrap-around duplicate | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| two-corner collapse | [[0, 2], [[0, 1, 0, 1]]] | [[0, 2], [[0, 1, 0, 1]]] | Passed |
SHA-256 / eb2842dc0fb4f19ad66cb0bc6a46809dc9e0a2c86137c5bec9dd00d88a317262
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
pts,faces,eps=x
key_to_new={}
remap=[]
reps=[]
for i,p in enumerate(pts):
k=tuple(math.floor(c/eps+0.5) for c in p)
if k not in key_to_new:
key_to_new[k]=len(reps)
reps.append(i)
remap.append(key_to_new[k])
out=[]
seen=set()
for f in faces:
g=[remap[v] for v in f]
h=[]
for v in g:
if not h or h[-1]!=v: h.append(v)
while len(h)>1 and h[0]==h[-1]: h.pop()
if len(set(h))<3: continue
m=h.index(min(h))
c=tuple(h[m:]+h[:m])
if c in seen: continue
seen.add(c)
out.append(list(c))
return [reps,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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]]]], ['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]]]]], [['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]]]]], [['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| near duplicate corner | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| negative coordinates | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | Passed |
| half grid step | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | Passed |
| collapsing triangle | [[0, 2, 3], [[0, 1, 2]]] | [[0, 2, 3], [[0, 1, 2]]] | Passed |
| rotated duplicate | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | Passed |
| wrap-around duplicate | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| two-corner collapse | [[0, 2], []] | [[0, 2], [[0, 1, 0, 1]]] | Failed |
SHA-256 / 4d546855a55958d03731cf76eda5854bb1d8f755152b39609a2cbe9717f665d7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
pts,faces,eps=x
key_to_new={}
remap=[]
reps=[]
for i,p in enumerate(pts):
k=tuple(math.floor(c/eps+0.5) for c in p)
if k not in key_to_new:
key_to_new[k]=len(reps)
reps.append(i)
remap.append(key_to_new[k])
out=[]
seen=set()
for f in faces:
g=[remap[v] for v in f]
h=[]
for v in g:
if not h or h[-1]!=v: h.append(v)
while len(h)>1 and h[0]==h[-1]: h.pop()
if len(h)<3: continue
m=h.index(min(h))
c=tuple(h[m:]+h[:m])
if c in seen: continue
seen.add(c)
out.append(list(c))
return [reps,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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]]]], ['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]]]]], [['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]]]]], [['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| near duplicate corner | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| negative coordinates | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | Passed |
| half grid step | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | Passed |
| collapsing triangle | [[0, 2, 3], [[0, 1, 2]]] | [[0, 2, 3], [[0, 1, 2]]] | Passed |
| rotated duplicate | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | Passed |
| wrap-around duplicate | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| two-corner collapse | [[0, 2], [[0, 1, 0, 1]]] | [[0, 2], [[0, 1, 0, 1]]] | Passed |
SHA-256 / 5f0d2825a3d89ecef2dfaf59e241fd5ea10726ea98e78f97e5d8ebe51da83a4a
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:51:09.678491+00:00.
Case digest / 535a757c16670938090ef51f0c3c1815324ec3fa49e8d9cf4a9a84e35983fc21