brokkr_kitbash joint records: DOF from the socket type, limits, slide, the joints report; hose reads its range from the pin (cut kit-joint-records) #39

Merged
eureka merged 6 commits from nibu/kit-joint-records into main 2026-12-02 22:39:27 +00:00
Owner

Cut aetheria-release:cut_spec:cut-kit-joint-records.r1, rebased on main 2864e9f (after kit-freeze, PR 37).

What changes

  • Kit format: a socket type may state dof (revolute | prismatic; absent is rigid). pivot is revolute in mechanical and frame; mechanical gains the prismatic slide type and two parts cut from the actuator at its gland, ram_barrel and ram_rod (slide 0 is closed, the slide is the extension).
  • core.mate and core.residual take a slide: S_parent @ T(0, 0, slide) @ Rz(roll) @ FLIP @ inv(S_child). core.within is the one rule for a value inside limits; aim_roll and reach_roll take limits. Two kits mate a type only when match and dof agree.
  • A connection carries a joint record on the child: kit_slide, kit_min, kit_max, kit_mechanism, kit_compliance. write_connection is its one writer and checks limits before it writes; detach clears it.
  • Actions brokkr_kitbash.joint, .slide and .joints (the brokkr.joints v1 report: axis, origin and order derived, never stored).
  • Deleted: the hose's joint.range. A crossed pin is a revolute connection and its roll range is that connection's limits; a pin without limits and a slide between the ends are refused.

Structural delta: 14 files, +1513 / -137 (the spec estimated +620 / -30; 478 of the added lines are regenerated live result files, 168 the pose live test). No dependency, target or process added. Formats added: socketTypes[..].dof, five connection properties, brokkr.joints v1. Format removed: hose joint.range.

Proof (build host and target: this Windows workstation, Python 3.13 and Blender 5.3 with private user directories)

  • python -B -m unittest discover -s surfaces/blender/tests: 620 tests OK (20 skipped), on the rebased tree.
  • Live, exit 0 on the rebased tree: kitbash_pose 95 checks 17.3 s, kitbash_hose 75 checks 56.5 s, kitbash_assembly 154 checks 42.5 s, kitbash 99 checks 3.4 s.
  • Mutants, once each on a scratch copy, before the rebase: J1 test_a_slide_stands_the_child_along_the_parent_socket_z, test_a_rod_in_its_barrel_is_the_actuator_at_that_extension and the live slide checks; J2 test_within_is_the_value_s_representative_inside_the_limits; J3 test_aim_inside_limits_takes_the_best_roll_they_hold; J4 test_reach_inside_limits_takes_a_root_they_hold; J5 the live refusals (scene changed); J6 test_two_kits_mate_a_type_only_when_its_dof_agrees; J7 the live parent-joint check; J8 the live min/max check; J9 kitbash_hose's pin-with-no-limits refusal; J10 the live detach check; J11 (added: joints rows in the world's frame) the live joint frame bound.

Departures from the spec, for Soul

  • J1 as written (the slide after Rz) is an equivalent mutant: a turn about z and a move along it commute. It was run as the slide after FLIP.
  • J3 as written (the nearer end by angle) is equivalent when the angle is read round the circle; it was run with the angle read along the line.
  • set_params reseats through seat() with the slide passed, as before, not through write_connection: it writes no connection property, and routing it through the limits check would refuse a rebuild after the mesh is written.
  • Limits carry a slack of 1e-6 of the larger of 1 and the ends (core.LIMIT_SLACK): an action's roll and slide are float32 fields, so a value typed as an end of its own limits would otherwise be refused.
  • Negative pattern "range": kitbash_hose.py keeps one, the request that proves a joint stating its own range is refused by shape. Pattern kit_axis|...: present in test_kitbash.py only as the ownership pattern and its planted text.
  • Mutants were not rerun after the rebase; the rebase touched none of the mutated lines.
  • The base hose readings were not rerun for comparison; the exact refusal text with its rolls and distances is unchanged and passes.

🤖 Generated with Claude Code

🤖 Generated with Claude Code

Cut `aetheria-release:cut_spec:cut-kit-joint-records.r1`, rebased on main 2864e9f (after kit-freeze, PR 37). **What changes** - Kit format: a socket type may state `dof` (`revolute` | `prismatic`; absent is rigid). `pivot` is revolute in `mechanical` and `frame`; `mechanical` gains the prismatic `slide` type and two parts cut from the actuator at its gland, `ram_barrel` and `ram_rod` (slide 0 is closed, the slide is the extension). - `core.mate` and `core.residual` take a slide: `S_parent @ T(0, 0, slide) @ Rz(roll) @ FLIP @ inv(S_child)`. `core.within` is the one rule for a value inside limits; `aim_roll` and `reach_roll` take limits. Two kits mate a type only when match and dof agree. - A connection carries a joint record on the child: `kit_slide`, `kit_min`, `kit_max`, `kit_mechanism`, `kit_compliance`. `write_connection` is its one writer and checks limits before it writes; `detach` clears it. - Actions `brokkr_kitbash.joint`, `.slide` and `.joints` (the `brokkr.joints` v1 report: axis, origin and order derived, never stored). - Deleted: the hose's `joint.range`. A crossed pin is a revolute connection and its roll range is that connection's limits; a pin without limits and a slide between the ends are refused. **Structural delta**: 14 files, +1513 / -137 (the spec estimated +620 / -30; 478 of the added lines are regenerated live result files, 168 the pose live test). No dependency, target or process added. Formats added: `socketTypes[..].dof`, five connection properties, `brokkr.joints` v1. Format removed: hose `joint.range`. **Proof** (build host and target: this Windows workstation, Python 3.13 and Blender 5.3 with private user directories) - `python -B -m unittest discover -s surfaces/blender/tests`: 620 tests OK (20 skipped), on the rebased tree. - Live, exit 0 on the rebased tree: `kitbash_pose` 95 checks 17.3 s, `kitbash_hose` 75 checks 56.5 s, `kitbash_assembly` 154 checks 42.5 s, `kitbash` 99 checks 3.4 s. - Mutants, once each on a scratch copy, before the rebase: J1 `test_a_slide_stands_the_child_along_the_parent_socket_z`, `test_a_rod_in_its_barrel_is_the_actuator_at_that_extension` and the live slide checks; J2 `test_within_is_the_value_s_representative_inside_the_limits`; J3 `test_aim_inside_limits_takes_the_best_roll_they_hold`; J4 `test_reach_inside_limits_takes_a_root_they_hold`; J5 the live refusals (scene changed); J6 `test_two_kits_mate_a_type_only_when_its_dof_agrees`; J7 the live parent-joint check; J8 the live min/max check; J9 `kitbash_hose`'s pin-with-no-limits refusal; J10 the live detach check; J11 (added: joints rows in the world's frame) the live joint frame bound. **Departures from the spec, for Soul** - J1 as written (the slide after Rz) is an equivalent mutant: a turn about z and a move along it commute. It was run as the slide after FLIP. - J3 as written (the nearer end by angle) is equivalent when the angle is read round the circle; it was run with the angle read along the line. - `set_params` reseats through `seat()` with the slide passed, as before, not through `write_connection`: it writes no connection property, and routing it through the limits check would refuse a rebuild after the mesh is written. - Limits carry a slack of 1e-6 of the larger of 1 and the ends (`core.LIMIT_SLACK`): an action's roll and slide are float32 fields, so a value typed as an end of its own limits would otherwise be refused. - Negative pattern `"range"`: `kitbash_hose.py` keeps one, the request that proves a joint stating its own range is refused by shape. Pattern `kit_axis|...`: present in `test_kitbash.py` only as the ownership pattern and its planted text. - Mutants were not rerun after the rebase; the rebase touched none of the mutated lines. - The base hose readings were not rerun for comparison; the exact refusal text with its rolls and distances is unchanged and passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
check_kit admits socketTypes[..].dof (revolute | prismatic; absent is rigid). mate is
S_parent @ T(0, 0, slide) @ Rz(roll) @ FLIP @ inv(S_child). within() is the one rule for a value
inside its limits. Two kits mate a type only when match and dof agree.

Cut aetheria-release:cut_spec:cut-kit-joint-records.r1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Slide 0 is closed and the slide is the extension: a rod of length body_len + 1.1 body_r in its
barrel stands as the actuator does. JointRecordTests: slide, within, limits on aim and reach, dof
across kits; mutants J1 J2 J3 J4 J6 each die there.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A connection's DOF kind is its parent socket's type's. write_connection, the one writer, states
kit_slide, kit_min, kit_max, kit_mechanism and kit_compliance, refusing before it writes a record
the DOF may not carry and a value with no representative inside the limits. roll, aim and reach
stay inside a revolute joint's limits; slide poses a prismatic one; joint states the record;
joints reports the tree as brokkr.joints v1 rows with axis and order derived. detach clears the
record.

Deleted with it: the hose's joint.range key, its shape check and its current-roll refusal. A
crossed pin is a revolute connection and its range is that connection's limits; a pin without
limits and a slide between the ends are refused.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
kitbash_pose: a rod in its barrel, limits on a pin for roll, aim and reach, the record's refusals,
the joints report under the tank (a toe below a rigid foot reads the hinge as its parent joint),
detach clears the eight keys. kitbash_hose: JOINT drops range; the -20..90 and -10..20 cases are
the knee's limits, 30..60 and -200..200 are the joint action's refusals; a pin without limits and
a hose across a slide are refused.

Fixes two callers the last commit missed: close's mated() tuple and hose.through's crossed().

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
eureka merged commit 8690a43c77 into main 2026-12-02 22:39:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Brokkr!39
No description provided.