Repository navigation
feat: deliver the remaining fork work (A13, A03, A04, A12.3, P13, CLI test speed-ups) - #734
Conversation
…bers One cumulative delivery of the fork work upstream does not have yet, carried as a single squashed commit on a fresh upstream/master base: - A13 fabrications: fabrication records in the engine, line, polygon and part cuts, fit, chamfer, split and combine as A-2 operation records, with the CLI acceptance suite and the design note. - A03 cut records: atomic updates with immutable retry evidence and removals that never reuse record or semantic cap identities; cut creation replays from immutable accepted evidence. - A04 hole records: canonical immutable replay updates and removals with persistent, non-reusable identities. - A12 plate corners: corner treatments replace and clear atomically (A12.3 prerequisite) on top of the chamfer/rounding contour work. - P13 curved members: circular member paths authored with true arc length and bounded meshes. - CLI test suite: all integration suites build into one `cli` test binary (one link, cases on one thread pool) with shared fixtures and an updated nextest profile; no case dropped. - Documentation: accepted MVP contract amendments and design-note updates for every shipped feature. Co-Authored-By: Claude Code <[email protected]>
|
Review in progress |
axisrow
left a comment
There was a problem hiding this comment.
Verdict: changes requested
Four findings require changes (inline); everything else in the 128-file diff reviewed clean.
Findings
-
A13 instance-group members are authored from stale bodies.
shared_with_cuts/shared_with_holesclone the body from the base decode, while the existing cut-by-plane path gives every group member the canonical freshly evaluated body. After a cut-by-line/polygon/part/fit/chamfer on a canonical element with P11 instances, the committed revision carries pre-cut meshes and quantities for every instance.tests/a13.rshas no instance-group case to catch it. -
a13_recordbypasses the A03/A04 identity contract. Its used-id set covers live records only, and admission derives the ordinal from live cuts instead of the persistent counter. The contract in docs/design/a03-cut-retirement.md and a04-hole-retirement.md (future cuts allocate from the counter; retired UUIDs never reactivate; cross-kind uniqueness including retired records) is enforced in apply_cut/apply_hole but not in the seven A13 paths that write the same record vocabulary: a cut-by-line can reuse a removed record UUID and a retired ordinal. -
edit-draftingreplay no longer binds the incoming drafting. The retry fingerprint is computed from the accepted drawing alone, so a retry under the same op-id with changed or empty --drafting silently replays the accepted result instead of refusing OP_ID_REUSE. The upstream test this PR deletes (drafting_replay_binds_the_incoming_geometry_even_after_later_edits) asserts exactly the strict behavior. The PR body discloses the dropped test but not this semantics change; as shipped it is a regression of operation-identity immutability relative to master. -
A04 update/remove reach A13 records. update_hole and remove_hole match any hole_records entry by operation_id without a kind check, and the CLI adds no guard either, so update-hole can replace a polygon_cut record and remove-hole can retire an A13 record through the A04 adapter. This is the kind-guard follow-up already known from the fork review; it should land with this delivery.
Notes (no change requested)
- The module doc added at the top of src/cut.rs says replay reads immutable accepted request evidence; that is true for update-cut/remove-cut and the hole paths, but a13_record decides replay from a head-state probe, as the old cut-by-plane honesty limit describes. Worth aligning the wording while fixing findings 1 and 2.
ChamferPart::content_fingerprintencodes vertex_index as f64; precision loss is theoretical under the contour cap.
Clean
- fabricate.rs: admission before mutation, get().copied() instead of indexing, checked ordinal arithmetic, replay refusals left to the kernel, per-variant engine tests.
- layer-engine: monotone counters and retirement validated on read and enforced on write, all-or-nothing corner arrays, project-wide record UUID uniqueness, schema-pin discipline with refusal tests for old pins.
- P13: true arc length, bounded meshes, distinct fingerprints/signatures/cache keys, and an honest numbering refusal for curved members instead of comparing unequal geometry.
- Test consolidation: autotests = false plus a guard test asserting every suite file is a module of tests/cli.rs, so no suite can silently disappear; the nextest default-filter matches the module layout; child-process tests updated for the single binary.
- UI V13: both projections tested for projection, navigation and pick agreement; the 96-byte camera uniform is kept in sync everywhere.
- No leakage of fork infrastructure: no .github, tools or docs/plan paths and no fork-remote references in the diff.
Review follow-ups on the cumulative delivery pull request: - A13 record paths allocate from the persistent per-element counter and refuse retired record identities, like the cut adapter already does: deletion never reuses a record UUID or an ordinal (the cut-retirement contract). - Retry probes rebuild the accepted record's exact ordinal, so retries keep replaying across retirement gaps. - Shared-instance group members re-author with the canonical's fresh body and quantities, as the plane-cut adapter does; the A13 result names the canonical element plus its instances. The instance case is now covered by the acceptance suite. - The A04 adapter refuses polygon-cut records with a typed result: update-hole and remove-hole can no longer edit or retire an A13 record through the hole vocabulary. - edit-drafting binds the incoming drafting into the retry fingerprint: changed or dropped geometry under an accepted op id is OP_ID_REUSE, with the strict replay test restored and compiled into the suite. Co-Authored-By: Claude Code <[email protected]>
|
Follow-up commit pushed for all four review threads (8421493):
Local gates green (fmt, clippy 🤖 Generated with Claude Code |
axisrow
left a comment
There was a problem hiding this comment.
Verdict: approved
Round 2 on head 8421493. All four round-1 findings are properly fixed; the fix delta (10 files, +774/−104) reviewed in full against the base diff from round 1.
Round-1 findings, verified fixed
- A13 instance bodies. shared_with_cuts/shared_with_holes now re-author each group member from the canonical freshly evaluated body and quantities, exactly as the plane-cut adapter does, and the acceptance suite covers a three-member instance group (volumes and mesh digests asserted for every member).
- A13 identities. a13_record decodes cut_history and hole_history, seeds its used-id set with both retired lists, and every fabrication engine call allocates from the persistent counter (pin_next_ordinal and the through-cut admission refuse exhausted or regressed counters). Retry probes rebuild the accepted record exact ordinal, so retries keep replaying across retirement gaps. New CLI cases cover the retired UUID refusal, the persistent cut counter and the cross-kind persistent hole counter.
- edit-drafting replay. The retry fingerprint again binds the incoming drafting (previous.drawing.with_drafting(drafting)), restoring the master semantics; the strict test is restored and is now compiled into the one cli binary through the new tests/drawing_drafting.rs module.
- A04 kind guard. update_hole and remove_hole refuse polygon-cut records with a typed InvalidArgument result, with an engine test covering both paths and no state change on refusal.
Notes (no change requested)
- The strict replay test now exists twice in the cli binary: once via tests/pick.rs #[path] inclusion of drawing/drafting.rs and once as the new standalone tests/drawing_drafting.rs. Harmless duplication; one copy could be dropped later.
- The module doc at the top of src/cut.rs still says replay reads immutable accepted request evidence; that holds for update-cut/remove-cut and the hole paths, while a13_record decides replay from the head-state probe. Aligning the wording remains a nice-to-have.
Verified clean in the delta
- pin_next_ordinal keeps the exact cut_by_plane_after semantics and is now shared; split_part pins the kept record and refuses a regressed counter before any state is built.
- The JSON shape of the a13 commands extends additively: element first, then an instances array when a group was re-authored; the single-element and split shapes are unchanged.
- The cli.rs guard test still holds: the tests/drawing directory is skipped by the suffix check, the new module is listed, macos_icon stays its own target.
… work (A13, A03, A04, A12.3, P13, CLI test speed-ups) (Apibim-com#734) Conflicting files keep the upstream version: the merged delivery is the new superset and carries the review follow-ups (A13 persistent ordinals and retired identities, fresh instance bodies, the A04 kind guard, the edit-drafting replay fingerprint and the restored strict drafting test). Fork-only infrastructure keeps its fork version. Co-Authored-By: Claude Code <[email protected]>
The D02-D07 suites under tests/drawing/ were compiled only through nine #[path] attributes in tests/pick.rs, so a reader landing in the directory saw test files with no mod declaration pointing at them and could reasonably read them as dead code (issue #289; the misread happened during PR Apibim-com#734 review). Move them to tests/pick/drawing/ with a mod.rs, so standard module resolution applies and the wiring is visible in the directory itself, next to the existing tests/support/ precedent. The nine files are unchanged and the suites stay submodules of pick sharing its helpers through `use super::*;`; only their nextest ids move from pick::drawing_* to pick::drawing::*. Co-authored-by: axisrow <[email protected]>
One delivery of the fork's post-sync work, following the #734 precedent: batch and session CLI (upstream #766), the portable appearance layers (U08), representation levels (upstream #484), per-element derived layers (U15), the saved-views layer (W01), the coordination core (F12/U20/U21), P09 validation, the P-Degenerate class, the Q01 slice E records and the recorded test gate runner. Fork CI lanes and sync tooling are not part of the change; the upstream Python tools stay untouched.
What this is
One cumulative pull request carrying the fork work that upstream does not have
yet. The branch is cut from the current
master(it contains everything up toand including #733), so the diff below is exactly the delta — no reverts of
upstream work, no upstream file deleted. It supersedes the earlier per-feature
pull requests that were closed. Please review at your own pace — and closing
it is completely fine if it is not needed.
What is inside
Verified against the actual diff (128 files, +8989/−572):
(
crates/engine/src/fabricate.rs), line, polygon and part cuts, fit,chamfer, split and combine as A-2 operation records
(
crates/model/src/command.rs,apps/beamcraft-cli/src/cut.rs,plate_cmd.rs), the CLI acceptance suite (tests/a13.rs) and the designnote (
docs/design/a13-fabrications.md).evidence; cut removals that never reuse record or semantic cap identities;
cut creation replayed from immutable accepted evidence (engine
cut.rs/update.rs, layer-engineauthored/cut_history.rs+validate.rs,CLI
cut.rs,tests/cut_updates.rs,tests/cut_removals.rs, design notesa03-cut-retirement.md,a03-update-cut-record.md).persistent, non-reusable identities (CLI
hole.rs,tests/hole_updates.rs,tests/hole_removals.rs, design notesa04-hole-retirement.md,a04-update-hole-record.md).(A12.3 prerequisite, on top of the already-merged chamfer/rounding contour
work); design note
docs/design/a12-3-corner-edits.md.and bounded meshes (
crates/kernel/src/sweep.rs, engine member paths,tests/curved_members.rs, design notedocs/design/p13-curved-members.md).clitest binary (
autotests = false,tests/cli.rs: one link instead of ~40,every case on one thread pool), shared fixture preparation, updated nextest
profile. Same cases, no suite dropped — fewer redundant fixture builds and
faster inner loop.
syncs (
apps/beamcraft-ui/src/camera.rs,edit.rs,render.rs,viewport.wgsland their tests).bolt-fastener and the F06 member-hole amendment drafts) and design-note
updates for every shipped feature.
Notes
is not part of this diff.
.github/,tools/,docs/plan/, thefork-specific CONTRIBUTING step) are intentionally not part of this PR: it
carries product code, tests and design docs only.
(
drafting_replay_binds_the_incoming_geometry_even_after_later_editsinapps/beamcraft-cli/tests/drawing/drafting.rs) is not present on the forkside — it was dropped when the fork mirrored the modeling/drawing
integration locally, and I did not want to paper over that silently. Say
the word and I will restore it on this branch.
Tests
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo nextest run --workspace(1834 tests, all passing, ~143 s wall),cargo test --workspace --doc, the F07 fixture verification and themodule-boundary check — all green. The three pure crates also compile clean
for
wasm32-unknown-unknown.shards across macOS/Ubuntu,
wasm32check, dependency licences/advisories,cold-release timings and the screenshot jobs all pass (the Windows test
legs skip on pull requests by the repo's own configuration).
Take your time; if this does not fit the current direction, closing it is
completely fine.
🤖 Generated with Claude Code
Issue links and completion scope
Fixes #430 — P13 curved beam: engine API and CLI creation from three points or start/end/radius/normal, with analytical length/volume and bounded-deviation coverage. This closes the engine/CLI task; UI authoring and path-aware numbering remain outside this delivery.
Refs #425 — A03: cut update/removal and persistent identity/replay hardening; the original issue is already closed.
Refs #426 — A04: hole update/removal and persistent identity/replay hardening; the original issue is already closed.
Refs #427 — G12: circular sweep and deviation/quantity integration supporting P13; the original issue is already closed.
Refs #435 — A13: experimental first fabrication slice only. The design note explicitly does not claim full A13 acceptance; unsupported operations and owner decisions remain outstanding.
Refs #520 — A12.3: atomic corner replacement/clear prerequisite only; vertex/edge editing and degenerate-state recovery remain outstanding.
Refs #434 — A12 parent: the remaining A12.3 acceptance is not completed by this PR.
Refs #440 — V13: orthographic camera/rendering/picking foundation only; the user-facing projection switch is not implemented here.
Only #430 is linked for automatic closure when this PR is merged into
master. The partially delivered issues above remain open.