FA-88816 / Mesh topology invariants / Open access
Index identity uses the triangle multiplier for every mesh kind · case 01
Quad meshes report a failed identity.
ROOT CAUSE
The identity compares with 6*chi regardless of kind.
VERIFIED REPAIR
Compare with k*chi, k=6 for triangles and 4 for quads.
Unsuccessful approach: Hard-coding 4 fails triangle meshes instead.
Case contract
Input [faces, kind] with kind "tri" or "quad". Valence = number of edge neighbours; boundary vertices touch an edge used once. Regular valence is 6/4 (tri interior/boundary) or 4/3 (quad). Index sum = sum of (regular - valence). Return [index sum, chi=V-E+F, index sum == k*chi] with k=6 for tri and 4 for quad.
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):
faces,kind=x
nb={}
cnt={}
for f in faces:
n=len(f)
for i in range(n):
a,b=f[i],f[(i+1)%n]
nb.setdefault(a,set()).add(b)
nb.setdefault(b,set()).add(a)
k=(min(a,b),max(a,b))
cnt[k]=cnt.get(k,0)+1
bnd={v for k,c in cnt.items() if c==1 for v in k}
reg_i,reg_b,mult=(6,4,6) if kind=='tri' else (4,3,4)
idx=sum((reg_b if v in bnd else reg_i)-len(nb[v]) for v in nb)
chi=len(nb)-len(cnt)+len(faces)
return [idx,chi,idx==6*chi]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]]], [['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]], ['single quad', [[[[0, 1, 2, 3]], 'quad']], [4, 1, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]]]
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 |
|---|---|---|---|
| tetrahedron | [12, 2, True] | [12, 2, True] | Passed |
| octahedron | [12, 2, True] | [12, 2, True] | Passed |
| disk | [6, 1, True] | [6, 1, True] | Passed |
| triangle torus | [0, 0, True] | [0, 0, True] | Passed |
| triangle grid | [6, 1, True] | [6, 1, True] | Passed |
| cube | [8, 2, False] | [8, 2, True] | Failed |
| quad grid | [4, 1, False] | [4, 1, True] | Failed |
SHA-256 / 6163431b9a27a3c94c12bd196d9cb56dfda3f485860efd29f5bc2de3e3ec0580
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
faces,kind=x
nb={}
cnt={}
for f in faces:
n=len(f)
for i in range(n):
a,b=f[i],f[(i+1)%n]
nb.setdefault(a,set()).add(b)
nb.setdefault(b,set()).add(a)
k=(min(a,b),max(a,b))
cnt[k]=cnt.get(k,0)+1
bnd={v for k,c in cnt.items() if c==1 for v in k}
reg_i,reg_b,mult=(6,4,6) if kind=='tri' else (4,3,4)
idx=sum((reg_b if v in bnd else reg_i)-len(nb[v]) for v in nb)
chi=len(nb)-len(cnt)+len(faces)
return [idx,chi,idx==4*chi]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]]], [['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]], ['single quad', [[[[0, 1, 2, 3]], 'quad']], [4, 1, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]]]
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 |
|---|---|---|---|
| tetrahedron | [12, 2, False] | [12, 2, True] | Failed |
| octahedron | [12, 2, False] | [12, 2, True] | Failed |
| disk | [6, 1, False] | [6, 1, True] | Failed |
| triangle torus | [0, 0, True] | [0, 0, True] | Passed |
| triangle grid | [6, 1, False] | [6, 1, True] | Failed |
| cube | [8, 2, True] | [8, 2, True] | Passed |
| quad grid | [4, 1, True] | [4, 1, True] | Passed |
SHA-256 / 05b40ead0eb8c743b4dfbc400b6bfe4899cd53e2935f65da95bb08b250cb31a0
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
faces,kind=x
nb={}
cnt={}
for f in faces:
n=len(f)
for i in range(n):
a,b=f[i],f[(i+1)%n]
nb.setdefault(a,set()).add(b)
nb.setdefault(b,set()).add(a)
k=(min(a,b),max(a,b))
cnt[k]=cnt.get(k,0)+1
bnd={v for k,c in cnt.items() if c==1 for v in k}
reg_i,reg_b,mult=(6,4,6) if kind=='tri' else (4,3,4)
idx=sum((reg_b if v in bnd else reg_i)-len(nb[v]) for v in nb)
chi=len(nb)-len(cnt)+len(faces)
return [idx,chi,idx==mult*chi]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]]], [['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]], ['single quad', [[[[0, 1, 2, 3]], 'quad']], [4, 1, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]]]
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 |
|---|---|---|---|
| tetrahedron | [12, 2, True] | [12, 2, True] | Passed |
| octahedron | [12, 2, True] | [12, 2, True] | Passed |
| disk | [6, 1, True] | [6, 1, True] | Passed |
| triangle torus | [0, 0, True] | [0, 0, True] | Passed |
| triangle grid | [6, 1, True] | [6, 1, True] | Passed |
| cube | [8, 2, True] | [8, 2, True] | Passed |
| quad grid | [4, 1, True] | [4, 1, True] | Passed |
SHA-256 / b6489ca0a8b8b012555d7b9998e763c1ea6a5e0e52f44ea3ae75c4d23e2db3ad
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:11.634255+00:00.
Case digest / 864b082b721ba96e651158e49c641e61136878a70e4ae824c80ce191a2dc2f35