Commit Graph
6 Commits
Author SHA1 Message Date
Test 59a1eeed85 feat(T1.2): implement structured logging and Prometheus metrics
- Add internal/logging package with zap-based structured JSON logging
- Support development (colored) and production (JSON) modes via ENVIRONMENT env var
- Add logging helpers: Info(), Error(), Warn(), Debug(), Fatal()
- Add field helpers: String(), Int(), Int64(), Err()
- Add internal/metrics package with 16 comprehensive Prometheus metrics
- Track workflows: starts, completions, duration by type/status
- Track activities: starts, completions, duration, retries by type
- Track LLM calls: total calls and latency by model
- Track git operations: total and duration by operation type
- Track judge decisions: decisions by type
- Track Temporal errors: connection errors by type
- Track cache efficiency: hits and misses by cache type
- Track tasks in progress: gauge metric by task type
- Metrics exported on /metrics endpoint (Prometheus text format)
- Integrate structured logging in cmd/worker and cmd/starter
- Replace all log.Printf/log.Fatalf with structured logging
- Add /metrics endpoint to health check server
- 8/8 logging tests passing, 13/13 metrics tests passing
- All verification criteria met

Dependencies added:
- go.uber.org/zap v1.28.0 (structured logging)
- github.com/prometheus/client_golang v1.24.1 (metrics export)

Closes T1.2
2026-08-23 16:33:49 -07:00
Story Crater Bot ac382af545 fix(deploy): use golang:latest to satisfy Go 1.25.4 requirement
ci / test (push) Successful in 44s
Dependencies require go >= 1.25.4. Alpine golang:1.22-alpine doesn't have it.
Use golang:latest which should have Go 1.25+ available. Re-enable orchestrator job.
2026-08-22 06:02:55 -07:00
Story Crater Bot f062f087c1 fix(build): require go 1.22 instead of non-existent go 1.25.4
ci / test (push) Successful in 45s
golang:1.23-alpine doesn't exist yet. Revert to golang:1.22-alpine
and update go.mod to require go 1.22, which matches the available image.
2026-08-22 06:02:03 -07:00
Story Crater Bot 93226d69fa fix(build): update Go version requirement to 1.23
ci / test (push) Successful in 45s
go.mod required go >= 1.25.4 but golang:1.25-alpine doesn't exist yet.
Downgrade to go 1.23 which is available in Alpine images and sufficient
for the codebase. Update both deployment and job images to golang:1.23-alpine.
2026-08-22 05:59:33 -07:00
Test 5b8d3df01e (workflow) add simple harness workflow for manual testing 2026-08-21 18:07:12 -07:00
Test 769e56d33d Add new file 2026-08-21 15:58:46 -07:00