neon-sprawl/client/test
VinPropane 435a32b3b3 NEO-24: fix movement-driven target refresh via authoritative_ack signal
Review 2026-04-21 caught that the hybrid soft-lock refresh path is
unreachable during normal WASD locomotion. `main.gd` was wiring
`TargetSelectionClient` to `PositionAuthorityClient.authoritative_position_received`,
which only fires on boot sync and move-rejection resync — successful
`move-stream` 200s are intentionally silent to avoid RTT rubber-banding.
So walking out of an alpha/beta radius never triggered the throttled
`GET /target` the HUD depends on, and validity stayed stuck at `ok`.

Add a separate `authoritative_ack(world)` signal on `PositionAuthorityClient`
emitted from both `BOOT_GET` 200 and successful `move-stream` 200, and
switch `TargetSelectionClient` (+ `main.gd`) to it. The snap signal keeps
its current semantics so rubber-band suppression is untouched; the ack
signal is a pure heartbeat that cooldown-throttled consumers can hook.

Also adds an integration test that wires both real clients together (per
the review's suggestion 1) so renames or mis-wires between the two
scripts fail loudly rather than silently skipping the end-to-end path.

- `client/scripts/position_authority_client.gd`: new `authoritative_ack`
  signal; extracted `_parse_world_from_response` helper to share JSON
  parse across `BOOT_GET` and `STREAM_POST`; emit ack from both.
- `client/scripts/target_selection_client.gd`: rename
  `on_authoritative_position_snap` to `on_authoritative_ack`; drop
  `apply_as_snap` gate (no longer meaningful).
- `client/scripts/main.gd`: connect the new signal.
- `client/test/position_authority_client_test.gd`: assert ack on boot
  200 and stream 200.
- `client/test/target_selection_client_test.gd`: rename tests for new
  handler.
- `client/test/target_refresh_on_locomotion_test.gd`: new integration
  suite wiring real authority + target clients.
- Plan Decision 3 + Tests row + Files-to-modify row updated.
- `docs/reviews/2026-04-21-NEO-24.md`: committed with blocking issue +
  suggestions struck through with `Done.` notes per
  planning-implementation-docs rule.
- `docs/decomposition/modules/documentation_and_implementation_alignment.md`:
  E1.M3 row now reflects NEO-24 landed.
- `client/README.md` + `docs/manual-qa/NEO-24.md`: refreshed signal names
  so the soft-lock refresh description matches the wiring.

Tests: 88/88 GdUnit headless passed locally.
2026-04-21 22:35:41 -04:00
..
camera_state_test.gd NEON-25: isometric follow camera, CameraState, tests, and docs 2026-04-07 23:46:04 -04:00
camera_state_test.gd.uid NEON-25: isometric follow camera, CameraState, tests, and docs 2026-04-07 23:46:04 -04:00
ground_pick_test.gd.uid NS-21: add GdUnit4, client tests, and CI headless run 2026-04-06 22:08:37 -04:00
isometric_follow_camera_test.gd chore: point docs and rules at Linear NEO issue ids 2026-04-13 13:15:32 -04:00
isometric_follow_camera_test.gd.uid NEON-25: isometric follow camera, CameraState, tests, and docs 2026-04-07 23:46:04 -04:00
occlusion_policy_test.gd chore: point docs and rules at Linear NEO issue ids 2026-04-13 13:15:32 -04:00
occlusion_policy_test.gd.uid NEON-27: finalise review (Approved) + Godot uid files 2026-04-08 23:55:29 -04:00
player_idle_support_test.gd NEON-29: Fix CI tests (horizontal step flag, idle_support vectors) 2026-04-15 23:57:13 -04:00
player_idle_support_test.gd.uid NEON-29: Fix gdlint (player returns/lines, split idle tests, gdlintrc cap) 2026-04-15 23:48:15 -04:00
player_locomotion_wasd_test.gd NEO-22: Fix locomotion test static calls for GDScript + LSP 2026-04-17 20:24:16 -04:00
player_locomotion_wasd_test.gd.uid NEO-22: Add Godot .uid sidecars for WASD locomotion scripts 2026-04-17 20:51:16 -04:00
player_test.gd NEO-22: add move-stream API and WASD client locomotion 2026-04-17 19:21:33 -04:00
player_test.gd.uid NS-21: add GdUnit4, client tests, and CI headless run 2026-04-06 22:08:37 -04:00
position_authority_client_test.gd NEO-24: fix movement-driven target refresh via authoritative_ack signal 2026-04-21 22:35:41 -04:00
position_authority_client_test.gd.uid NS-21: add GdUnit4, client tests, and CI headless run 2026-04-06 22:08:37 -04:00
position_authority_test_double.gd NS-21: add GdUnit4, client tests, and CI headless run 2026-04-06 22:08:37 -04:00
position_authority_test_double.gd.uid NS-21: add GdUnit4, client tests, and CI headless run 2026-04-06 22:08:37 -04:00
target_refresh_on_locomotion_test.gd NEO-24: fix movement-driven target refresh via authoritative_ack signal 2026-04-21 22:35:41 -04:00
target_selection_client_test.gd NEO-24: fix movement-driven target refresh via authoritative_ack signal 2026-04-21 22:35:41 -04:00
target_selection_client_test.gd.uid NEO-24: client tab-target + lock HUD synced to server 2026-04-21 22:14:16 -04:00
target_selection_test_double.gd NEO-24: client tab-target + lock HUD synced to server 2026-04-21 22:14:16 -04:00
target_selection_test_double.gd.uid NEO-24: client tab-target + lock HUD synced to server 2026-04-21 22:14:16 -04:00
zoom_band_config_test.gd chore: point docs and rules at Linear NEO issue ids 2026-04-13 13:15:32 -04:00
zoom_band_config_test.gd.uid NEON-26: ZoomBandConfig, discrete zoom input, CameraState sync 2026-04-08 22:32:45 -04:00