Commit Graph
151 Commits
Author SHA1 Message Date
jpmschweitzerandClaude Opus 4.6 1443f9dc9e chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:48:28 +01:00
jpmschweitzerandClaude Opus 4.6 dcf887cb49 feat(client): add tile rendering, fog overlay, and camera smoothing
Sprint 2 rendering pipeline: tiles (#129), fog (#131), camera (#116).

- tile_renderer.gd: programmatic TileSet with floor/wall/door/object
  placeholder tiles, renders from snapshot tile data
- fog_renderer.gd: TileMapLayer overlay with three visibility states
  (visible/fog-edge/hidden), computed from visible_positions data
- Camera2D: smoothing enabled (speed 6.0), 2x zoom, locked to player
- game_state.gd: stores visible_tiles and visible_positions from snapshots
- sim_bridge.gd: test data with 8x8 room, corridor, and Manhattan
  distance visibility for development without server
- Scene render order: Tiles -> FogOverlay -> Entities
- Background clear color set to near-black for unexplored areas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:48:02 +01:00
jpmschweitzerandClaude Opus 4.6 55b775ee73 fix(client): fix entity renderer to match protocol format
entity_renderer.gd used wrong field names ("id" instead of
"entity_id", "type" instead of "kind.variant", "position" instead
of x/y). Now matches Protocol.decode_entity() output exactly.
Also centers entities (24x24) within 32px tiles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:47:49 +01:00
jpmschweitzer 6580346c75 Merge branch 'main' into client 2026-02-11 23:03:32 +01:00
jpmschweitzerandClaude Opus 4.6 c065d98325 chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:02:27 +01:00
jpmschweitzerandClaude Opus 4.6 edfb1bb93d feat(db): add team column to ticket system
Adds a comma-separated team field to tickets so work can be
attributed to server, client, or joint teams. Includes --team
filter on list, --team on create, and a new team subcommand.
Schema, CLI, and skill docs all updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:02:06 +01:00
jpmschweitzer 70a7d6527d Merge branch 'main' into client 2026-02-11 22:57:23 +01:00
jpmschweitzerandClaude Opus 4.6 811a5f8a4c chore(config): track .claude/settings.json in version control
Settings.json is the shared team config (distinct from settings.local.json
which remains per-user). Remove it from .gitignore so it's tracked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:55:56 +01:00
jpmschweitzerandClaude Opus 4.6 1883a6a6d4 docs(sprints): add updated joint briefing for sprint 2
Joint tasks with ticket IDs (#356-#360), dependency chains,
and sprint completion proof criteria for client team reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:34:24 +01:00
jpmschweitzerandClaude Opus 4.6 160add9719 docs(sprints): update sprint 2 briefings with ticket IDs and dependencies
Server team added #356-#360 for pre-sprint design tasks and
integration milestones. Updated server.md and joint.md with
actual ticket numbers, dependency chains, and done status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:30:05 +01:00
jpmschweitzerandClaude Opus 4.6 79603c9a7f chore(db): add sprint 2 pre-sprint tickets and update joint briefing
Server team added #356-#360: fog bridge, sprint proof, snapshot
v2 schema, Q-018/Q-019 resolution tasks. Updated joint.md with
actual ticket numbers and #81 done status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:24:09 +01:00
jpmschweitzer 45ad3cdf0c Merge remote-tracking branch 'origin/maintenance' 2026-02-11 22:20:10 +01:00
jpmschweitzerandClaude Opus 4.6 8c5a022cfd chore(db): activate sprint 2 "See" with 9 tickets
Server: #110 shadowcasting, #111 vision cone, #112 observer
query, #25 game clock. Client: #116 camera lock, #129 tile
rendering, #130 entity sprites, #131 fog overlay, #113 fog
rendering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:17:31 +01:00
jpmschweitzerandClaude Opus 4.6 468aad60d4 chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:11:44 +01:00
jpmschweitzerandClaude Opus 4.6 39f85dfb3a fix(skills): use absolute paths in start-sprint for worktree safety
The skill used bare relative paths like db/connectors/ticket which
fail when the shell CWD doesn't match the worktree root. Now requires
resolving REPO_ROOT via git rev-parse --show-toplevel first.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:11:34 +01:00
jpmschweitzerandClaude Opus 4.6 08e794086e chore(db): close sprint 1 and mark epic #37 done
Sprint 1 "Run" completed — 8/8 tickets done. Player-controlled
character moving on screen through working IPC bridge achieved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:10:27 +01:00
jpmschweitzerandClaude Opus 4.6 deb834e64a chore(db): mark sprint 1 tickets #81 and #236 as done
E2E connection test (#81) merged via PR #7. Tile collision
system (#236) already on main. Sprint 1 now 7/8 complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 22:08:32 +01:00
jpmschweitzer fcd16433c8 Merge remote-tracking branch 'origin/client'
# Conflicts:
#	CHANGELOG.md
2026-02-11 22:04:04 +01:00
jpmschweitzerandClaude Opus 4.6 beee44b3c8 feat(client): add batch fixture, fixture smoke test, decode_errors test
Tyre #1: Added Rust-generated input_batch_two.msgpack fixture for
bidirectional D-030 Layer 1 symmetry (Vec<PlayerInput>).
Tyre #2: Added all_fixtures_deserialize Rust test that reads every
.msgpack fixture and verifies it deserializes (corruption guard).
Hoshe #3: Added test_decode_snapshot_malformed_entities_counted test
verifying the decode_errors counter on D-010 boundary violations.
45 client tests, 54 server tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:57:18 +01:00
jpmschweitzerandClaude Opus 4.6 8d12776b5d fix(client): address PR #7 review — ephemeral port, input drop docs
Hoshe #1: E2E test now uses random ephemeral port (49152-65535) with
port rotation on bind failure, avoiding conflicts in parallel CI.
Hoshe #2: Documented intentional input drop on encode failure in
SimBridge — re-queuing would retry bad data and server tick has
already advanced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:57:11 +01:00
jpmschweitzerandClaude Opus 4.6 a54a3a8100 chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:46:01 +01:00
jpmschweitzerandClaude Opus 4.6 f160f07e6d fix(skills): remove references to nonexistent init/package scripts
Replace init_skill.py and package_skill.py references with manual
mkdir and validation checklist — the scripts were never created.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:45:42 +01:00
jpmschweitzerandClaude Opus 4.6 c35248f103 chore(skills): add plan-sprint skill for sprint briefing generation
Automates the sprint planning workflow: gather carry-overs, scan
backlog, propose tickets, write per-team briefing files. Includes
briefing template reference matching the established format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:45:40 +01:00
jpmschweitzerandClaude Opus 4.6 7f97cb7ce3 docs(sprints): add Sprint 2 "See" briefings for server, client, joint
Sprint 2 goal: fog of perception working through the bridge. Server
computes LOS visibility, client renders fog. Carries over #236 and #81
from Sprint 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:45:38 +01:00
jpmschweitzerandClaude Opus 4.6 d96a0599b6 feat(db): add multi-ID show and --brief flag to ticket CLI
ticket show now accepts multiple IDs (e.g. ticket show 110 111 112).
--brief flag outputs compact human-readable summaries instead of JSON,
useful for sprint planning scans. Single-ID JSON output unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:45:35 +01:00
jpmschweitzerandClaude Opus 4.6 c737d687aa chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:44:51 +01:00
jpmschweitzerandClaude Opus 4.6 5e4b8dbcf3 feat(client): add E2E connection test and batch encoding tests
D-030 Layer 3: E2E test spawns the Rust server binary, connects via
LocalBridge, sends a batched MoveNorth input, and verifies the player
moved to (16.5, 15.5). Also adds batch encoding roundtrip tests,
framed batch test, and Player entity fixture decode test. 43/43 pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:44:27 +01:00
jpmschweitzerandClaude Opus 4.6 e1e4e346c7 feat(client): add EntityKind::Player fixture and update multi-entity fixture
Server team added EntityKind::Player variant. Added snapshot_player
fixture and updated snapshot_multi_entity to include all 4 entity kinds
(Player, Npc, Object, Terrain) for complete D-030 Layer 1 coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:44:20 +01:00
jpmschweitzerandClaude Opus 4.6 2338941721 fix(client): batch-encode inputs as Vec<PlayerInput> per server wire format
Server expects a MessagePack array of PlayerInput objects in one framed
message per tick, not individual inputs per frame. Added
Protocol.encode_player_inputs() for batch encoding. Changed SimBridge to
buffer raw input dicts and batch-encode in _process(). Also fixed server
port default (9876) and positional arg format to match server CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:44:14 +01:00
jpmschweitzerandClaude Opus 4.6 06aebccecc chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:36:19 +01:00
jpmschweitzerandClaude Opus 4.6 1b201ddfc3 chore(db): add 17 tickets from architecture review audit (#339-#355)
12 actionable items (7 Sprint 1 tasks, 5 Sprint 2+ tasks) and
5 workshop epic tickets. Sprint 1 critical items include protocol
handshake, SpatialIndex trait, HashMap ban, IPC timing benchmark,
and entity_renderer.gd bug fix. Workshop #352 blocked by #351.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:36:07 +01:00
jpmschweitzerandClaude Opus 4.6 1920f002a1 docs(workshops): add 5 architecture spike workshop briefs
Workshop briefs for the larger spikes identified by the architecture
review audit: knowledge graph & information boundaries, observer
snapshot pipeline, NPC AI state machines, save/load architecture,
and map authoring pipeline. Each includes participants, key questions,
input documents, and expected outputs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:36:02 +01:00
jpmschweitzerandClaude Opus 4.6 e1a3913060 docs(decisions): add Q-018 through Q-023 from architecture audit
Six new open questions identified by the Tyre/Troblum architecture
review: shadowcasting algorithm selection, entity ID stability,
multi-entity collision resolution, tick budget overflow policy,
pathfinding cache eviction, and debug visualization scope.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:35:56 +01:00
jpmschweitzerandClaude Opus 4.6 af928d74cf chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:30:15 +01:00
jpmschweitzerandClaude Opus 4.6 33db0caa69 docs(audits): add architecture audit framework and Sprint 1 review
Two-round adversarial review by Tyre + Troblum covering full
architecture decisions and implementation. Status: GREEN architecture,
AMBER implementation plan.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:29:58 +01:00
jpmschweitzerandClaude Opus 4.6 3d872f0d3f chore(db): track ticket status updates (#78, #79, #81-#83 done)
Sprint 1 IPC tickets marked done after client and server PR merges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:29:54 +01:00
jpmschweitzerandClaude Opus 4.6 b9a3d8efea Merge branch 'server' into main (PR #6)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:26:48 +01:00
jpmschweitzerandClaude Opus 4.6 3f4c663242 fix(bridge): improve accept error reporting with address context
Replace expect() with unwrap_or_else that logs the bind address
and error via tracing before exiting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:16:08 +01:00
jpmschweitzerandClaude Opus 4.6 b9af725b02 fix(simulation): correct tick synchronization in snapshot generation
Snapshot for tick N should show state at END of tick N. Reorder systems
so generate_snapshot runs after validate_movement but before
advance_tick. Previously snapshot.tick was the incremented tick,
not the tick whose inputs were processed. Also fix main.rs accept
error to log address context before exiting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:16:04 +01:00
jpmschweitzerandClaude Opus 4.6 2cd8786036 fix(bridge): add Disconnected error variant, fix test race condition
Replace string-matching disconnect detection with explicit
BridgeError::Disconnected variant. Add TcpBridge::accept_on(listener)
that takes a pre-bound TcpListener, eliminating the 100ms sleep hack
in TCP tests. Send errors now also trigger ServerRunning=false.
Add trace logging to generate_snapshot for entity count visibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:15:56 +01:00
jpmschweitzerandClaude Opus 4.6 3befd2309c fix(client): address PR #5 review — race condition, buffer corruption, input error
Critical fixes from Hoshe review:
1. Race condition: defer TCP connect to _process() with retry logic
   (MAX_CONNECT_RETRIES=20, 100ms interval) so server has time to bind.
2. Buffer corruption: disconnect on oversized message instead of
   clearing valid buffered data (_corrupt flag, fail-safe).
3. Silent input drop: send_input() returns Error so callers can detect
   encode/validation failures.

Warnings addressed:
- ServerProcess validates server_path exists before spawning
- SIGKILL and health check TODOs documented for future work
- Diagonal keybindings documented as intentional deferral
- send_message uses single put_data() call (no partial write risk)
- Static frame helpers documented as D-030 Layer 2 test-only

New tests (36 total, up from 33):
- Partial read scenario (chunked TCP delivery)
- Multi-message sequential decode (exercises buffer corruption fix)
- send_input error return on invalid action

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:14:52 +01:00
jpmschweitzerandClaude Opus 4.6 058d0352ab chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:02:00 +01:00
jpmschweitzerandClaude Opus 4.6 a5b88cb735 chore(bridge): format gen_fixtures.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:01:31 +01:00
jpmschweitzerandClaude Opus 4.6 7864bfdf7d feat(simulation): add input processing, snapshot gen, and game loop
Implements the full server-side tick pipeline:
- process_player_input drains InputQueue, converts PlayerActions to
  MoveIntent components or pause/unpause toggles
- generate_snapshot builds ObserverSnapshot from ECS state with
  render coordinate conversion
- receive_bridge_inputs/send_bridge_snapshot handle bridge I/O with
  graceful disconnect detection via ServerRunning resource
- main.rs now accepts TCP connections and runs a proper game loop
- PlayerCharacter marker, Player EntityKind, SnapshotBuffer resource

Closes server side of #81, #82, #83.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:01:28 +01:00
jpmschweitzerandClaude Opus 4.6 1b0e514560 feat(bridge): add TCP transport for Godot client connection
Godot has no Unix socket API, so TCP localhost is required for
client-server IPC. TcpBridge implements SimBridge with the same
framing protocol as LocalBridge. Includes accept/connect methods
and three integration tests over TCP.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:01:20 +01:00
jpmschweitzerandClaude Opus 4.6 f6ce7d4046 fix(bridge): use named MessagePack format for wire compatibility
Client-side Protocol.gd expects rmp_serde::to_vec_named() (maps with
string keys), but LocalBridge was using to_vec() (compact positional
arrays). Fix send_snapshot and update all test serialization calls to
match actual wire format. Also change EOF from Ok(vec![]) to
BridgeError::Transport so bridge systems can detect disconnects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:01:15 +01:00
jpmschweitzerandClaude Opus 4.6 c4e1b07346 chore(meta): update changelog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:00:04 +01:00
jpmschweitzerandClaude Opus 4.6 0f75c3194d feat(client): add LocalBridge framing tests and diagonal fixtures
12 new tests covering framing roundtrips, cross-layer Protocol+framing
integration, and diagonal wire mapping. 4 new diagonal movement
fixtures generated from Rust for D-030 Layer 1 cross-language
verification. 33/33 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:59:46 +01:00
jpmschweitzerandClaude Opus 4.6 2ecafff2ed feat(client): integrate LocalBridge transport and 8-directional movement
Wire SimBridge to use LocalBridge for TCP transport in non-test mode:
_process() polls for incoming snapshots and flushes outbound inputs.
Add 4 diagonal movement variants (NE, SE, SW, NW) to InputMapper and
wire mapping, ordered clockwise. Register diagonal input actions in
project.godot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:59:40 +01:00
jpmschweitzerandClaude Opus 4.6 6dfaf2831f feat(client): add LocalBridge TCP transport and ServerProcess manager
LocalBridge wraps StreamPeerTCP with 4-byte big-endian length-prefix
framing matching server/src/bridge/framing.rs. ServerProcess manages
the Rust server as a subprocess via OS.create_process(). Together
they form the D-020 IPC transport layer for ticket #79.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:59:34 +01:00