2.5 KiB
2.5 KiB
TASK: FINAL crush turn — harness runtime container + tool-widening (Redmine 521 + bootstrap)
Context
Charles 2026-08-29: "alpha asap, then kill the screen/crush stack; bootstrap the harness (docker container) FIRST." This is the LAST crush turn on the harness repo. After it: the loop runs containerized AND its turns can do build work — the self-hosted stack builds everything to beta/prod itself.
Part A — runtime container (bootstrap)
deploy/Dockerfile.runtime— FROM alpine (digest-pinned), copies the static release binary, dumb-init or tini entrypoint (or Go signal handling — SIGINT graceful stop already exists).deploy/compose.yaml— servicemopac-loop: image built from Dockerfile.runtime,restart: unless-stopped, env-file (0600) for HARNESS_REDMINE_KEY / HARNESS_LITELLM_KEY, bind mounts: repo reports/- state/ (persistent), harness.toml read-only. Healthcheck: loop
exposes nothing by default — add
--healthz-portflag or reuse events healthz; simplest: aloop --status-fileheartbeat the healthcheck reads (age < 3x poll interval).
- state/ (persistent), harness.toml read-only. Healthcheck: loop
exposes nothing by default — add
- Verify LIVE: compose up, confirm scan + at least one autonomous turn
(the alpha queue has open tasks),
docker inspectrestart policy, then leave the container RUNNING (it replaces the dev.sh screen). - Kill switch documented:
docker compose -f deploy/compose.yaml down.
Part B — tool-widening (ticket 521: loop turns do build work)
- File tools behind the existing gate discipline (deny-first, scoped to work_root, logged): read (offset/limit), exact-match edit, write (new files), ls/glob/grep. Same denial-count + feedback semantics as the bash tool.
- Bash gate: verify
./dev.sh {build,vet,test}andgit commit/pushpass the allow-list from work_root; extend the allow-list minimally if not (no broadening beyond dev.sh + git). - Per-turn wall-clock timeout (config
[loop] turn_timeout_secs, default 1800) — expired turn = partial REPORT + release. - Tests: file-tool gate denials, edit exact-match semantics, timeout expiry, and an end-to-end loop turn against the fake Redmine that edits a file + runs a no-op command + REPORTs.
Discipline
TDD red/green, docker dev builder only, atomic conventional commits, push origin main, NEVER broad pkill (docker stop by name is fine).
Deliverable
REPORT-20260829-1500-bootstrap.md in ~/.coordinate/inbox-pmo/:
container instructions (up/down/logs), healthcheck design, tool surface
added, test results, and confirmation the container processed a real
alpha task autonomously.