MosswartOverlord/go-services
Erik 6a839e69bc feat(go-services): Phase 2 foundation — isolated shadow DB + schema
Stands up the shadow-ingest substrate without touching production:
- schema.go: faithful replica of db_async.init_db_async (idempotent DDL),
  run only when an instance OWNS its DB (READ_ONLY=false). Fixes for a fresh DB:
  spawn_events has no sole-id PK (so it can be a hypertable), telemetry_events
  compression is enabled before its policy, and the portal unique index uses
  ROUND(..,1) to match main.py's ON CONFLICT. 35/35 statements OK.
- store.go: read-only transaction enforcement is now conditional (on for
  production read parity, off for ingest).
- main.go: READ_ONLY + SHADOW_INGEST_WS config; schema init on boot when owning
  the DB.
- compose override: a SEPARATE TimescaleDB `dereth-go-db` (isolated volume,
  127.0.0.1:5434) and a `dereth-tracker-go-shadow` instance (image reused via
  dereth-tracker-go:local) that owns it. Production DB never written.

Verified: dereth_go has all 13 tables; telemetry_events + spawn_events are
hypertables; the read-side instance still serves production read-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 10:18:30 +02:00
..
compare feat(go-services): tracker-go — complete the Phase 1 read API 2026-06-24 09:38:10 +02:00
discord-go feat(go-services): discord-go — Go port of discord-rare-monitor 2026-06-24 10:06:59 +02:00
nginx chore(go-services): ready-to-apply nginx /go/ snippet (user must sudo) 2026-06-24 09:51:25 +02:00
tracker-go feat(go-services): Phase 2 foundation — isolated shadow DB + schema 2026-06-24 10:18:30 +02:00
.gitattributes chore(go-services): add .gitattributes (force LF) to stop CRLF churn 2026-06-24 10:07:20 +02:00
docker-compose.go.yml feat(go-services): Phase 2 foundation — isolated shadow DB + schema 2026-06-24 10:18:30 +02:00