Commit Graph
7 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
Test 90fcd6a9df feat(T1.8): implement health checks for Kubernetes deployment
- Add internal/health package with health checker
- Implement three endpoints: /health, /health/live, /health/ready
- /health returns full JSON report with component status, latency, timestamp
- /health/live for K8s liveness probe (service running)
- /health/ready for K8s readiness probe (ready to accept traffic)
- Temporal connectivity check via GetWorkflow call with timeout
- Health check caching (30s interval) to prevent excessive checks
- Graceful shutdown: health server stops on SIGINT/SIGTERM
- Add --health flag to starter command to run health check
- Worker runs health server on port 8081 alongside task queue worker
- 10/10 unit tests passing
- All verification criteria met

Closes T1.8
2026-08-23 16:31:33 -07:00
Story Crater Bot 3c54f07ebb fix(worker): register TestWorkflow for integration testing
ci / test (push) Failing after 35s
Adds TestWorkflow to worker's RegisterWorkflow list so integration tests
can execute test workflows against the Temporal cluster.
2026-08-22 10:30:30 -07:00
Story Crater Bot b3e865e96f feat(taskqueue): rename from 'default' to 'poimen-taskqueue'
ci / test (push) Successful in 49s
Updated all references to task queue:
- cmd/worker/main.go: NewWorker second param
- cmd/starter/main.go: ExecuteWorkflow StartWorkflowOptions + output display
2026-08-22 10:18:11 -07:00
Test 002fe98e17 feat(workflows): wire TaskUnit/Orchestrator activities, add k8s deploy manifests
ci / test (push) Failing after 5s
Implements real activity-calling logic in OrchestratorWorkflow and
TaskUnitWorkflow (previously stubs), adds GitDiffActivity, and expands
PlanningActivity's I/O to carry repo path and prior task results.

Adds k8s/ deployment manifests (worker Deployment, orchestrator Job,
Kustomize base) for the poimen-workflows Temporal worker, using a
dedicated Kubernetes namespace `poimen` and Temporal namespace
`poimen-harness` rather than sharing the Temporal server's own
`temporal`/`production` namespaces.
2026-08-21 21:57:01 -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