1 Commits
Author SHA1 Message Date
sneak ca36d0372c Check builds use Docker's normal cache (closes #177)
check / check (push) Successful in 1m33s
Drop the CACHEBUST build argument from script/lint, script/test,
script/docker, script/cibuild and every Dockerfile stage. REPO_POLICIES
now says check builds use Docker's normal cache: an unchanged tree reuses
each step's stored result, which Docker keeps only for steps that
succeeded. The rules on placing ARG CACHEBUST, re-vendoring it in one
commit and planting a defect to prove a changed check are gone. The
README, the Go style guide and both checklists restated those rules and
are updated to match.

Model: opus-5-5
2026-11-16 21:17:42 +00:00
2 changed files with 10 additions and 16 deletions

No files matched your search

+3 -3
View File
@@ -49,9 +49,9 @@ with your task.
`--target` names it, so a lost `COPY --from=` edge leaves `docker build .` `--target` names it, so a lost `COPY --from=` edge leaves `docker build .`
passing while the gate never runs. Confirm by planting a violation, not by passing while the gate never runs. Confirm by planting a violation, not by
reading the file. reading the file.
- [ ] No `docker build` in `script/` passes `--no-cache` or a cache-busting - [ ] Check builds use Docker's normal cache: no `docker build` in `script/`
build argument such as `CACHEBUST`, and no `Dockerfile` stage declares passes a build argument whose only job is to make steps run again, and no
`ARG CACHEBUST`. `Dockerfile` stage declares one.
- [ ] Go: each Go stage downloads the modules (`COPY go.mod go.sum ./`, - [ ] Go: each Go stage downloads the modules (`COPY go.mod go.sum ./`,
`RUN go mod download`) before `COPY . .`; the steps that compile `RUN go mod download`) before `COPY . .`; the steps that compile
(`golangci-lint run`, `go test`, `go build`) mount Go's build cache (`golangci-lint run`, `go test`, `go build`) mount Go's build cache
+7 -13
View File
@@ -243,9 +243,10 @@ style conventions are in separate documents:
The development environment stage installs development prerequisites by The development environment stage installs development prerequisites by
running `script/bootstrap`. Only system packages may be installed inline running `script/bootstrap`. Only system packages may be installed inline
above it, so that check builds keep them; the `prompts` repo's own above it, so that a change to `script/` does not install them again; the
`Dockerfile` does this. A stage that runs `script/bootstrap` COPYs `script/` `prompts` repo's own `Dockerfile` does this. A stage that runs
and the dependency manifests it needs before running it. These are examples: `script/bootstrap` COPYs `script/` and the dependency manifests it needs
before running it. These are examples:
- `package.json`, `yarn.lock`, `.yarnrc.yml` and `.yarn/releases/` - `package.json`, `yarn.lock`, `.yarnrc.yml` and `.yarn/releases/`
- `go.mod` and `go.sum` - `go.mod` and `go.sum`
@@ -304,15 +305,8 @@ style conventions are in separate documents:
- its own line or a line above it - its own line or a line above it
- the files copied before it - the files copied before it
Nothing needs to run again on an unchanged tree. Never prune the build cache Never prune the build cache (`docker builder prune` and the like): it is
(`docker builder prune` and the like): it is shared with every other build shared with every other build on the host.
on the host. When a check is added or changed, prove it works:
- plant a defect it must catch
- watch the run fail on it
- revert the defect
A green run alone shows neither that the check ran nor that it covers what
it should.
- **The gate phases are separate stages, and the build stage depends on both.** - **The gate phases are separate stages, and the build stage depends on both.**
The lint phase is based on the `golangci/golangci-lint` image (pinned by The lint phase is based on the `golangci/golangci-lint` image (pinned by
@@ -497,7 +491,7 @@ style conventions are in separate documents:
already do. already do.
- **A Python `test` phase that installs its packages from `Pipfile.lock` does it - **A Python `test` phase that installs its packages from `Pipfile.lock` does it
before `COPY . .`, so check builds keep them.** The steps are: before `COPY . .`, so a change to the code keeps them.** The steps are:
- `COPY script/ script/` - `COPY script/ script/`
- `COPY Pipfile Pipfile.lock ./` - `COPY Pipfile Pipfile.lock ./`
- `RUN script/bootstrap` - `RUN script/bootstrap`