Skip to content

Add symbolic-based mesh boolean engine - #89

Closed
hdclark wants to merge 436 commits into
masterfrom
boolean_symbolic
Closed

hdclark wants to merge 436 commits into
masterfrom
boolean_symbolic

Conversation

@hdclark

@hdclark hdclark commented Jul 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

hdclark commented Jul 13, 2026

Copy link
Copy Markdown
Owner Author

I added tests/MeshBooleanPlanGapCases.md and updated tracker.md with explicit TDD gates for the plan-level issues raised in review.

The new cases cover:

  1. vertex- and edge-touching cube unions whose exact boundaries are non-manifold;
  2. a cube/prism intersection producing exact 1/3 coordinates, separating exact-in-T output from certified approximation;
  3. geometric-point identity versus topological vertex/link occurrences;
  4. isolated-contact and multi-plane spherical vertex-link construction;
  5. cube-corner patch-side probes that remain on adjacent boundary planes;
  6. the need to choose complete cell propagation or independent patch-side classification;
  7. rounded vertices that preserve triangle topology but violate defining exact carrier/plane incidences;
  8. exponential global realization search versus constraint-component decomposition;
  9. self-consistent artifact mutations that only a genuinely independent verifier should reject.

Several cases intentionally require a contract decision before they can be registered in CTest—for example, a dedicated unsupported-result-topology failure and a distinction between exact-in-T and approximate certified output. The document gives exact coordinates, operation matrices, stage-level assertions, mutation tests, and registration guidance so they can be converted directly into executable regression tests.

hdclark commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

Diagnosed MeshBooleanRealization.Unit failure as an implementation defect in Component 8, not a plan defect. patch_interior() uses an incomplete centroid-of-three-outer-vertices heuristic; for the through-column square annulus, every candidate lies in the centered hole. The independent verifier also checks only outer-cycle containment and does not exclude holes.

I added root errata.md in commit 36686318584da25fa205cd289d2187a0fbed5e58 with exact implementation instructions, verifier correction, deterministic witness construction, regression requirements, and acceptance criteria. No architectural plan/schema change is required.

hdclark commented Jul 16, 2026

Copy link
Copy Markdown
Owner Author

Added an apply-ready manual patch series under patches/:

  1. patches/0001-exact-patch-interior-witness.patch
  2. patches/0002-verify-patch-probes-exclude-holes.patch
  3. patches/0003-regress-annular-patch-witness.patch

Apply from the repository root in order:

git apply --check patches/0001-exact-patch-interior-witness.patch
git apply --check patches/0002-verify-patch-probes-exclude-holes.patch
git apply --check patches/0003-regress-annular-patch-witness.patch
git apply patches/0001-exact-patch-interior-witness.patch
git apply patches/0002-verify-patch-probes-exclude-holes.patch
git apply patches/0003-regress-annular-patch-witness.patch

The series replaces the incomplete centroid witness heuristic with exact vertical decomposition, strengthens independent verification to exclude hole interiors, and adds a through-column annular regression before realization. errata.md has also been updated to reference the series and describe the same algorithm.

hdclark commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

I’m implementing the next outstanding tracker component, P0 — freeze product contracts, on boolean_symbolic. Scope is limited to the Plan 15 contract/schema/result-envelope/maturity/fail-closed policy work plus focused Component 1 tests and documentation; no normalization, fallback execution, or approximate geometry algorithms.

hdclark commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

P0 — Freeze product contracts is complete and tracker.md is updated.

Landed schema-3 product policy/result/provenance/replay contracts, immutable shared-lifetime exact/result ownership, explicit backend maturity and qualification rules, representation-specific capability checks, fail-closed fallback categories, strict bounded decoders, public support-boundary documentation, fixed option/replay golden vectors, and focused Component 1 tests.

Validation: the definitive focused workflow built the repository and passed MeshesBooleanContract plus MeshesBooleanProductContract under both GCC and Clang. Final tracker commit: c3d9d7e7f1d8681fce3d8c2b5caca03a5110d119.

The next outstanding tracker component is P1 — publish a durable authoritative exact result.

hdclark commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

Implemented tracker component P5.1 — stable provenance and attribute transfer.

Highlights:

  • added schema-7 source/provenance and attribute-transfer policies;
  • added canonical source catalogues, exact/output entity mappings, deterministic copy/split/merge/conflict/omission handling, bounded serialization, replay, and independent verification;
  • retained original-source provenance through normalization mappings;
  • covered body/shell/facet IDs, materials, face metadata, normals/colours, sharp edges, texture seams, opaque metadata, and construction provenance;
  • added adversarial tests for conflicts, seams, coincident contributors, removed internal facets, replay corruption, and attribute-value invariance;
  • checked P5.1 in tracker.md; P5.2 and P5.3 remain open.

Commits:

  • 72342804a6da47d5725a5dffc1b5f8e9bc59dfc1 — implementation, tests, docs, and tracker
  • dbba7298350603811991dac426529386b5b9dbe8 — permanent P5.1 validation workflow and temporary-workflow cleanup

Validation on the final commit is green:

  • Mesh Boolean P5.1 attributes: GCC and Clang
  • Mesh Boolean product contracts
  • Mesh Boolean P4 adapters

The final remote tree matches the locally validated tree exactly.

hdclark commented Jul 26, 2026

Copy link
Copy Markdown
Owner Author

Implemented tracker component P5.2 — the one-call conservative Boolean service.

Highlights:

  • added ordinary-caller boolean_operation(a, b, op, boolean_service_options) with conservative, fail-closed defaults;
  • defaulted to strict preparation, no geometry-changing normalization, no silent fallback, mandatory verification, explicit representation, retained exact authority, and qualification-manifest enforcement;
  • required explicit opt-in for the experimental backend and returned typed qualification/backend failures otherwise;
  • returned backend, preparation, exact-result, realization, attribute, verification, and qualification provenance in one immutable envelope;
  • added a separately named expert API for kernel, verifier, deterministic-executor, backend-registry, and immutable-store injection;
  • fixed durable strict-versus-normalized preparation binding by recording it in selected-boundary schema 4;
  • added cancellation, resource-limit, thread-count, replay, exception-containment, normalized-preparation, exact-retention, and partial-publication tests;
  • documented the service in docs/MeshBooleanService.md;
  • checked P5.2 in tracker.md; P5.3 remains open.

Commits:

  • 0e6d7fe7b0d9efa134d57a59a4a52bdf34a83386 — implementation, tests, docs, and tracker
  • f623853305efb601059797a6eb3a8effc6e9c33e — permanent P5.2 validation workflow and temporary-workflow cleanup

Validation on the final commit is green:

  • Mesh Boolean P5.2 service: GCC and Clang, including both verifier-isolation targets and all eight integration gates
  • Mesh Boolean P5.1 attributes
  • Mesh Boolean product contracts
  • Mesh Boolean P4 adapters

hdclark and others added 28 commits July 28, 2026 19:41
…ure guide

Reduce the frozen fuzz-duration floor from 24 CPU-hours to 10 minutes
(600 aggregate CPU-seconds) across the qualification matrix constant, the
P6.10 campaign driver, the frozen candidate fixtures, and the Plan 16 /
qualification documentation. This is the leadership cost-saving relaxation;
fail-closed evidence, false-success blocking, and minimization/promotion
requirements are unchanged.

Add docs/MeshBooleanBetaTesting.md so end users can report field failures
unambiguously (typed code/subcode/message-key, replay binding digest,
serialized operands, and environment) and reference it from the product
contract documentation.
…report

Add qualification_defect_kind, make_qualification_demotion_report, and qualification_report_authorizes_promotion so a discovered false success, unexplained disagreement, schema incompatibility, or material platform defect explicitly revokes or demotes a previously qualified profile. Add focused tests.

Commit the reproducible P6.11 qualification report naming the exact repository state and recording that the retained candidate campaign remains incomplete/blocking; no profile is qualified, qualified_default stays fail-closed, and all profiles remain experimental or candidate.
…mpaign mode

Add --available-toolchain to scripts/run_mesh_boolean_p610_campaign.sh so the
non-deferred frozen-manifest step and the six runnable fuzz allocations are
re-enabled with only the toolchain present on the invocation host. The frozen
matrix dimensions that need unavailable tools (oldest-supported compilers,
libc++, ThreadSanitizer, independent AArch64) and the two TSan fuzz allocations
are recorded as documented known limitations (a new non-blocking step status)
instead of blocking anomalies, and a completed run finalizes with the distinct
complete_limited_toolchain status.

Add the built-in non-deferred inventory dispatcher
scripts/run_p610_nondeferred_inventory.sh and clear campaign run/assess
instructions in tracker.md. Extend the driver self-test for the new inventory.
…ings

In --available-toolchain mode always use the built-in non-deferred inventory
dispatcher instead of an external P610_NONDEFERRED_CAMPAIGN_COMMAND, so a stale
environment variable cannot silently substitute /bin/true and skip the frozen
non-deferred manifest.

Record the limited available-toolchain campaign findings in the tracker
instructions: the reproducible B0-B8 frozen canonical-output identity drift
(root cause narrowed to a post-P12 productization commit changing canonical
bytes content), the instrumented Debug build cc1plus terminations at -j32, and
the Clang 7.0.1 libstdc++ exact_point3 destructor link failure.
…digests

- Give exact arithmetic/kernel value types out-of-line defaulted
  destructors so Clang 7.0.1/libstdc++ emits both complete-object (D1)
  and base-object (D2) destructor symbols, resolving the link-time
  'undefined reference to exact_point3::~exact_point3()' on the Clang
  profiles.
- Re-freeze B0-B8 output stage semantic digests after review: the
  selected_exact_boundary schema bump (3->4) and preparation-provenance
  fields from P2.1/P5.2 intentionally change the selection/realization/
  output digest chain while all structural counters and canonical byte
  counts are unchanged.
- Fix dangling references in property tests: binding a reference to
  context->performance()->stage(...) on a temporary shared_ptr leaves a
  dangling reference once the temporary is destroyed. Copy the
  performance_counter_snapshot/stage snapshot by value instead.
- Fix the independent symbolic-registry verifier: it indexes
  a.vertices[id] / a.curves[id] by canonical id without bounds checks,
  so a malformed (mutated-id) artifact caused a heap-buffer-overflow
  instead of a clean rejection. Reject ids that do not match their
  storage indices (and null upstream pointers) before any dereference,
  mirroring the structural invariant in valid().
ASan/UBSan (and TSan/MSan) slow the exact-arithmetic Boolean tests by
roughly an order of magnitude, so the fixed 300-600s timeouts turned six
correct tests (GlobalArrangement.Properties, CellClassification.Properties,
Selection.Properties, Approximate.Adversarial, Replay, PerformanceBaselines)
into false timeout failures. Scale every mesh Boolean CTest timeout by 6x
under WITH_ASAN/WITH_TSAN/WITH_MSAN so the timeout stays a safety cap rather
than a false failure.
…ions

Document the six campaign findings (B0-B8 digest drift, Clang D1/D2 ABI,
instrumented-build resource pressure, dangling test references, verifier
out-of-bounds, sanitizer test timeouts) and their in-tree resolutions, and
record the available-toolchain limited campaign as candidate evidence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants