feat(client): sprint 9 gauntlet — QA harness, msgpack fix, 33 tests #30

Closed
jpmschweitzer wants to merge 0 commits from client into main
Owner

Summary

Sprint 9 client deliverables: test infrastructure backbone and bugfix.

  • #516 — Fix MessagePack int_64 encoder dead code branch. -(1 << 63) overflowed making the branch unreachable; negative values beyond int_32 now correctly encode as 0xd3.
  • #492 — 16 P2 gdUnit4 tests: camera (5), entity alpha/color (4), UI (7)
  • #493 — 12 P3 gdUnit4 tests: z-layer ordering (4), entity lerp (3), Tyre additions (5)
  • #494 — 5 anti-tedium regression tests: F12 no-crash guard, gauntlet UI hidden in non-gauntlet mode

Test suite: 315 tests, 0 new failures.

Tickets

# Title Status
#516 Fix MessagePack int_64 encoder dead code branch Done
#492 Client P2 tests Done
#493 Client P3 tests Done
#494 Client anti-tedium tests Done

Test plan

  • make test-client passes headless (all 33 new tests green)
  • MessagePack boundary tests BV-N15, BV-N16 verify int_64 header byte (0xd3)
  • Anti-tedium tests confirm no gauntlet UI leaks in default mode
  • No regressions in existing 282 tests

🤖 Generated with Claude Code

## Summary Sprint 9 client deliverables: test infrastructure backbone and bugfix. - **#516** — Fix MessagePack int_64 encoder dead code branch. `-(1 << 63)` overflowed making the branch unreachable; negative values beyond int_32 now correctly encode as `0xd3`. - **#492** — 16 P2 gdUnit4 tests: camera (5), entity alpha/color (4), UI (7) - **#493** — 12 P3 gdUnit4 tests: z-layer ordering (4), entity lerp (3), Tyre additions (5) - **#494** — 5 anti-tedium regression tests: F12 no-crash guard, gauntlet UI hidden in non-gauntlet mode **Test suite: 315 tests, 0 new failures.** ## Tickets | # | Title | Status | |---|-------|--------| | #516 | Fix MessagePack int_64 encoder dead code branch | Done | | #492 | Client P2 tests | Done | | #493 | Client P3 tests | Done | | #494 | Client anti-tedium tests | Done | ## Test plan - [ ] `make test-client` passes headless (all 33 new tests green) - [ ] MessagePack boundary tests BV-N15, BV-N16 verify int_64 header byte (0xd3) - [ ] Anti-tedium tests confirm no gauntlet UI leaks in default mode - [ ] No regressions in existing 282 tests 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jpmschweitzer added 5 commits 2026-02-18 02:15:30 +01:00
The int_64 branch condition `-(1 << 63) <= value` overflowed in
GDScript's signed 64-bit arithmetic, making the branch unreachable.
Negative values beyond int_32 range were incorrectly encoded as
uint_64 (0xcf) instead of int_64 (0xd3). Replaced with `value < 0`.

Updated boundary tests BV-N15 and BV-N16 to expect correct int_64
header byte.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gdUnit4 tests covering:
- Camera (5): zoom default, smoothing convergence, viewport tracking,
  follow movement, no-panning lock per D-014
- Entity alpha/color (4): null visibility default, peripheral/forward
  transition, terrain object color, player color constant
- UI (7): monologue visible/hidden, interaction verbs, inventory grid,
  dialogue overlay, pause indicator, fog blob count, fog z_index

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gdUnit4 tests covering:
- Z-layer ordering (4): floor below ysort, entities in ysort at z:0,
  fog exact z_index values (Z_FOG=900, Z_FOG_ENTITIES=950), UI layers
- Entity lerp (3): snap on first appear, moves toward target,
  converges within 0.3s at LERP_SPEED=12.0
- Tyre additions (5): recognition progress, facing rotation, lerp
  weight scaling with delta, blob removal, LERP_SPEED constant guard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Regression guards for Sprint 9 QA features:
- F12 bug report (2): no-crash without handler, no queued input action
  (stubs for when #495 WRONG button lands)
- Gauntlet UI hidden (3): no gauntlet nodes visible in default mode,
  no room_id/gauntlet_mode in normal snapshots, stays hidden across
  multiple ticks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

Review: client -> main (type: code)

Hoshe (Code Quality): REQUEST_CHANGES

The int_64 fix is correct. Test suite structure is sound.

# File Severity Issue
1 test_client_p3.gd:before_test warning Missing SimBridge._last_snapshot = null — inter-test contamination risk
2 test_client_p2.gd:test_monologue warning mono.is_visible may return null/Callable — should be mono.visible
3 test_anti_tedium.gd suggestion GameState.get("room_id") assertion unfalsifiable
4 messagepack.gd suggestion Pre-existing: recursive _encode_message silently drops inner errors
5 test_client_p3.gd suggestion D-053 citation is loose for LERP_SPEED pin

Tyre (Architecture): APPROVE

Architecturally consistent with D-014, D-030, D-049, D-053, D-054. Int_64 fix important for Rust interop.

# File Severity Issue
1 messagepack.gd warning Dropped explanatory branch comment — add one-liner
2 test_client_p2.gd:P2-C02 warning Camera smoothing test uses exact equality — use is_equal_approx
3 test_client_p2.gd:P2-U01 suggestion Verify mono.is_visible is custom property
4 test_client_p3.gd:P3-Z03 suggestion Assert FogOverlay is sibling of FogGroup
5 test_client_p3.gd:P3-Z04 suggestion CANVAS_MODAL=30 layer not tested

Verdict: CHANGES REQUESTED

## Review: client -> main (type: code) ### Hoshe (Code Quality): REQUEST_CHANGES The int_64 fix is correct. Test suite structure is sound. | # | File | Severity | Issue | |---|------|----------|-------| | 1 | test_client_p3.gd:before_test | warning | Missing `SimBridge._last_snapshot = null` — inter-test contamination risk | | 2 | test_client_p2.gd:test_monologue | warning | `mono.is_visible` may return null/Callable — should be `mono.visible` | | 3 | test_anti_tedium.gd | suggestion | `GameState.get("room_id")` assertion unfalsifiable | | 4 | messagepack.gd | suggestion | Pre-existing: recursive `_encode_message` silently drops inner errors | | 5 | test_client_p3.gd | suggestion | D-053 citation is loose for LERP_SPEED pin | ### Tyre (Architecture): APPROVE Architecturally consistent with D-014, D-030, D-049, D-053, D-054. Int_64 fix important for Rust interop. | # | File | Severity | Issue | |---|------|----------|-------| | 1 | messagepack.gd | warning | Dropped explanatory branch comment — add one-liner | | 2 | test_client_p2.gd:P2-C02 | warning | Camera smoothing test uses exact equality — use `is_equal_approx` | | 3 | test_client_p2.gd:P2-U01 | suggestion | Verify `mono.is_visible` is custom property | | 4 | test_client_p3.gd:P3-Z03 | suggestion | Assert FogOverlay is sibling of FogGroup | | 5 | test_client_p3.gd:P3-Z04 | suggestion | CANVAS_MODAL=30 layer not tested | ### Verdict: CHANGES REQUESTED
jpmschweitzer added 1 commit 2026-02-18 09:53:47 +01:00
- Add SimBridge._last_snapshot = null to P3 before_test() (contamination risk)
- Clarify mono.is_visible is custom property, not CanvasItem builtin
- Camera smoothing test uses approximate equality instead of exact
- Propagate inner _encode_message errors in array/dict encoding
- Add explanatory comment on int_64 encoder branch
- Document unfalsifiable gauntlet guard as intentional future-proof
- Remove loose D-053 citation from LERP_SPEED pin
- Assert FogOverlay is sibling of FogGroup under World
- Add CANVAS_MODAL=30 (ModalLayer) assertion in P3-Z04

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

Re-Review: client -> main (type: code) — Post-Fix

Hoshe (Code Quality): APPROVE

All 5 original items verified as FIXED. Error propagation in messagepack encoding is a real correctness improvement.

# Original Item Status
1 Missing _last_snapshot = null FIXED
2 mono.is_visible ambiguity FIXED — documented as custom property
3 Unfalsifiable room_id assertion FIXED — documented as intentional guard
4 Inner encode errors dropped FIXED — propagated in array/dict
5 Loose D-053 citation FIXED — removed

Tyre (Architecture): APPROVE

All 5 original items verified as FIXED. Targeted corrections with no collateral scope.

# Original Item Status
1 Missing int_64 branch comment FIXED
2 Camera smoothing exact equality FIXED — distance threshold
3 mono.is_visible verification FIXED — documented
4 FogOverlay sibling assertion FIXED
5 CANVAS_MODAL not tested FIXED

Verdict: APPROVED

## Re-Review: client -> main (type: code) — Post-Fix ### Hoshe (Code Quality): APPROVE All 5 original items verified as FIXED. Error propagation in messagepack encoding is a real correctness improvement. | # | Original Item | Status | |---|--------------|--------| | 1 | Missing `_last_snapshot = null` | FIXED | | 2 | `mono.is_visible` ambiguity | FIXED — documented as custom property | | 3 | Unfalsifiable `room_id` assertion | FIXED — documented as intentional guard | | 4 | Inner encode errors dropped | FIXED — propagated in array/dict | | 5 | Loose D-053 citation | FIXED — removed | ### Tyre (Architecture): APPROVE All 5 original items verified as FIXED. Targeted corrections with no collateral scope. | # | Original Item | Status | |---|--------------|--------| | 1 | Missing int_64 branch comment | FIXED | | 2 | Camera smoothing exact equality | FIXED — distance threshold | | 3 | `mono.is_visible` verification | FIXED — documented | | 4 | FogOverlay sibling assertion | FIXED | | 5 | CANVAS_MODAL not tested | FIXED | ### Verdict: APPROVED
jpmschweitzer closed this pull request 2026-02-18 10:24:54 +01:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jpmschweitzer/settled-reach#30