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 |
||
|---|---|---|
| .. | ||
| acb-api | ||
| acb-enrichment | ||
| acb-evolver | ||
| acb-index-builder | ||
| acb-local | ||
| acb-map-evolver | ||
| acb-mapgen | ||
| acb-maps-loader | ||
| acb-matchmaker | ||
| acb-wasm | ||
| acb-worker | ||