MosswartOverlord/go-services/tracker-go
Erik 27757636e4 feat(go-services): tracker WS servers (/ws/position + /ws/live) + robust shadow
Completes the Go tracker as a cutover-ready drop-in:
- wslive.go: browser broadcast hub with per-client subscribe filters (nil=all),
  request_dungeon_map replies, and command routing; auth = internal-trust or
  session cookie. The ingestor broadcasts every handled event to it.
- wsposition.go: plugin ingest server with X-Plugin-Secret/SHARED_SECRET auth
  (constant-time, fails closed, legacy fallback), register -> plugin_conns, and
  dispatch into the shared Ingestor. plugin registry for backend->plugin commands.
- main.go: statusRecorder.Unwrap() so coder/websocket can hijack through the
  logging middleware (WS handshakes failed without it); /ws/ bypasses HTTP auth.

Shadow consumer robustness (the harness was being evicted under the full
firehose): decouple socket read from processing — the read loop only copies raw
frames to a queue; a worker unmarshals + dispatches. JSON parsing in the read
loop was slowing it enough that Python's broadcast send errored and evicted us
(Read then blocked forever). Added a 25s read-deadline watchdog to self-heal.

Validated live: shadow /live online = 73 = production; telemetry sustained ~12/s,
0 drops, no eviction; and the shadow's /ws/live re-broadcast stream is IDENTICAL
to production's (TOTAL 2150=2150, every event type exact).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 11:15:05 +02:00
..
auth.go feat(go-services): tracker WS servers (/ws/position + /ws/live) + robust shadow 2026-06-24 11:15:05 +02:00
charstats.go feat(go-services): Phase 2 — combat_stats accumulator (cross-language exact) 2026-06-24 10:42:15 +02:00
combat.go feat(go-services): Phase 2 — combat_stats accumulator (cross-language exact) 2026-06-24 10:42:15 +02:00
combat_test.go feat(go-services): Phase 2 — combat_stats accumulator (cross-language exact) 2026-06-24 10:42:15 +02:00
Dockerfile feat(go-services): Phase 2 — combat_stats accumulator (cross-language exact) 2026-06-24 10:42:15 +02:00
go.mod feat(go-services): tracker-go Phase 0/1 — /live + /trails read parity 2026-06-24 09:24:22 +02:00
ingest.go feat(go-services): tracker WS servers (/ws/position + /ws/live) + robust shadow 2026-06-24 11:15:05 +02:00
live.go feat(go-services): tracker-go Phase 0/1 — /live + /trails read parity 2026-06-24 09:24:22 +02:00
main.go feat(go-services): tracker WS servers (/ws/position + /ws/live) + robust shadow 2026-06-24 11:15:05 +02:00
memstate.go feat(go-services): Phase 2 ingest — shared Ingestor + shadow consumer 2026-06-24 10:31:15 +02:00
proxy.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
reads.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
schema.go feat(go-services): Phase 2 foundation — isolated shadow DB + schema 2026-06-24 10:18:30 +02:00
shadow.go feat(go-services): tracker WS servers (/ws/position + /ws/live) + robust shadow 2026-06-24 11:15:05 +02:00
store.go feat(go-services): Phase 2 foundation — isolated shadow DB + schema 2026-06-24 10:18:30 +02:00
totals.go feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
wslive.go feat(go-services): tracker WS servers (/ws/position + /ws/live) + robust shadow 2026-06-24 11:15:05 +02:00
wsposition.go feat(go-services): tracker WS servers (/ws/position + /ws/live) + robust shadow 2026-06-24 11:15:05 +02:00