ai-code-battle/cmd/acb-api
jedarden 5669688984 Add validation pipeline, sandbox, and evolution DB layer (Phase 7)
Three-stage fail-fast validator for LLM-generated bot candidates:
- syntax.go: language-aware parse (go/parser for Go; py_compile, rustfmt,
  tsc, javac, php -l for others; brace-balance fallback)
- schema.go: regex detection of /health + /turn endpoints and "moves" field
- sandbox.go: nsjail-isolated smoke test — builds bot, polls /health, sends
  5 signed /turn requests, verifies JSON moves responses
- validator.go: orchestrates stages with fail-fast short-circuit

DB layer:
- programs table + CRUD (create, get, list, updateFitness, setPromoted)
- validation_log table with RecordValidation, IslandPassRates,
  IslandValidationStats for per-island pass-rate tracking
- seed.go: 6 generation-0 bots across alpha/beta/gamma/delta islands

MAP-Elites grid (mapelites/grid.go): 2-D behavior grid on aggression×economy
axes; TryPlace keeps the fittest occupant per niche.

acb-evolver CLI gains two new subcommands:
  validate <file> -lang <lang> [-island <island>] [-nsjail] [-nolog]
  validation-stats (tabular per-island pass-rate breakdown)

cmd/acb-api/db.go: add programs table to API schema so the API can query
promoted evolved bots.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:45:13 -04:00
..
alerts.go Add Discord/Slack alerting webhooks to Go API server 2026-03-26 01:32:47 -04:00
alerts_test.go Add Discord/Slack alerting webhooks to Go API server 2026-03-26 01:32:47 -04:00
config.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
config_test.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
crypto.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
crypto_test.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
db.go Add validation pipeline, sandbox, and evolution DB layer (Phase 7) 2026-03-26 22:45:13 -04:00
Dockerfile Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
glicko2.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
glicko2_test.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
health.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
jobs.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
main.go Add Discord/Slack alerting webhooks to Go API server 2026-03-26 01:32:47 -04:00
register.go Add Go API server (cmd/acb-api) with PostgreSQL, Valkey, and Glicko-2 2026-03-26 01:21:48 -04:00
server.go Add Discord/Slack alerting webhooks to Go API server 2026-03-26 01:32:47 -04:00
server_test.go Add Discord/Slack alerting webhooks to Go API server 2026-03-26 01:32:47 -04:00
tickers.go Add Discord/Slack alerting webhooks to Go API server 2026-03-26 01:32:47 -04:00