ai-code-battle/cmd/acb-index-builder
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
..
blog.go feat(matchmaker): implement §6.1 Pareto skill-proximity + LRU pairing algorithm 2026-04-22 17:35:00 -04:00
cards.go Implement S3 functions for R2/B2 integration in acb-index-builder 2026-03-29 09:09:29 -04:00
config.go feat(matchmaker): implement §6.1 Pareto skill-proximity + LRU pairing algorithm 2026-04-22 17:35:00 -04:00
db.go feat(playlists): add playlist curation and rebuild logic per §10, with series/seasons/enrichment 2026-04-21 16:11:27 -04:00
deploy.go feat(index): implement match thumbnail PNG generation (§7.2, §14.3) 2026-04-22 17:42:36 -04:00
Dockerfile fix(index-builder): include web frontend in Pages deployment 2026-04-21 07:23:45 -04:00
enrichment.go feat(playlists): add playlist curation and rebuild logic per §10, with series/seasons/enrichment 2026-04-21 16:11:27 -04:00
enrichment_test.go fix(index-builder): correct series/season exempt queries, optimize playlist curation 2026-04-21 16:47:13 -04:00
generator.go feat(index): implement match thumbnail PNG generation (§7.2, §14.3) 2026-04-22 17:42:36 -04:00
main.go fix(index-builder): improve rivalry recency test isolation + add metrics 2026-04-22 16:07:18 -04:00
main_test.go feat(replay): add debug telemetry panel and fix test build 2026-04-21 16:57:15 -04:00
narrative.go feat(matchmaker): implement §6.1 Pareto skill-proximity + LRU pairing algorithm 2026-04-22 17:35:00 -04:00
narrative_test.go feat(blog): add rivalry context to spotlight prompt and fix narrative tests 2026-04-21 15:45:33 -04:00
rivalry_test.go fix(index-builder): improve rivalry recency test isolation + add metrics 2026-04-22 16:07:18 -04:00
s3.go feat(evolver): complete Phase 7 LLM-driven evolution implementation 2026-04-08 16:38:48 -04:00
s3_test.go Implement S3 functions for R2/B2 integration in acb-index-builder 2026-03-29 09:09:29 -04:00