ai-code-battle/cmd/acb-worker
jedarden 467b7b67ea feat(worker): add rating recovery CLI mode (-mode=recalc-ratings)
Implements the rating recovery procedure specified in plan §12.3.
Running 'go run ./cmd/acb-worker -mode=recalc-ratings' will:
1. Reset all bot ratings to Glicko-2 defaults (mu=1500, phi=350, sigma=0.06)
2. Fetch all completed matches from the database in chronological order
3. Replay each match to recompute Glicko-2 ratings from scratch
4. Update the bots table with the recalculated ratings

This is needed for disaster recovery when ratings are corrupted or lost.

Database functions added:
- ResetAllRatings: resets all bot ratings to defaults
- GetAllCompletedMatches: fetches completed matches chronologically with participants
- UpdateAllRatings: bulk updates all bot ratings in a single transaction

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 00:41:10 -04:00
..
api.go feat(combat): rank matches by enemy-kill combat turns 2026-05-03 18:32:08 -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 feat(worker): add rating recovery CLI mode (-mode=recalc-ratings) 2026-05-04 00:41:10 -04:00
Dockerfile fix(docker): add COPY metrics/ to all service Dockerfiles 2026-04-23 18:00:16 -04:00
glicko2.go Remove legacy code: worker-api/, cmd/acb-indexer/, cluster-configuration/, gut cmd/acb-api/ 2026-03-29 10:22:16 -04:00
main.go feat(worker): add rating recovery CLI mode (-mode=recalc-ratings) 2026-05-04 00:41:10 -04:00
metrics.go Add Prometheus metrics endpoint to match worker 2026-03-26 00:50:10 -04:00
metrics_test.go Add Prometheus metrics endpoint to match worker 2026-03-26 00:50:10 -04:00