jedarden
a22b0b6aa3
feat(enrichment): align config with other services for K8s deployment
...
- Update Config struct to use individual postgres connection components (ACB_POSTGRES_HOST, ACB_POSTGRES_PORT, etc.) instead of ACB_DATABASE_URL
- Add DatabaseURL() method to build connection string from components
- This matches the pattern used by acb-index-builder and other services
Closes: bf-1ghm
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 01:44:59 -04:00
jedarden
e88c108010
feat(acb-enrichment): implement AI replay enrichment service
...
Implements the acb-enrichment service (plan §13.3) that generates AI
commentary for featured matches.
Key features:
- LLM client (OpenAI/Anthropic API compatible)
- Replay fetch from B2/R2 storage
- Structured commentary output (key_moments array with turn,
description, significance, tags)
- Rate limiting to control LLM costs
- Match selection based on:
- Minimum turn count
- Win probability crossings
- Upset threshold
- Close finishes
Components:
- cmd/acb-enrichment/main.go - service entry point
- cmd/acb-enrichment/config.go - configuration from env vars
- cmd/acb-enrichment/service.go - orchestration logic
- internal/db/store.go - database access for match selection
- internal/llm/client.go - OpenAI-compatible LLM client
- internal/selector/selector.go - match selection with priority
- internal/generator/generator.go - commentary generation
- internal/storage/client.go - S3-compatible storage client
- Dockerfile - container image
- manifests/acb-enrichment-deployment.yml - K8s deployment
- metrics/metrics.go - Prometheus metrics for enrichment
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 02:22:28 -04:00