ai-code-battle/engine
jedarden 89560e5ec4 feat(index): implement match thumbnail PNG generation (§7.2, §14.3)
Implementation complete:

1. engine/thumbnail.go - New thumbnail rendering package
   - GenerateMatchThumbnail() creates 640x360 PNG thumbnails
   - Renders grid, bots, cores, walls, energy with player colors
   - SelectThumbnailTurn() chooses most interesting turn
   - Pure Go stdlib image rendering (no canvas required)

2. cmd/acb-worker - Upload thumbnails to B2 alongside replays
   - uploadThumbnail() generates PNG and uploads to B2
   - Key: thumbnails/{match_id}.png, content-type: image/png
   - Called after match completion, non-blocking on failure

3. cmd/acb-index-builder/deploy.go - Promote thumbnails to R2
   - promoteRecentReplays() copies both replays AND thumbnails from B2 to R2
   - Thumbnails promoted to warm cache alongside replay promotion

4. cmd/acb-index-builder/generator.go - Populate thumbnail URLs
   - buildPlaylistMatch() now includes thumbnail_url field
   - URL pattern: https://r2.aicodebattle.com/thumbnails/{match_id}.png
   - Enables playlist cards and embed OG tags to show preview images

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 17:42:36 -04:00
..
auth.go Complete Phase 2: HTTP protocol and 6 strategy bots 2026-03-24 07:00:38 -04:00
auth_test.go Complete Phase 2: HTTP protocol and 6 strategy bots 2026-03-24 07:00:38 -04:00
bot_http.go fix(engine): enforce strict HMAC response signature verification per §4.4 2026-04-22 13:18:10 -04:00
bot_http_test.go fix(engine): enforce strict HMAC response signature verification per §4.4 2026-04-22 13:18:10 -04:00
bot_local.go Implement Phase 1 core engine: grid, combat, fog of war, turn execution 2026-03-24 01:48:27 -04:00
bot_strategies.go feat(evolver): complete Phase 7 LLM-driven evolution implementation 2026-04-08 16:38:48 -04:00
determinism_test.go Complete Phase 1: add connectivity validation and determinism tests 2026-03-24 03:44:44 -04:00
game.go fix(matchmaker): multi-match crash cooldown (3 strikes / 30 min) per §4.5 + §6.1 2026-04-22 15:22:12 -04:00
grid.go Implement Phase 1 core engine: grid, combat, fog of war, turn execution 2026-03-24 01:48:27 -04:00
grid_test.go Implement Phase 1 core engine: grid, combat, fog of war, turn execution 2026-03-24 01:48:27 -04:00
integration_test.go Complete Phase 2: HTTP protocol and 6 strategy bots 2026-03-24 07:00:38 -04:00
match.go fix(matchmaker): multi-match crash cooldown (3 strikes / 30 min) per §4.5 + §6.1 2026-04-22 15:22:12 -04:00
replay.go feat(engine): integrate Monte Carlo win probability computation into match runner 2026-04-21 08:46:39 -04:00
thumbnail.go feat(index): implement match thumbnail PNG generation (§7.2, §14.3) 2026-04-22 17:42:36 -04:00
turn.go fix(matchmaker): multi-match crash cooldown (3 strikes / 30 min) per §4.5 + §6.1 2026-04-22 15:22:12 -04:00
turn_test.go fix(engine): use core1 variable in spawn priority tiebreak test 2026-04-22 14:45:06 -04:00
types.go feat(matchmaker): implement §6.1 Pareto skill-proximity + LRU pairing algorithm 2026-04-22 17:35:00 -04:00
winprob.go feat(engine): integrate Monte Carlo win probability computation into match runner 2026-04-21 08:46:39 -04:00