Gate the build on Docker lint and test phases (closes #40, closes #30)
Some checks failed
check / check (push) Failing after 15s
Some checks failed
check / check (push) Failing after 15s
Per the owner ruling on issue 40, linting and testing are phases of the main Dockerfile rather than a separate lint file. script/lint and script/test each build one phase by name with caching disabled, and the final stage copies a harmless file from each so the image cannot be built unless both passed — the ordering trick already in template-app-go's Dockerfile, extended to the test phase. A phase that is not the last stage is built only when something depends on it or --target names it, so the gates are always invoked by name and the edges are kept. Every build in script/ is tagged. No config verify step; fmt stays on the host. This closes issue 30 too: a container has its own result cache and lock. Model: opus-5
This commit is contained in:
8
TODO.md
8
TODO.md
@@ -21,6 +21,14 @@ fmt-check, and commit.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-09-08: Moved linting and testing into Docker as phases of the main
|
||||
`Dockerfile`, per the owner ruling on issue 40. `script/lint` and
|
||||
`script/test` build one phase each by name with `--no-cache` — the same answer
|
||||
issue 26 got, so no separate cache-busting mechanism survives — and the final
|
||||
stage copies a harmless file from both, so the image cannot be built unless
|
||||
they pass. This also closes issue 30: a container has its own result cache and
|
||||
its own lock, so a lint verdict can no longer belong to another checkout. No
|
||||
separate lint Dockerfile, and no `golangci-lint config verify` step.
|
||||
- 2026-09-08: Kept in-repo agent scratch out of the Docker build context and out
|
||||
of version control: `.claude/` is one full checkout of the repo per in-flight
|
||||
agent, and under `COPY . .` all of it was reaching the image. Also closed the
|
||||
|
||||
Reference in New Issue
Block a user