ai-code-battle/cmd/acb-worker
jedarden 41d868b5c1 feat(engine): add pre-generated map loading from map library
Per plan §3.8, maps should be generated offline and stored in the map
library, not generated on-the-fly during matches. This commit adds
support for loading pre-generated maps from the database.

Changes:
- Add PreGeneratedMap type and WithMap option to MatchRunner
- Add loadPreGeneratedMap() to parse map JSON (walls, cores)
- Update worker to pass loaded map data to MatchRunner via WithMap
- Fallback to on-the-fly generation if map data is invalid
- Update acb-mapgen spawn radius to 25% for 2-player (aligns with match.go)
- Update test to verify cores are outside final zone radius

This enables the map library infrastructure (maps/, acb-mapgen, index
builder) to be used in production matches instead of being ignored.

Closes: bf-5m29

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 14:14:27 -04:00
..
api.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
b2.go fix(worker): disable SDK checksum trailer for R2 uploads 2026-04-30 10:35:00 -04:00
crash_test.go test: integration tests for multi-match crash cooldown (3 strikes / 30 min) per §4.5 + §6.1 2026-04-22 15:14:03 -04:00
crypto.go fix: accept base64-encoded AES keys (OpenBao stores keys as base64, not hex) 2026-04-30 23:04:29 -04:00
db.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
Dockerfile fix(docker): add COPY metrics/ to all service Dockerfiles 2026-04-23 18:00:16 -04:00
glicko2.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
main.go feat(engine): add pre-generated map loading from map library 2026-05-25 14:14:27 -04:00
metrics.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
metrics_test.go Add Prometheus metrics endpoint to match worker 2026-03-26 00:50:10 -04:00