Repository navigation
A05: minimal bolt groups joining two parts - #109
Blogbotana merged 10 commits into
Conversation
axisrow
left a comment
There was a problem hiding this comment.
Verdict: approved
A05 bolt groups promotion, nine commits, net diff reviewed against upstream/master.
- Model admission (
crates/model/src/command.rs): complete and fail-closed — label, two distinct parts (DV-REL-006/007), the group is not its own part, finite diameter in(0, 1000], count 1..512 with the right code split (InvalidArgumentfor 0,LimitExceededabove), finite pitch under the dimension cap, origin under the coordinate cap, and a unit direction by squared-norm tolerance. The fingerprint is versioned (BeamCraft/A05/CreateBolt/v1), length-prefixed and canonical-f64 encoded. - Engine decision (
crates/engine/src/bolt.rs): pure and bounded over the weldPartsindex; every bolt positionorigin + direction * (pitch * i)must lie inside both parts and a supported part without bounds refuses (None => false), never guesses; NaN bounds fail the comparisons and refuse. The whole group is refused together, and the tests cover missing/wrong-kind/taken identities, the 13th bolt leaving the plate, the out-of-plane origin and the count-1 outside origin. - Connection reading (
apps/beamcraft-cli/src/weld.rs): a connection with anysteel:bolt:property (whole prefix, not a loose substring) is a bolt group and never a weld; a connection with neither set is refused by the validator before the walk.kindswas widened topub(crate)for the bolt adapter, nothing else moved. - The converge commit is the right surface discipline: the verbatim cherry-picks had carried fork-only neighbours (bom module registrations, A09 mark constants and their tests, the fork dispatch arm); the branch now registers and dispatches bolt alone, after the weld arm.
- The mapping-pin chain is correctly re-based on the upstream descriptor:
pre_a05_descriptor()is the current descriptor minus the bolt-properties line with the connection phrase reverted, the placeholder was replaced by the recomputed upstream pre-A05 digest (the fork value covered a mark line upstream never had), and the D1/D2 pin and the all-pins-still-accepted test chain through it consistently. limits.rswas rewritten to LF: upstream had mixed CRLF/LF there, every other touched file was already LF, so this normalises the one outlier; the real change is the two bolt caps.
No CI checks have reported on the branch yet; this approval rests on the review above and on the same feature having run in the fork since its A05 slice.
A bolt group is the second supported connection, on the A06 weld pattern: create-bolt authors one connection element per group with explicit diameter, count, pitch, world origin and unit direction, and one ordered bim:connects record towards two distinct plates, beams or columns; bolts lists the groups of the verified head. The engine refuses a group whose bolt positions do not lie within both parts' conservative world bounds. Like a weld a group has no body and no volume; its count is the quantity a later bill of materials reads. A stored connection carries exactly one of the weld or bolt property sets, and the previous mapping digest stays accepted (experimental slice; see docs/design/a05-bolts.md). (cherry picked from commit 9d007ed)
(cherry picked from commit 5186ad7)
(cherry picked from commit 830cabd)
…s zeros (cherry picked from commit 867e852)
…copy note (cherry picked from commit d6a062b)
(cherry picked from commit a8a8087)
(cherry picked from commit 0b57174)
…ents (cherry picked from commit 473eaee)
The verbatim cherry-picks carried fork-side neighbours the upstream base lacks: bom module registrations (E03 is not mirrored here), the fork's A09 mark constants and tests, and the fork dispatch arm. Keep the A05 surface only: register bolt alone, dispatch create-bolt/bolts after the weld arm, resolve the mapping-pin chain by the 830cabd semantics (every pre-A05 pin is the current descriptor without the bolt additions), recompute the upstream pre-A05 pinned digest (the fork's value covered the mark line that upstream never added), and drop the mark-constant import. Co-Authored-By: Claude Code <[email protected]>
df46615 to
630a72a
Compare
|
Thanks for rebasing onto #103. We tested this head merged into current master ( The cause is the order of the mapping-pin chain.
Suggested fix: make A05 the newest step. Also note: |
axisrow
left a comment
There was a problem hiding this comment.
Verdict: changes requested (one rebase-introduced pin-chain regression)
The A05 code itself is unchanged from the version I approved; what broke is the mapping-pin chain, which was rebased from the fork history onto a master that already carries the native A09 (#103, merged before #105).
On this branch SCHEMA_DESCRIPTOR = A07.2-era descriptor + native A09 line + A05 bolt line. pre_a05_descriptor() chains through pre_a09_descriptor() (current minus the A09 line), giving:
- accepted: current;
pre_a09= descriptor-with-A05-without-A09 — a mapping no released master ever shipped;pre_a05= the A07.2-erafdaf890...; and the older pins; - not accepted: the descriptor of the current released master (
fdaf890+ the A09 numbering line) — which is exactly the digest every store created upstream since#103carries.
pin_accepted is load-bearing on the edit path (authored/edit.rs refuses a layer whose saved bimSchemaDigest is not accepted with UnsupportedVersion), so an A05 build refuses to edit any store authored by current upstream master. The test stays green because it pins the same wrong constant (fdaf890, now described as "pre-A05" and duplicated in the all-pins list as "pre-A09"), and the comment "A05 predates A09" describes the fork history, not this one.
The fix is small: define the pre-A05 descriptor as SCHEMA_DESCRIPTOR minus the two A05 edits (that is the live master descriptor and the real pre-A05 mapping), accept the A07.2-era pin by additionally removing the A09 line, and pin the live-master digest in the all-pins test instead of the duplicated fdaf890.
Everything else in the rebase is sound: the descriptor-relevant neighbours from the merged master are handled, the dispatch and help literal are consistent, and the bolt surface is what I approved earlier.
The pre-A05 mapping is the current descriptor without the A05 edits - the numbering mark line of A09 stays, so every store created since A09 keeps passing edit-path capture. The pre-A09 mapping and the A07.2-era pins are derived from it by removing the lines A09 added. Pins recomputed. Co-Authored-By: Claude Code <[email protected]>
axisrow
left a comment
There was a problem hiding this comment.
Verdict: approved
The pin-chain fix does exactly what the review asked, and it is minimal:
pre_a05_descriptor()is nowSCHEMA_DESCRIPTORminus the two A05 edits (the bolt properties line and the connection rewording), which is precisely the descriptor of the released master — the mapping every store created since the native A09 merged carries. It is checked first inpin_accepted, so edit-path capture accepts those stores again.pre_a09_descriptor()is redefined as the pre-A05 descriptor minus the A09 line and theMarkchange item, which yields the A07.2-era descriptor — so the older pins (the A07.2-erafdaf890, the D1/D2 pin derived from it, and the constant list) are all computed from the real historical chain instead of through the phantom never-shipped mapping.- The pre-A05 test pins the recomputed live-master digest (
085a4f27...), the D1/D2 test derives through the corrected chain with its pinned value unchanged, and the misleading "A05 predates A09" comment is gone.
The recomputed digest is self-validating (the test hashes the constructed descriptor), and by construction the construction equals the released master descriptor given the branch adds only the two A05 edits. The regression surface is closed.
What this changes
Mirror of the fork's #25 (
axisrow/BeamCraft, A05), rebased onto upstreammaster73c3597. The A05 bolt groups feature verbatim:CreateBolt/BoltSpecin the model, theengine's bolt admission and bounds checks, the layer-engine properties (
steel:bolt:*),create-bolt/boltsCLI commands, the end-to-end suite, and the design note; plus thefork's review fixes that ride with it (the weld/bolt property-prefix discrimination, the
weld token in the both-property-sets tamper check, and the pre-A05 mapping pin so stores
written before A05 stay readable).
Resolution notes against the upstream base (the fork's branch carried neighbours upstream
does not have — the fork's E03 BOM and A09 marks, which are not part of this PR):
boltis registered (nobom/marksmodules or constants came over);830cabd: every pre-A05 pin is the current descriptorwithout the bolt additions; the upstream pre-A05 pinned digest differs from the fork's
fork-side value because upstream never added the mark line, and the test pins the
recomputed upstream value;
How you verified it
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warningscargo test -p beamcraft-cli --test bolts(5 tests),cargo test -p beamcraft-modeland
-p beamcraft-layer-engine(170 tests, 0 failed) on macOS — the model andlayer-engine suites carry the bolt validation, fingerprint and mapping-pin cases
Provenance (clean-room)
explicit properties (no catalogue); no new assets or dependencies.
🤖 Generated with Claude Code
Issue tracking
Fixes #120