Skip to content

Admit stored quantities above one cubic metre; definition drop-downs lead with the display name - #116

Merged
Blogbotana merged 3 commits into
Apibim-com:masterfrom
axisrow:ao/task-next-fork/promotion/ui-modeling-fixes
Oct 20, 2026
Merged

Blogbotana merged 3 commits into
Apibim-com:masterfrom
axisrow:ao/task-next-fork/promotion/ui-modeling-fixes

Conversation

@axisrow

@axisrow axisrow commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Mirror of the fork's #44 (axisrow/BeamCraft, the modeling half of the fork's issues #19
and #20), stacked on #114 (the visual half). Two commits, verbatim:

  • Make the member budget test exceed one cubic metre (49c672e)
  • Admit stored quantities above one cubic metre and show definition names (c3bb326): the
    bounded read capped every stored double at 1e9 — one cubic metre in mm3 — so a legitimate
    plate or member whose volume exceeded 1 m3 was refused with LIMIT_EXCEEDED (finding 1
    of the fork's U05: Add content-addressed immutable blob storage (stacked on F08) #19, finding 2 of its F06 corrections, F08 module boundaries and G04 kernel design #20). The quantity rules already admit volume and
    mass up to 1e30 (authored::validate::quantities); the read now follows the attribute:
    bim:volumeMm3 and bim:massKg carry the quantity budget on every read path (layer
    load, composition and the opinion capture of an edit), everything else keeps the
    coordinate-sized generic budget. Both an over-1m3 plate and a 1.2 m3 member are covered
    by end-to-end tests that failed before the change. The definition drop-downs lead with
    the stored A07.2 display name instead of the grade or designation alone (finding 3 of
    U05: Add content-addressed immutable blob storage (stacked on F08) #19); definitions published before A07.2 keep their old labels.

Stacked on #114 (the visual fixes): the commit touches tools.rs after that PR's
byte-limit change; merge #114 first. The backend.rs budget change is independent of it.

How you verified it

  • cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p beamcraft-cli --test members (6) and --test plate (8) — the
    over-1m3 cases failed before the change and pass now; -p beamcraft-layer-engine
    and -p beamcraft-ui suites all green on macOS
  • CI on this PR for Windows/Linux.

Provenance (clean-room)

  • Verbatim fork material, same MPL-2.0 project; no assets or dependencies.

🤖 Generated with Claude Code

Issue tracking

Fixes #356

axisrow and others added 3 commits October 20, 2026 18:37
Mirror of the fork's #43 (axisrow/BeamCraft), adapted to upstream master:
all nine findings of the fork's issue #20 reproduced on this base and none
was fixed here - the render target clamped each side to 4096 independently
(wide and Retina windows stretched the picture), the near plane was a fixed
1 mm (hidden parts showed through on long models), every reload refit the
camera (a Commit or R jumped back to the whole model), small volumes read
0.000 m3, drop-down labels sat under their lists, the left panel resized
with its content, an empty store showed a red error, the name field counted
characters where the engine counts bytes, and a decimal comma reported the
value as infinite. The near-plane, target-size, refit, volume, byte-limit
and comma-message behaviour carries unit tests; the empty-store state is
typed (Error::NoRevision) and the suites assert it.

Co-Authored-By: Claude Code <[email protected]>
The bounded read capped every stored double at 1e9 - one cubic metre in
mm3 - so a legitimate plate or member whose volume exceeded 1 m3 was
refused with LIMIT_EXCEEDED (#19, finding 1; the same
refusal is finding 2 of #20). The quantity rules already admit volume
and mass up to 1e30 (`authored::validate::quantities`); the read now
follows the attribute: `bim:volumeMm3` and `bim:massKg` carry the
quantity budget on every read path (layer load, composition and the
opinion capture of an edit), everything else keeps the coordinate-sized
generic budget. Both an over-1m3 plate and a 1.2 m3 member are covered
by end-to-end tests that failed before the change.

The definition drop-downs of the window now lead with the stored
display name (A07.2) instead of the grade or designation alone
(finding 3 of #19); definitions published before A07.2 keep their old
labels.

(cherry picked from commit c3bb326)

@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

UI modelling fixes promoted as a two-commit delta on the visual-fixes branch (the shared 672448e is reviewed in #114).

  • The stage-budget widening in crates/layer-engine/src/backend.rs is the minimal surface for the real bug: a stored volume of one cubic metre is 1e9 mm3, exactly the generic scalar cap, so the bounded read refused the quantities the engine itself had written. Only bim:volumeMm3 and bim:massKg get the wider 1e30 budget; coordinates, dimensions, layer offsets, foreign metersPerUnit and every unknown attribute keep 1e9; the leaf-name lookup defaults to the generic budget when a spec path has no name; and the quantity domain rules in authored::validate::quantities still own the actual value checks, so the wider read budget buys no admission.
  • The propagation is consistent: typed_depth now threads one max through dictionaries and the vec-of-vec cases (which previously reset to the generic budget mid-array), while the public typed wrapper keeps the old behaviour for every existing caller; the edit-path capture uses the per-attribute budget via typed_attribute, so reading back existing opinions no longer refuses what the same layer stored.
  • The E2E test pins the exact regression (a 5000x5000x41 plate, 1.025e9 mm3, created, then re-read by a fresh process), and 595d3eb pushes the member budget test past one cubic metre so the widened path is exercised where it was found.
  • The definition drop-downs now lead with the stored A07.2 display name and fall back to grade/designation for pre-A07.2 definitions; both the present and null shapes are tested with the exact label strings.

The same fixes ran in the fork; no CI checks have reported on the branch yet.

@Blogbotana
Blogbotana merged commit 0b5fc2c into Apibim-com:master Oct 20, 2026
4 checks passed
@axisrow
axisrow deleted the ao/task-next-fork/promotion/ui-modeling-fixes branch October 24, 2026 06:54
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.

PR #116: Admit stored quantities above one cubic metre; definition drop-downs lead with the display name

2 participants