Summary
compound_cut (and the equivalent sequential multi-cut path) is only robust for a single tool. With 2+ tools it produces non-manifold, non-deterministic (varies across processes), and geometrically incorrect (under-cut or catastrophically over-cut) results.
This surfaced while root-causing a flaky CI Coverage failure in compound_cut_matches_sequential_4x4_grid.
Evidence
Probed compound_cut(box, [cylinder tools]) with manifold + volume checks across repeated runs:
| tools |
manifold |
volume |
expected |
deterministic? |
| 1 |
✅ true |
793.99 |
793.72 |
✅ identical every run |
| 2 |
❌ flips |
~790 |
787.4 |
❌ nf 54–59 |
| 3 |
❌ flips |
~784 |
781.2 |
❌ nf 90–92 |
| 4×4 (16) |
❌ |
~530 |
~775 |
❌ nf 31–187 |
| 4×4 box tools |
✅ |
264.7 |
~768 |
deterministic but completely wrong (nf=6, no holes) |
So only n=1 is correct. For n≥2 the result is unusable.
Root mechanism
Multi-tool cuts route cylinder-box through the mesh-boolean fallback, which re-triangulates and re-cuts already-faceted geometry. Two compounding problems:
- Non-determinism — seed-dependent
std::HashMap iteration in the merge/assembly path (signature: identical within a process, varies across processes). One concrete site fixed in this PR (heal::unify_same_domain into_values() ordering), but the under-cutting persists.
- Under-cutting / corruption — re-cutting faceted mesh-boolean output repeatedly misses intersections and welds vertices incorrectly, so most holes are not punched through (or the solid is corrupted).
Test debt
The compound_cut_matches_sequential_{2x2,3x3,4x4}_grid and compound_cut_shelled_* tests assert only vol < box * 0.99, which passes on any volume reduction — including garbage. They never validated correctness; they are currently #[ignore]d as flaky. A meaningful regression test can only assert the single-tool case until the multi-tool path is fixed.
Scope
This is GFA-rewrite robustness territory (see the GFA parity / rewrite effort). Fixing it properly likely means routing multi-tool cuts through a single robust pass rather than iterated mesh-boolean co-refinement.
Acceptance criteria
Summary
compound_cut(and the equivalent sequential multi-cut path) is only robust for a single tool. With 2+ tools it produces non-manifold, non-deterministic (varies across processes), and geometrically incorrect (under-cut or catastrophically over-cut) results.This surfaced while root-causing a flaky CI Coverage failure in
compound_cut_matches_sequential_4x4_grid.Evidence
Probed
compound_cut(box, [cylinder tools])with manifold + volume checks across repeated runs:nf54–59nf90–92nf31–187So only
n=1is correct. Forn≥2the result is unusable.Root mechanism
Multi-tool cuts route cylinder-box through the mesh-boolean fallback, which re-triangulates and re-cuts already-faceted geometry. Two compounding problems:
std::HashMapiteration in the merge/assembly path (signature: identical within a process, varies across processes). One concrete site fixed in this PR (heal::unify_same_domaininto_values()ordering), but the under-cutting persists.Test debt
The
compound_cut_matches_sequential_{2x2,3x3,4x4}_gridandcompound_cut_shelled_*tests assert onlyvol < box * 0.99, which passes on any volume reduction — including garbage. They never validated correctness; they are currently#[ignore]d as flaky. A meaningful regression test can only assert the single-tool case until the multi-tool path is fixed.Scope
This is GFA-rewrite robustness territory (see the GFA parity / rewrite effort). Fixing it properly likely means routing multi-tool cuts through a single robust pass rather than iterated mesh-boolean co-refinement.
Acceptance criteria
compound_cutwith N≥2 well-separated tools produces a manifold solidbox − Σ(tool∩box)within tessellation tolerance< box*0.99)