ai-code-battle/cmd
jedarden 4b7d81db45 feat(index-builder): bundle warm-set replays as static Pages assets
Per bead bf-3e60: instead of copying B2->R2 (warm cache), bundle warm-set
replays, thumbnails, cards, and evolution live.json directly into the Pages
deploy directory as static assets (dist/data/). This serves replays same-origin,
eliminating R2 dependency and 404 errors.

Changes:
- Add B2Client interface for testable B2 operations
- Add bundleWarmReplays(): copies replays/*.json.gz from B2 to dist/data/replays/
- Add bundleWarmThumbnails(): copies thumbnails/*.png from B2 to dist/data/thumbnails/
- Add bundleWarmCards(): copies cards/*.png from B2 to dist/data/cards/
- Add bundleEvolutionLive(): copies evolution/live.json from B2 to dist/data/evolution/
- Replace promoteRecentReplaysForCycle() with bundleWarmAssetsForCycle()
- Remove R2 pruning logic from main loop (no longer needed)
- Add unit tests for all bundling functions with mock B2 client

Replays are served gzipped (as-is from B2) to keep deploy size under Pages'
25MB file limit. Frontend will gunzip client-side (separate bead bf-5cwi).

All tests pass (go test ./...).

Closes: bf-3e60
2026-05-26 07:35:48 -04:00
..
acb-api feat(api): add GET /api/status/{bot_id} endpoint per plan §8.2 2026-05-25 16:53:03 -04:00
acb-enrichment feat(enrichment): align config with other services for K8s deployment 2026-05-25 01:44:59 -04:00
acb-evolver fix(evolver): use ConfigForPlayers for 2-player matches per plan §3.4 2026-05-24 22:35:15 -04:00
acb-index-builder feat(index-builder): bundle warm-set replays as static Pages assets 2026-05-26 07:35:48 -04:00
acb-local fix(cli): handle draw result without panic 2026-05-24 11:13:00 -04:00
acb-map-evolver style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
acb-mapgen feat(engine): add pre-generated map loading from map library 2026-05-25 14:14:27 -04:00
acb-maps-loader style: format Go files with gofmt 2026-05-25 15:33:38 -04:00
acb-matchmaker style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
acb-wasm style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
acb-worker feat(engine): add pre-generated map loading from map library 2026-05-25 14:14:27 -04:00