Commit Graph

458 Commits (ac2916bfee30fe0ab085b83307a9ded63abf9757)

Author SHA1 Message Date
VinPropane ac2916bfee NEO-25: satisfy gdlint/gdformat for pre-push hook 2026-04-24 20:56:04 -04:00
VinPropane c17526e611 NEO-25: close code review follow-up (alignment, warning, tests) 2026-04-24 20:54:26 -04:00
VinPropane ba667f1581 NEO-25: queue last-wins interact POST when HTTP client is busy 2026-04-24 20:48:50 -04:00
VinPropane 06d9104157 NEO-25: route E/R interact via main _unhandled_key_input for reliable input 2026-04-24 20:44:43 -04:00
VinPropane 0e72d98177 NEO-25: move resource_node anchor clear of Obstacle at (6,1,5) 2026-04-24 20:42:12 -04:00
VinPropane 90bd71d336 NEO-25: fix Vector3 anchor parse (extra paren) in interactable_world_builder 2026-04-24 20:39:29 -04:00
VinPropane ce54fcc44f NEO-25: world interactables GET, registry rows, fetch-driven Godot props + glow 2026-04-24 20:36:15 -04:00
VinPropane 6e40af1a1a NEO-25: add implementation plan (descriptor list + fetch-driven client) 2026-04-24 20:24:00 -04:00
VinPropane 82f382353d
Merge pull request #47 from ViPro-Technologies/NEO-24-e1m3-client-tab-target-lock-ui-synced-to-server
NEO-24 e1m3 client tab target lock UI synced to server
2026-04-24 20:10:53 -04:00
VinPropane d6ef4fd811 NEO-24: race-free target/select via optional positionHint
Followup #5: after locking alpha, walking into beta's ring, stopping and
pressing Tab could still return `out_of_range` even when client and server
agreed on position (Δ=0). The freshness-kick move-stream POST and the
target/select POST race on separate HTTP connections so the select can be
validated against a stale stored snap.

Extend TargetSelectRequest v1 with an optional positionHint {x,y,z}.
Server uses the hint for the radius check and for the echoed
targetState.validity; the hint is advisory and does not write to the
position store (move-stream stays the sole write path). Client attaches
the hint automatically whenever set_freshness_kick(...) is wired, so
headless unit tests that skip the wiring fall through to the no-hint
behavior. Freshness kick is kept in place to refresh the stored snap for
later validity GETs but is no longer load-bearing for denial correctness.

Server: 3 new tests (hint accepts when stored is stale, hint-far denies,
hint never writes to position store). Client: 1 new test asserting the
hint is in the POST body when wired. All 62 server + 96 client tests
pass.

Plan Decision 8, review follow-up #5, manual QA section 6, and NEO-23
contract notes updated. New bruno request exercises the hint path.
2026-04-21 23:52:20 -04:00
VinPropane a7453eb82f NEO-24: unify prototype target radius at 6 m, overlap rings at origin
All prototype targets now share `PrototypeTargetRegistry.SharedLockRadius`
(= 6 m). Anchors moved to alpha `(-3, 0.5, -3)` and beta `(3, 0, 3)` so
the two 6 m rings overlap ~3.5 m wide centered at origin, letting Tab
flip between targets without locomotion. Spawn `(-5, -5)` keeps alpha
in range (~2.83 m) and beta out (~11.31 m) so the existing soft-lock
denial QA path at spawn still holds.

`prototype_target_constants.gd` mirrors the shared radius + new anchors.
The range-aware Tab picker now **skips the currently-locked id** so Tab
always expresses a swap intent — if the only in-range target is already
locked, the fallback picks the next cycle id and the server denies
(preserves NEO-23's "Tab = visible denial when no swap possible" rule).

Tests:
- Server: new `PlayerTargetStateReaderTests.ComputeValidity_AtOrigin_…`
  asserts both targets report `Ok` at origin. Existing boundary test
  rewritten for the new alpha anchor.
- Client: new `test_tab_from_locked_alpha_at_origin_swaps_to_beta_when_both_in_range`
  and `test_tab_when_only_current_lock_is_in_range_falls_back_to_cycle_for_denial`.
  Existing in-range/out-of-range positions updated for the new layout.

Server 59/59 and client 95/95 suites pass.

Plan Decision 7, review follow-up #4, manual QA section 5 (new "Tab-flip
at origin" overlap sanity), and README updated. Per-target radii will
return with real combat design (E5.M1) — this is a prototype stub.
2026-04-21 23:37:42 -04:00
VinPropane 63fecb1099 NEO-24: range-aware Tab cycle skips out-of-range anchors before POST
Previously Tab from no-lock always picked `ORDERED_IDS[0]` (alpha), so
standing next to beta and pressing Tab was denied with `out_of_range`
even though the client HUD clearly showed beta in range.

Added `PrototypeTargetConstants.next_in_range_id_after(current, world)`
which walks the cycle and returns the first anchor whose client-side
horizontal distance is within the anchor radius.
`TargetSelectionClient.request_tab_next()` prefers that pick when the
player reference is wired (same path `set_freshness_kick` uses) and
falls back to the plain cycle order when nothing is in range so the
server still owns the denial reason.

Server contract (NEO-23) untouched. Tests cover the beta pick, the
nothing-in-range fallback, and the no-player-ref regression. Plan
Decision 6 + review follow-up #3 + README + manual QA updated.
2026-04-21 23:26:56 -04:00
VinPropane e31cd2df68 NEO-24: freshen server position before target-select + surface divergence on HUD
Fix "Tab says denied even though I'm in range of beta": root cause is the
race between the 20 Hz move-stream sampler and the target-select POST. A
Tab press right after the capsule stops can be validated against the
server's last sampled position, which trails the visible capsule by
several meters.

Client-side fixes (server contract unchanged):

- TargetSelectionClient.set_freshness_kick(authority, player): before each
  POST /target/select, submit a move-stream with the current player
  position so the server's stored snapshot is as fresh as possible when
  the range check runs. Wired in main.gd; optional so tests without the
  wiring still pass (regression-covered).
- PlayerPositionLabel now shows a "srv: (x,y,z) Δ=<d>m age=<ms>" line
  populated from PositionAuthorityClient.authoritative_ack, so any
  residual client/server divergence is visible in the HUD and future
  reports can point at it directly.
- Two new tests: select POST kicks exactly one freshness stream with the
  current player position before POSTing, and the kick is a no-op when
  the wiring is absent.

Docs: plan Decision 5, review follow-up #2, manual QA section 5 and
section 1, and client README updated to describe the new behaviors.
2026-04-21 23:21:16 -04:00
VinPropane 71ae829482 NEO-24: add visible target-anchor markers + HUD distance lines
Players reported targeting "feels inconsistent" because the server
PrototypeTargetRegistry anchors (alpha (-5,-5) r=8, beta (8,8) r=4) have
no visible meshes — the only console visible in the scene is the NEO-9
PrototypeTerminal at origin, which is unrelated to NEO-23/24 targeting.

Adds a display-only mirror of the server registry:

- client/scripts/prototype_target_markers.gd spawns a colored mast +
  translucent flat radius ring per anchor so the lock radius is
  visible in-world.
- client/scripts/prototype_target_constants.gd gains ANCHORS with
  position/radius/color, matching PrototypeTargetRegistry.cs. Marked
  display-only; server remains authoritative for validity.
- TargetLockLabel now renders a per-anchor distance line each physics
  tick ("<id>: <d> m / <radius> (in|out)") so players can see the
  relationship between the visible capsule and the lock radius and
  immediately spot client/server position drift.

Also updates README, plan (Decision 4), manual QA (Section 1 boot +
Section 4 locomotion), and the review file's follow-up section to
describe the UX fix.
2026-04-21 23:04:03 -04:00
VinPropane 33ebfc31c4 NEO-24: fix HUD overlap between PlayerPositionLabel and TargetLockLabel
PlayerPositionLabel's 3 lines at font_size=15 + outline=6 overran its
64 px rect, so TargetLockLabel (offset_top=82) rendered the `Target:`
row on top of the `z:` row. Bump position-label bottom to 88 and push
target-label top to 104 for clean separation; widen target-label rect to
320x120 so the optional 4th `Denied: <reasonCode>` line fits without
clipping.
2026-04-21 22:44:25 -04:00
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
VinPropane cbcb4e3d63 NEO-24: add manual QA checklist
First instance of the new docs/manual-qa/ convention. Covers boot sync,
Tab happy path, out-of-range soft-lock (both by Tab and by locomotion
per Decision 2), swap-to-beta, Esc clear, denial UI hygiene, input
behavior, move-rejection coexistence, transport failure, and no-
regression checks against NEO-7/9/19/22.
2026-04-21 22:21:50 -04:00
VinPropane f87ff2c99a chore: require manual QA checklist per story in planning-implementation-docs rule
Add docs/manual-qa/{LINEAR_ISSUE_ID}.md as a required implementation-time
artifact for stories with user-visible behavior. Documents the when-to-
create / skip criteria, required header, section structure, coverage cues,
and that the agent generates but does not tick the boxes. Cross-references
from AGENTS.md alongside plans and reviews.
2026-04-21 22:21:44 -04:00
VinPropane e5bbfd3ee7 NEO-24: reconcile plan — tick acceptance criteria shipped 2026-04-21 22:14:49 -04:00
VinPropane ee572e3661 NEO-24: client tab-target + lock HUD synced to server
Adds `TargetSelectionClient` (Godot, HTTP to NEO-23 targeting endpoints):
- Tab cycles ids in ascending order matching `PrototypeTargetRegistry`
  (`prototype_target_alpha`, `prototype_target_beta`) and wraps.
- Esc clears by POSTing with `targetId` omitted.
- UI always paints from the server's authoritative `targetState`
  (success and denials alike); `UICanvas/TargetLockLabel` shows
  `lockedTargetId`, `validity`, `sequence`, and (on deny) `reasonCode`.
- Movement-triggered refresh: while a lock is held, subsequent
  `authoritative_position_received` snaps fire a throttled GET
  (~250 ms cooldown) so `validity` flips to `out_of_range` after
  locomotion without duplicating server radius math on the client.

Registers `target_tab` (Tab) / `target_clear` (Esc) in `project.godot`;
documents bindings + manual QA in `client/README.md`.

Tests: `target_selection_client_test.gd` covers GET parse, tab ordering
from empty/alpha/wrap, POST body shape, denial preserves server state,
clear omits targetId, movement refresh fires only while locked, cooldown
collapses bursts to one GET, and `apply_as_snap=false` is ignored.
All 85 client GdUnit cases pass; gdlint and gdformat clean.

See `docs/plans/NEO-24-implementation-plan.md`.
2026-04-21 22:14:16 -04:00
VinPropane ddfc78a044 NEO-24: lock kickoff decisions (Tab/Esc; hybrid movement-triggered refresh) 2026-04-21 22:02:33 -04:00
VinPropane 8a39982146 NEO-24: add implementation plan for client tab-target UI 2026-04-21 21:58:13 -04:00
VinPropane 37f44a4944
Merge pull request #46 from ViPro-Technologies/chore/bruno-api-collection
chore: add Bruno API collection and testing-expectations for HTTP
2026-04-18 19:57:45 -04:00
VinPropane c5cdf05392 chore: add Bruno API collection and testing-expectations for HTTP 2026-04-18 19:49:22 -04:00
VinPropane d4bfd59251
Merge pull request #45 from ViPro-Technologies/chore/story-kickoff-clarify-questions
chore: story kickoff — ask user when unclear or decision needed
2026-04-17 21:21:16 -04:00
VinPropane aed600abd2 chore: story kickoff — ask user when unclear or decision needed 2026-04-17 21:19:40 -04:00
VinPropane 114bebc8da
Merge pull request #44 from ViPro-Technologies/NEO-23-e1m3-targetstate-selection-api
NEO-23 e1m3 targetstate selection api
2026-04-17 21:18:17 -04:00
VinPropane 17f87aa747 NEO-23: code review follow-up (E1.M3 docs, GET 404 test, radius bounds) 2026-04-17 21:14:43 -04:00
VinPropane 7e18ecedb6 NEO-23: Add code review for targeting API branch 2026-04-17 21:12:46 -04:00
VinPropane 465c4b14eb NEO-23: add targeting HTTP API (TargetState v1, select intent) 2026-04-17 21:06:59 -04:00
VinPropane 8c9db789d0 NEO-23: lock JSON shape, GET envelope, selectionApplied, soft lock in plan 2026-04-17 21:04:01 -04:00
VinPropane bd0286cb1c NEO-23: add implementation plan for TargetState v1 and selection API 2026-04-17 20:57:13 -04:00
VinPropane 1233801227
Merge pull request #43 from ViPro-Technologies/docs/e1m3-interaction-targeting-layer
Docs/e1m3 interaction targeting layer
2026-04-17 20:52:43 -04:00
VinPropane abb6e6b81b NEO-22: Add Godot .uid sidecars for WASD locomotion scripts 2026-04-17 20:51:16 -04:00
VinPropane 7f9fc8e429 chore: address E1.M3 docs review (Slice 3 anchor, Linear pointers) 2026-04-17 20:48:53 -04:00
VinPropane 5bb70efd6c chore: docs review for E1.M3 documentation pass 2026-04-17 20:47:47 -04:00
VinPropane 189c1c9810
Merge pull request #42 from ViPro-Technologies/NEO-22-retire-click-to-move-wasd-locomotion
Neo 22 retire click to move wasd locomotion
2026-04-17 20:27:54 -04:00
VinPropane 735f569496 NEO-22: Fix locomotion test static calls for GDScript + LSP
Type preload as GDScript so static helpers resolve on the script
resource; pass Array[float] literals into median_feet_y_from_samples to
match typed parameters. Document FLOOR_RAY_FEET_INVALID sync in tests.
2026-04-17 20:24:16 -04:00
VinPropane 866c973af7 NEO-22: Cache scrape contact in WASD tick; close review items
run_wasd: one _has_scrape_vertical_contact() before move_and_slide and one
after; fold repeated predicates into wish_active_scrape_vertical_pre and
post_slide_wish_floor_scrape.

Review doc: mark suggestions #2/#4 done; suggestion #1, nits, verification
ledge bullet, and partial doc rows reviewed/deferred with strikethrough notes.
2026-04-17 20:21:13 -04:00
VinPropane c79c58c298 NEO-22: Unit-test WASD locomotion pure helpers
Extract static helpers (floor-ray continuation, median feet Y, micro-slip
XZ projection, wish-aligned horizontal velocity) from the tick path so
GdUnit can cover seam math without physics doubles. Add
player_locomotion_wasd_test.gd, document in README, and update NEO-22
plan/review.
2026-04-17 20:16:25 -04:00
VinPropane 90a17bc43d NEO-22: Extract WASD locomotion for gdlint max-file-lines
Move the WASD physics tick into player_locomotion_wasd.gd so player.gd
stays under the 1600-line CI cap. Fix gdlint class order (enum before
consts), load-constant naming, and wrap long doc lines. Update NEO-22
review and plan; refresh gdlintrc comment.
2026-04-17 20:13:36 -04:00
VinPropane 05f703322d NEO-22: Add code review for WASD locomotion wall-scrape diff 2026-04-17 20:08:26 -04:00
VinPropane a7e6a5af59 NEO-22: Fix GdUnit warnings in position_authority_client_test
Rename mock variables to avoid shadowing GdUnitTestSuite.mock, drop
redundant await on synchronous assert_signal chains, and ignore
unused request_completed on HangingHttpTransport (API parity only).
2026-04-17 20:07:27 -04:00
VinPropane a4095cb9bf NEO-22: Remove click-to-move client and legacy move POST/verify
Delete ground_pick and GroundPick wiring; PositionAuthorityClient now only
boot GET and move-stream POST. main.gd snaps on authoritative position only.
Update client/server READMEs, cursor rule example, NEO-22 plan note, and
GdUnit authority tests (stream 400 + boot resync).
2026-04-17 20:06:46 -04:00
VinPropane 76ff2cddac NEO-22: clear idle anchor during WASD so stop does not snap back
Stable idle latches _idle_anchor_active and _hold_idle_anchor clamps XZ each
tick. Locomotion bypasses that branch, so the anchor stayed at the pre-walk
position while the capsule moved; releasing keys ran idle again and
_hold_idle_anchor teleported to the stale anchor.
2026-04-17 19:37:58 -04:00
VinPropane 6cc2ac60d4 NEO-22: stop applying move-stream HTTP body as client teleport
Successful move-stream responses echoed server position roughly one RTT behind
integrated move_and_slide, so apply_as_snap still fired whenever dh exceeded
the locomotion skip threshold. Treat stream 200 as ack-only: do not emit
authoritative_position_received. Boot GET and click-move verify unchanged.
Update README + GdUnit expectation.
2026-04-17 19:34:45 -04:00
VinPropane 39a41ac62c NEO-22: suppress stream snap-back while locomoting
Stream HTTP responses can lag integrated move_and_slide by roughly one RTT,
so apply_as_snap was pulling the capsule backward each tick while moving.
Skip small XZ corrections when wish or horizontal speed indicates locomotion,
with a cap so large desync still snaps. move_rejected sets a one-shot flag so
resync after move-stream 400 still applies the authoritative pose.
2026-04-17 19:29:56 -04:00
VinPropane 878b1f4aee NEO-22: fix stream rubber-banding (coalesce, idle gate, soft snap)
Queue only latest move-stream target per POST; clear pending while busy.
Skip stream submits when idle; skip tiny authoritative snaps after boot.
2026-04-17 19:27:10 -04:00
VinPropane a2c6c9f93e NEO-22: add move-stream API and WASD client locomotion
Introduce POST /game/players/{id}/move-stream with ordered targets, full-chain
validation before apply, and PositionStateResponse. Godot client uses camera-
relative WASD, queues samples, and snaps to stream responses; debug builds keep
click-to-move via ground_pick. Update READMEs, E1.M1 snapshot, and tests.
2026-04-17 19:21:33 -04:00
VinPropane 7ffeb320c4 NEO-22: record option C stream authority in implementation plan 2026-04-17 19:17:18 -04:00