Skip to content

feat: deliver the remaining fork work (A13, A03, A04, A12.3, P13, CLI test speed-ups) - #734

Merged
axisrow merged 2 commits into
Apibim-com:masterfrom
axisrow:up/full-fork-delivery
Oct 29, 2026
Merged

axisrow merged 2 commits into
Apibim-com:masterfrom
axisrow:up/full-fork-delivery

Conversation

@axisrow

@axisrow axisrow commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

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 to
and 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):

  • A13 fabrications — fabrication records in the engine
    (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 design
    note (docs/design/a13-fabrications.md).
  • A03 cut records — atomic cut-record updates with immutable retry
    evidence; cut removals that never reuse record or semantic cap identities;
    cut creation replayed from immutable accepted evidence (engine
    cut.rs/update.rs, layer-engine authored/cut_history.rs + validate.rs,
    CLI cut.rs, tests/cut_updates.rs, tests/cut_removals.rs, design notes
    a03-cut-retirement.md, a03-update-cut-record.md).
  • A04 hole records — canonical immutable replay updates and removals with
    persistent, non-reusable identities (CLI hole.rs, tests/hole_updates.rs,
    tests/hole_removals.rs, design notes a04-hole-retirement.md,
    a04-update-hole-record.md).
  • A12 plate corners — corner treatments replace and clear atomically
    (A12.3 prerequisite, on top of the already-merged chamfer/rounding contour
    work); design note docs/design/a12-3-corner-edits.md.
  • P13 curved members — circular member paths authored with true arc length
    and bounded meshes (crates/kernel/src/sweep.rs, engine member paths,
    tests/curved_members.rs, design note docs/design/p13-curved-members.md).
  • CLI test suite speed-up — all integration suites build into one cli
    test 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.
  • UI — camera and edit-tool updates the fork carried through the recent
    syncs (apps/beamcraft-ui/src/camera.rs, edit.rs, render.rs,
    viewport.wgsl and their tests).
  • Docs — accepted MVP contract amendments (the F04 plate and
    bolt-fastener and the F06 member-hole amendment drafts) and design-note
    updates for every shipped feature.

Notes

  • Cargo.lock: the fork added no crates, so the lock file is untouched and
    is not part of this diff.
  • The fork's CI/infra paths (.github/, tools/, docs/plan/, the
    fork-specific CONTRIBUTING step) are intentionally not part of this PR: it
    carries product code, tests and design docs only.
  • One upstream-side drafting test
    (drafting_replay_binds_the_incoming_geometry_even_after_later_edits in
    apps/beamcraft-cli/tests/drawing/drafting.rs) is not present on the fork
    side — 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

  • Locally on macOS, on this exact tree: 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 the
    module-boundary check — all green. The three pure crates also compile clean
    for wasm32-unknown-unknown.
  • Upstream CI on this branch: fully green — quality (macOS + Ubuntu), 14 test
    shards across macOS/Ubuntu, wasm32 check, 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.

…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]>
@axisrow
axisrow requested a review from Blogbotana as a code owner October 29, 2026 13:40
@Blogbotana

Copy link
Copy Markdown
Member

Review in progress

@axisrow axisrow left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: changes requested

Four findings require changes (inline); everything else in the 128-file diff reviewed clean.

Findings

  1. A13 instance-group members are authored from stale bodies. shared_with_cuts/shared_with_holes clone 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.rs has no instance-group case to catch it.

  2. a13_record bypasses 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.

  3. edit-drafting replay 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.

  4. 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_fingerprint encodes 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.

Comment thread apps/beamcraft-cli/src/cut.rs Resolved
Comment thread apps/beamcraft-cli/src/cut.rs Resolved
Comment thread apps/beamcraft-cli/src/drawing_cmd.rs Resolved
Comment thread crates/engine/src/command.rs Resolved
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]>
@axisrow

axisrow commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up commit pushed for all four review threads (8421493):

  • A13 record identities and ordinals (admission + fabricate.rs): the
    record-appending paths now allocate from the persistent per-element
    counter (as cut_by_plane_after does) and refuse retired record
    identities, so a removal never releases a record UUID or an ordinal.
    Regression cases added to the acceptance suite for both record
    vocabularies.
  • Stale instance bodies (shared_with_cuts/shared_with_holes): group
    members re-author with the canonical's fresh body and quantities, exactly
    as the plane-cut adapter does; the A13 result now names the canonical
    element plus its instances, and the instance case is in the acceptance
    suite. This also surfaced that the A13 result shape refused any instance
    group outright — the new case covers it.
  • A04 vs A13 records (engine::command): update_hole/remove_hole
    guard by record kind and refuse a polygon cut with INVALID_ARGUMENT;
    unit-tested in the engine.
  • edit-drafting fingerprint (drawing_cmd.rs): the retry fingerprint
    binds the incoming drafting, so changed or dropped geometry under an
    accepted op id is OP_ID_REUSE. The strict replay test is restored — and
    the upstream copy turned out to live in a tests/drawing/ directory that
    no test target compiles, so the test is also wired into the compiled
    suite (tests/drawing_drafting.rs) where it actually runs.

Local gates green (fmt, clippy -D warnings, nextest 1840/1840, doctests);
watching CI on this branch.

🤖 Generated with Claude Code

@axisrow axisrow left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. 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).
  2. 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.
  3. 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.
  4. 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.

@axisrow
axisrow merged commit 1dda233 into Apibim-com:master Oct 29, 2026
26 checks passed
axisrow added a commit to axisrow/BeamCraft that referenced this pull request Oct 29, 2026
… 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]>
axisrow added a commit to axisrow/BeamCraft that referenced this pull request Nov 1, 2026
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]>
Blogbotana pushed a commit that referenced this pull request Nov 4, 2026
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.
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.

[M1.1] P13: curved beam

2 participants