FAILURE MAP
← Case archive

FA-88686 / Mesh topology invariants / Open access

Make-edge-face does not add the new face loop · case 01

Every face-closing operation reports a broken invariant or too few loops.

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

ROOT CAUSE

The mef delta increments E and F but leaves L unchanged.

THE FAILURE

The mef delta increments E and F but leaves L unchanged.

Unsuccessful approach: Adding two loops overcounts the ring structure.

Case contract

Input: list of Euler operator names applied to counts [V,E,F,L,S,G] starting at zero. Deltas: mvfs(+V,+F,+L,+S), mev(+V,+E), mef(+E,+F,+L), kemr(-E,+L), mekr(+E,-L), kfmrh(-F,+G) and their inverses kvfs, kev, kef, mfkrh. After each op: an unknown name returns ["unknown", i]; a negative count or fewer loops than faces returns ["invalid", i]; a violated Euler-Poincare relation V-E+F-(L-F)=2(S-G) returns ["broken-invariant", i]. Return the final counts.

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):
    ops=x
    V=E=Fc=L=S=G=0
    D={'mvfs':(1,0,1,1,1,0),'kvfs':(-1,0,-1,-1,-1,0),'mev':(1,1,0,0,0,0),'kev':(-1,-1,0,0,0,0),
       'mef':(0,1,1,0,0,0),'kef':(0,-1,-1,-1,0,0),'kemr':(0,-1,0,1,0,0),'mekr':(0,1,0,-1,0,0),
       'kfmrh':(0,0,-1,0,0,1),'mfkrh':(0,0,1,0,0,-1)}
    for i,op in enumerate(ops):
        if op not in D: return ['unknown',i]
        d=D[op]
        V,E,Fc,L,S,G=V+d[0],E+d[1],Fc+d[2],L+d[3],S+d[4],G+d[5]
        if min(V,E,Fc,L,S,G)<0 or L<Fc: return ['invalid',i]
        if V-E+Fc-(L-Fc)!=2*(S-G): return ['broken-invariant',i]
    return [V,E,Fc,L,S,G]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['triangle lamina', [['mvfs', 'mev', 'mev', 'mef']], [3, 3, 2, 2, 1, 0]], ['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['square with hole ring', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr']], [7, 7, 3, 4, 1, 0]], ['torus handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh']], [7, 7, 2, 4, 1, 1]], ['undo handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mfkrh']], [7, 7, 3, 4, 1, 0]], ['ring then remake edge', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'kemr', 'mekr']], [4, 4, 2, 2, 1, 0]], ['kill edge on empty', [['mvfs', 'kev']], ['invalid', 1]]], [['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['undo handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mfkrh']], [7, 7, 3, 4, 1, 0]], ['ring then remake edge', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'kemr', 'mekr']], [4, 4, 2, 2, 1, 0]], ['kill edge on empty', [['mvfs', 'kev']], ['invalid', 1]], ['unknown op', [['mvfs', 'mev', 'split']], ['unknown', 2]], ['uppercase op', [['mvfs', 'MEV']], ['unknown', 1]], ['loop deficit', [['mvfs', 'mev', 'mekr']], ['invalid', 2]]], [['square with hole ring', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr']], [7, 7, 3, 4, 1, 0]], ['unknown op', [['mvfs', 'mev', 'split']], ['unknown', 2]], ['uppercase op', [['mvfs', 'MEV']], ['unknown', 1]], ['loop deficit', [['mvfs', 'mev', 'mekr']], ['invalid', 2]], ['two shells', [['mvfs', 'mev', 'mvfs', 'mev', 'mev', 'mef']], [5, 4, 3, 3, 2, 0]], ['face without loop', [['mvfs', 'mfkrh']], ['invalid', 1]], ['build and kill', [['mvfs', 'mev', 'mev', 'mef', 'kef', 'kev', 'kev', 'kvfs']], [0, 0, 0, 0, 0, 0]]], [['triangle lamina', [['mvfs', 'mev', 'mev', 'mef']], [3, 3, 2, 2, 1, 0]], ['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['torus handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh']], [7, 7, 2, 4, 1, 1]], ['two shells', [['mvfs', 'mev', 'mvfs', 'mev', 'mev', 'mef']], [5, 4, 3, 3, 2, 0]], ['face without loop', [['mvfs', 'mfkrh']], ['invalid', 1]], ['build and kill', [['mvfs', 'mev', 'mev', 'mef', 'kef', 'kev', 'kev', 'kvfs']], [0, 0, 0, 0, 0, 0]], ['hole into lamina', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mev']], [7, 7, 2, 4, 1, 1]]], [['triangle lamina', [['mvfs', 'mev', 'mev', 'mef']], [3, 3, 2, 2, 1, 0]], ['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['square with hole ring', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr']], [7, 7, 3, 4, 1, 0]], ['torus handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh']], [7, 7, 2, 4, 1, 1]], ['undo handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mfkrh']], [7, 7, 3, 4, 1, 0]], ['ring then remake edge', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'kemr', 'mekr']], [4, 4, 2, 2, 1, 0]], ['hole into lamina', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mev']], [7, 7, 2, 4, 1, 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 fixtureActualExpectedOutcome
triangle lamina['invalid', 3][3, 3, 2, 2, 1, 0]Failed
tetrahedron['invalid', 3][4, 6, 4, 4, 1, 0]Failed
square with hole ring['invalid', 4][7, 7, 3, 4, 1, 0]Failed
torus handle['invalid', 4][7, 7, 2, 4, 1, 1]Failed
undo handle['invalid', 4][7, 7, 3, 4, 1, 0]Failed
ring then remake edge['invalid', 3][4, 4, 2, 2, 1, 0]Failed
kill edge on empty['invalid', 1]['invalid', 1]Passed

SHA-256 / c70f817a9a1753831f7fdd01cdaff68a5b6ca3b0beae3f4261187ecb0eca8a08

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    ops=x
    V=E=Fc=L=S=G=0
    D={'mvfs':(1,0,1,1,1,0),'kvfs':(-1,0,-1,-1,-1,0),'mev':(1,1,0,0,0,0),'kev':(-1,-1,0,0,0,0),
       'mef':(0,1,1,2,0,0),'kef':(0,-1,-1,-1,0,0),'kemr':(0,-1,0,1,0,0),'mekr':(0,1,0,-1,0,0),
       'kfmrh':(0,0,-1,0,0,1),'mfkrh':(0,0,1,0,0,-1)}
    for i,op in enumerate(ops):
        if op not in D: return ['unknown',i]
        d=D[op]
        V,E,Fc,L,S,G=V+d[0],E+d[1],Fc+d[2],L+d[3],S+d[4],G+d[5]
        if min(V,E,Fc,L,S,G)<0 or L<Fc: return ['invalid',i]
        if V-E+Fc-(L-Fc)!=2*(S-G): return ['broken-invariant',i]
    return [V,E,Fc,L,S,G]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['triangle lamina', [['mvfs', 'mev', 'mev', 'mef']], [3, 3, 2, 2, 1, 0]], ['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['square with hole ring', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr']], [7, 7, 3, 4, 1, 0]], ['torus handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh']], [7, 7, 2, 4, 1, 1]], ['undo handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mfkrh']], [7, 7, 3, 4, 1, 0]], ['ring then remake edge', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'kemr', 'mekr']], [4, 4, 2, 2, 1, 0]], ['kill edge on empty', [['mvfs', 'kev']], ['invalid', 1]]], [['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['undo handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mfkrh']], [7, 7, 3, 4, 1, 0]], ['ring then remake edge', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'kemr', 'mekr']], [4, 4, 2, 2, 1, 0]], ['kill edge on empty', [['mvfs', 'kev']], ['invalid', 1]], ['unknown op', [['mvfs', 'mev', 'split']], ['unknown', 2]], ['uppercase op', [['mvfs', 'MEV']], ['unknown', 1]], ['loop deficit', [['mvfs', 'mev', 'mekr']], ['invalid', 2]]], [['square with hole ring', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr']], [7, 7, 3, 4, 1, 0]], ['unknown op', [['mvfs', 'mev', 'split']], ['unknown', 2]], ['uppercase op', [['mvfs', 'MEV']], ['unknown', 1]], ['loop deficit', [['mvfs', 'mev', 'mekr']], ['invalid', 2]], ['two shells', [['mvfs', 'mev', 'mvfs', 'mev', 'mev', 'mef']], [5, 4, 3, 3, 2, 0]], ['face without loop', [['mvfs', 'mfkrh']], ['invalid', 1]], ['build and kill', [['mvfs', 'mev', 'mev', 'mef', 'kef', 'kev', 'kev', 'kvfs']], [0, 0, 0, 0, 0, 0]]], [['triangle lamina', [['mvfs', 'mev', 'mev', 'mef']], [3, 3, 2, 2, 1, 0]], ['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['torus handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh']], [7, 7, 2, 4, 1, 1]], ['two shells', [['mvfs', 'mev', 'mvfs', 'mev', 'mev', 'mef']], [5, 4, 3, 3, 2, 0]], ['face without loop', [['mvfs', 'mfkrh']], ['invalid', 1]], ['build and kill', [['mvfs', 'mev', 'mev', 'mef', 'kef', 'kev', 'kev', 'kvfs']], [0, 0, 0, 0, 0, 0]], ['hole into lamina', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mev']], [7, 7, 2, 4, 1, 1]]], [['triangle lamina', [['mvfs', 'mev', 'mev', 'mef']], [3, 3, 2, 2, 1, 0]], ['tetrahedron', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mef', 'mef']], [4, 6, 4, 4, 1, 0]], ['square with hole ring', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr']], [7, 7, 3, 4, 1, 0]], ['torus handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh']], [7, 7, 2, 4, 1, 1]], ['undo handle', [['mvfs', 'mev', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mfkrh']], [7, 7, 3, 4, 1, 0]], ['ring then remake edge', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'kemr', 'mekr']], [4, 4, 2, 2, 1, 0]], ['hole into lamina', [['mvfs', 'mev', 'mev', 'mef', 'mev', 'mev', 'mev', 'mef', 'kemr', 'kfmrh', 'mev']], [7, 7, 2, 4, 1, 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 fixtureActualExpectedOutcome
triangle lamina['broken-invariant', 3][3, 3, 2, 2, 1, 0]Failed
tetrahedron['broken-invariant', 3][4, 6, 4, 4, 1, 0]Failed
square with hole ring['broken-invariant', 4][7, 7, 3, 4, 1, 0]Failed
torus handle['broken-invariant', 4][7, 7, 2, 4, 1, 1]Failed
undo handle['broken-invariant', 4][7, 7, 3, 4, 1, 0]Failed
ring then remake edge['broken-invariant', 3][4, 4, 2, 2, 1, 0]Failed
kill edge on empty['invalid', 1]['invalid', 1]Passed

SHA-256 / 3f74798b49e64d74989980547cbd016504f05aa4da1a4006a52d34bc4f68b24b

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 24687dd1e6576037947a06524289f8d035223f449399c893a69772f6354981f3