FAILURE MAP
← Case archive

FA-88596 / Mesh topology invariants / Open access

Welding keeps a repeated corner across the face seam · case 01

A face whose last corner welds onto its first keeps a zero-length closing edge.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Consecutive merging does not compare the last corner with the first.

VERIFIED REPAIR

After merging runs, pop trailing corners equal to the first.

Unsuccessful approach: Trimming the raw corner list before merging misses seam repeats created by merged runs.

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)
        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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]]]]
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 fixtureActualExpectedOutcome
near duplicate corner[[0, 1, 2], [[0, 1, 2], [1, 2, 1]]][[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, 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]]][[0, 1, 2], [[0, 1, 2]]]Failed
trailing repeats[[0, 1, 2, 3], [[0, 1, 2, 0], [0, 2, 3]]][[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]Failed

SHA-256 / b183fdf1f1eb9a5166859dfa856e1613dbc560a39a2369ec54adaeae37240e7c

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]
        if g[0]==g[-1]: g=g[:-1]
        h=[]
        for v in g:
            if not h or h[-1]!=v: h.append(v)
        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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]]]]
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 fixtureActualExpectedOutcome
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
trailing repeats[[0, 1, 2, 3], [[0, 1, 2, 0], [0, 2, 3]]][[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]Failed

SHA-256 / 8d362c3f8b8b532ffa06ac24d65f919919645d9667a97ceb1a52f329a6c901ca

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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]], ['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]]]]]]
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 fixtureActualExpectedOutcome
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
trailing repeats[[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]][[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]Passed

SHA-256 / aa0f09650a42d1d986cc0172201413120003e91f3a251d470c847c44c025ad60

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.592453+00:00.

Case digest / c002c188b69197c0991ffc6d752fe0ca65cac0e4c3620f2c3ff8d73d1ee1640e