Test: fix stale grip-pose expectations after 8d466cf #44

Closed
muse-lantern wants to merge 5 commits from muse-lantern/da-game:fix-mag-grip-rotate-check into main
Member

Test: fix stale grip-pose expectations after 8d466cf

Zach's 8d466cf ("update items grip poses") gave grip_offset / grip_rotate
values to a dozen item JSONs, and six suites asserted the old values.
All six failed on pure main 8d466cf and pass on the parent a583800,
so this is test fallout from the new authored data, not a game change.
Test files only — no item JSON, game code, or editor code touched.

  • mag_interaction_check: the PRIMARY rotation check now composes the
    default (90,0,0) with the mag definition's grip_rotate at runtime
    (the mag carries [24.33, 0, 0] now, composing to 114.33), plus a
    synthetic no-grip_rotate probe keeping the without-rotation path
    asserted.
  • item_editor_check: pistol and mag gun_grip expectations now compute
    default pose + grip_offset / grip_rotate from the staged item dict,
    the same calls the stage uses.
  • mag_filo_check: the cube's grip is bounds centre + its authored
    offset [0.1303, 0, 0] (it is no longer a plain item); the original
    no-offset intent moves to a synthetic-def probe.
  • spawn_check: the authored [{mesh: "Body"}] collider legitimately
    wins over the collision-mesh fallback, so the hull is the 0.3-wide
    Body box; the fallback path is preserved by a new synthetic-def
    probe (colliders erased) asserting the small offset box hull.
  • volume_container_check: the hand-stays-back push flips from +x to
    -x — with the cube's grip_offset.x 0.1303, blocking at the +x wall
    would need the grip past the volume edge, which would un-inert the
    hand collider and break the phase's premise, so +x is geometrically
    closed, not a behaviour change. Expectations now account for the
    offset (hand collider stays at the blocked hand spot, cube + offset).

rig_chains_check was never failing: it prints "RIG CHAINS PASS
(64 checks)", which an earlier battery detector missed. It passes
standalone and in both full runs; no change made.

Verification: tools/check.py 6/6; full headless battery 35/35 PASS,
1,667 ok, run twice with identical results; SCRIPT ERROR = exactly the
3 known pre-existing lines (2 in firearm_check, 1 in mag_filo_check).

Test: fix stale grip-pose expectations after 8d466cf Zach's `8d466cf` ("update items grip poses") gave grip_offset / grip_rotate values to a dozen item JSONs, and six suites asserted the old values. All six failed on pure main `8d466cf` and pass on the parent `a583800`, so this is test fallout from the new authored data, not a game change. Test files only — no item JSON, game code, or editor code touched. - mag_interaction_check: the PRIMARY rotation check now composes the default (90,0,0) with the mag definition's grip_rotate at runtime (the mag carries [24.33, 0, 0] now, composing to 114.33), plus a synthetic no-grip_rotate probe keeping the without-rotation path asserted. - item_editor_check: pistol and mag gun_grip expectations now compute default pose + grip_offset / grip_rotate from the staged item dict, the same calls the stage uses. - mag_filo_check: the cube's grip is bounds centre + its authored offset [0.1303, 0, 0] (it is no longer a plain item); the original no-offset intent moves to a synthetic-def probe. - spawn_check: the authored `[{mesh: "Body"}]` collider legitimately wins over the collision-mesh fallback, so the hull is the 0.3-wide Body box; the fallback path is preserved by a new synthetic-def probe (colliders erased) asserting the small offset box hull. - volume_container_check: the hand-stays-back push flips from +x to -x — with the cube's grip_offset.x 0.1303, blocking at the +x wall would need the grip past the volume edge, which would un-inert the hand collider and break the phase's premise, so +x is geometrically closed, not a behaviour change. Expectations now account for the offset (hand collider stays at the blocked hand spot, cube + offset). rig_chains_check was never failing: it prints "RIG CHAINS PASS (64 checks)", which an earlier battery detector missed. It passes standalone and in both full runs; no change made. Verification: `tools/check.py` 6/6; full headless battery 35/35 PASS, 1,667 ok, run twice with identical results; SCRIPT ERROR = exactly the 3 known pre-existing lines (2 in firearm_check, 1 in mag_filo_check).
8d466cf retuned the pistol grip_offset and gave the mag a grip_rotate;
the staged gun_grip expectations were hardcoded to the old values.
Compute them from the staged item dict through the same schema calls
the stage uses, so the next retune does not stale them again.
The cube carries a grip_offset now (8d466cf), so it is no longer a plain
item: its grip is the bounds centre plus the offset, read from the def.
The no-offset intent (an item with no authored offset keeps its grip at
the bounds centre) moves to a synthetic definition probe.
8d466cf gave test_collision_item an authored mesh collider ({mesh: Body}),
which legitimately wins over the collision-mesh fallback in
_build_collision, so the hull is the 0.3-wide Body box now. Expect that,
and keep the collision-mesh fallback covered with a synthetic definition
identical except for the missing colliders entry (no shipped item
exercises the fallback anymore).
Test: volume hand-stays-back pushes west, accounting for the cube grip_offset
All checks were successful
tests / test (pull_request) Successful in 2m23s
7c2b046d3e
The cube carries grip_offset.x 0.1303 now (8d466cf), so the hand hangs
that far east of the cube centre: blocking the cube at the +x wall would
need the grip at +0.51, past the volume edge (+0.5), which would un-inert
the hand collider and break the phase premise. Push west instead (grip
ends at -0.31, inside), overreach 0.065, and expect the hand collider at
the blocked hand spot (cube + offset), not the cube centre.
Author
Member

Closing as redundant: all five test fixes ride inside PR #45 (folded in via commit c352da8), which merged as f9919ea. No separate merge for the tests.

— Lantern, closing per the agreed sequence (#43 merged → #45 merged → #44 closed).

Closing as redundant: all five test fixes ride inside PR #45 (folded in via commit `c352da8`), which merged as `f9919ea`. No separate merge for the tests. — Lantern, closing per the agreed sequence (#43 merged → #45 merged → #44 closed).
muse-lantern closed this pull request 2026-11-14 17:43:18 +00:00
All checks were successful
tests / test (pull_request) Successful in 2m23s

Pull request closed

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
dead-air/engine!44
No description provided.