ai-code-battle/cmd
jedarden 9bcbd566b6 Bug fix bf-3mx7: Fix match index winner badge - use p.Won instead of comparing BotID with WinnerID
The WinnerID field is a player-slot integer as string (e.g. "2"), not a bot_id.
The SQL query already computes the correct winner status in p.Won field.

Fixed in 3 functions:
- matchToSummary: Changed Won: p.BotID == m.WinnerID to Won: p.Won
- buildPlaylistMatch: Changed Won: p.BotID == m.WinnerID to Won: p.Won
- ratingUpsetMagnitude: Use p.Won to identify winner instead of comparing with m.WinnerID
- maxScoreDiff: Use p.Won to identify winner instead of comparing with m.WinnerID
- isEvolutionBreakthrough: Find winner using p.Won before checking if evolved

This fixes the issue where 984/1000 prod matches had winner_id set but all participants showed won: false.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 17:59:02 -04:00
..
acb-api feat(api): implement POST /api/request-enrichment endpoint 2026-05-04 02:58:11 -04:00
acb-enrichment feat(acb-enrichment): implement AI replay enrichment service 2026-05-04 02:22:28 -04:00
acb-evolver Phase 10: Live evolution observatory - evolver live.json feed + observatory page 2026-05-08 14:52:17 -04:00
acb-index-builder Bug fix bf-3mx7: Fix match index winner badge - use p.Won instead of comparing BotID with WinnerID 2026-05-13 17:59:02 -04:00
acb-local feat(evolver): complete Phase 7 LLM-driven evolution implementation 2026-04-08 16:38:48 -04:00
acb-map-evolver test(acb-map-evolver): add comprehensive tests for weekly schedule 2026-05-08 09:32:51 -04:00
acb-mapgen Fix sin/cos math bug and add cellular automata map generation 2026-03-26 01:10:46 -04:00
acb-matchmaker feat(matchmaker): add best-of-5 weekly featured and best-of-7 championship series scheduling 2026-05-04 02:34:47 -04:00
acb-wasm feat(playlists): add playlist curation and rebuild logic per §10, with series/seasons/enrichment 2026-04-21 16:11:27 -04:00
acb-worker feat(worker): implement map engagement scoring per plan §14.6 2026-05-04 02:28:45 -04:00