ai-code-battle/cmd/acb-worker
jedarden fb707b8461 test: integration tests for multi-match crash cooldown (3 strikes / 30 min) per §4.5 + §6.1
The crash cooldown system was already implemented across engine, worker,
and matchmaker. This adds comprehensive integration tests that verify:

- Single crash does not trigger cooldown
- Two crashes do not trigger cooldown
- Three consecutive crashes trigger 30-min cooldown
- Successful match resets strike counter
- Interleaved crash/success resets counter correctly
- Cooldown extends on repeated crashes while on cooldown
- Matchmaker eligibility query excludes bots on active cooldown
- Matchmaker eligibility query includes bots with expired cooldown
- Full end-to-end flow: 3 crashes → excluded → cooldown expires → re-pair

Tests use ACB_TEST_DATABASE_URL env var for PostgreSQL integration tests
and skip gracefully when not configured.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 15:14:03 -04:00
..
api.go Remove legacy code: worker-api/, cmd/acb-indexer/, cluster-configuration/, gut cmd/acb-api/ 2026-03-29 10:22:16 -04:00
b2.go feat(worker): gzip replay compression at upload per §7.1 2026-04-22 15:00:09 -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
db.go feat(predictions): resolve predictions on match completion, add API endpoints and frontend 2026-04-21 14:08:15 -04:00
Dockerfile fix: update Dockerfiles to golang:1.25-alpine (go.mod requires go 1.25.0) 2026-04-14 13:43:39 -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): gzip replay compression at upload per §7.1 2026-04-22 15:00:09 -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