# foreman — progress ## Phase 1: Scaffold — 2026-05-23 - Go module initialized (`gitea.stevedudenhoeffer.com/steve/foreman`) - Project layout: `cmd/foreman/`, `internal/config/`, `internal/store/`, `internal/server/` - `internal/config`: loads all `FOREMAN_*` env vars with defaults and validation - `internal/store`: SQLite-backed durable queue (WAL mode, `modernc.org/sqlite`) - `jobs` table: ULID PK, model, payload, state machine, retry tracking, timestamps - `artifacts` table: named typed blobs per job, unique on (job_id, name) - Full CRUD: CreateJob, GetJob, UpdateJobState, ListJobs, CreateArtifact, GetArtifact, GetArtifactsByJob - `internal/server`: stdlib `net/http` server - `GET /healthz` returning `{"status":"ok","degraded":false}` - Optional bearer-token auth middleware (skips /healthz) - `cmd/foreman/main.go`: subcommand dispatch (serve + stubs for submit, jobs, ps) - CI: `.gitea/workflows/ci.yaml` (build, vet, test -race, tidy check) - Dockerfile: multi-stage distroless build - Config files: `.env.example`, `.gitignore` - Tests: config validation, store CRUD + edge cases, server health + auth middleware