Me1063 — duplicate_polygons mark_treated: two groups; treated[] bit written for each removed polygon across both groups (Branch 10)

§12.14 mesh defects (sub-class: topology/duplicate)

spec-violation

Sources

Description

Polygon soup with two separate duplicate groups: Group A = {tri 0, tri 1, tri 2} with key (0,1,2); Group B = {tri 3, tri 4} with key (0,2,3). After group A is processed with KEEP_ONE, treated[1]=true and treated[2]=true are written (Branch 10 fires twice). When group B is processed, treated[4]=true is written for the group B removal. A total of 3 treated[] bit-writes occur — one per removed polygon across both groups. The fixture confirms that treated[] marks are written at line 1029 for every polygon moved to the back region.

Reproducer recipe

3 copies of (v0,v1,v2) + 2 copies of (v0,v2,v3) + 1 clean singleton; 3 treated[] writes total; erase shrinks from 6 to 3.

Expected kernel behavior

treated[1]=true, treated[2]=true (group A); treated[4]=true (group B); single erase removes 3 polygons.

Expected validation

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1{
2  "vertices": [
3    [
4      0.0,
5      0.0,
6      0.0
7    ],
8    [
9      1.0,
10      0.0,
11      0.0
12    ],
13    [
14      0.5,
15      1.0,
16      0.0
17    ],
18    [
19      0.5,
20      -1.0,
21      0.0
22    ],
23    [
24      1.5,
25      1.0,
26      0.0
27    ]
28  ],
29  "triangles": [
30    [
31      0,
32      1,
33      2
34    ],
35    [
36      0,
37      1,
38      2
39    ],
40    [
41      0,
42      1,
43      2
44    ],
45    [
46      0,
47      2,
48      3
49    ],
50    [
51      0,
52      2,
53      3
54    ],
55    [
56      1,
57      4,
58      2
59    ]
60  ],
61  "metadata": {
62    "id": "Me1063",
63    "schema_version": 0,
64    "defect_class": "duplicate_triangles",
65    "title": "duplicate_polygons mark_treated: two groups; treated[] written per removed polygon",
66    "assertions": [
67      {
68        "kind": "duplicate_polygon_group",
69        "triangles": [
70          0,
71          1,
72          2
73        ],
74        "n": 3
75      },
76      {
77        "kind": "duplicate_polygon_group",
78        "triangles": [
79          3,
80          4
81        ],
82        "n": 2
83      }
84    ]
85  }
86}