feat(geometry): opt-in retained product controller (M1-A, #7955)

Merged
LO
1mo ago
+9472-82

Refs #7955. This is M1 PR A of the reset plan (CLI explicit retained mode), and it lands first.

What it adds. The retained product controller, behind the off-by-default retained-runtime feature. It walks a real product's items (mapped items, placements, Booleans) into Construction, Affine and Boolean operations, each with a typed failure origin. It is lifted from the #8143 and #8145 stack, with the generated contracts, diagnostics and 187 historical oracle patches dropped.

Nothing calls it yet. Upcoming PRs: the product budget (B), the target-neutral executor with typed refusals (C), then the native driver and corpus comparison (D), the wasm runtime (E) and the CLI --kernel retained (F).

Default path. Exact output is unchanged. Without the feature, the retained selection is uninhabited, so every hook folds to false. The non-gated edits are behaviour-neutral refactors: operator_xz_axes is the same maths, and the mapping constructors moved into mapping_entries.rs. No new non-test panics.

CI.

  • rust-tests, the PR lane, now runs cargo test/clippy -D warnings for ifc-lite-geometry --features retained-runtime and clippy for ifc-lite-processing --features retained-runtime.
  • Revert oracle: tests/evidence/m1-a-controller-core/behaviour.oracle.patch (reverse-applied), observed by the feature-gated integration test rust/geometry/tests/m1_controller.rs.
  • Tolerances for the later retained-vs-exact comparison are pre-registered in tests/fixtures/cli-retained/tolerances.json before any retained run.

Validation at f0ab7c5d76, on the PC fleet worker, exit 0, source unchanged:

  • workspace clippy -D warnings, default and with the feature;
  • geometry and processing tests, default and with the feature;
  • revert oracle OBSERVED;
  • module-size, refwalk, CI-path-coverage and test-wiring guards.

The lift was reviewed independently twice against the plan; all findings were fixed.

Supersedes the controller parts of #8143 and #8145, which close once this stack lands.

šŸ¤– Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added an opt-in retained geometry runtime for planning product parts, submeshes, and type maps while preserving source geometry, placements, and presentation data.
    • Added transaction APIs for requesting, validating, accepting, and completing geometry plans.
    • Added a WASM API for exporting exact section intersections.
  • Bug Fixes

    • Improved validation and diagnostics for malformed mappings, directions, Boolean operands, and geometry frames.
    • Clarified when unresolved alignments or malformed grid axes are omitted.
  • Tests

    • Expanded coverage for retained geometry, mapping behavior, resource limits, and transaction handling.