1 Commits
Author SHA1 Message Date
clawbot 964d973e3c Check builds use Docker's normal cache (closes #177)
check / check (push) Successful in 12s
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 and re-vendoring it in one
commit are gone; the rule that a planted defect proves a new or changed
check stays. The README, the Go style guide and both checklists restated
the cache-busting rules and are updated to match. The existing-repo
checklist asks that no script pass --no-cache or CACHEBUST.

Model: opus-5-5
2026-11-16 23:09:07 +01:00
2 changed files with 16 additions and 10 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 .`
passing while the gate never runs. Confirm by planting a violation, not by
reading the file.
- [ ] Check builds use Docker's normal cache: no `docker build` in `script/`
passes a build argument whose only job is to make steps run again, and no
`Dockerfile` stage declares one.
- [ ] No `docker build` in `script/` passes `--no-cache` or a cache-busting
build argument such as `CACHEBUST`, and no `Dockerfile` stage declares
`ARG CACHEBUST`.
- [ ] Go: each Go stage downloads the modules (`COPY go.mod go.sum ./`,
`RUN go mod download`) before `COPY . .`; the steps that compile
(`golangci-lint run`, `go test`, `go build`) mount Go's build cache
+13 -7
View File
@@ -243,10 +243,9 @@ style conventions are in separate documents:
The development environment stage installs development prerequisites by
running `script/bootstrap`. Only system packages may be installed inline
above it, so that a change to `script/` does not install them again; the
`prompts` repo's own `Dockerfile` does this. A stage that runs
`script/bootstrap` COPYs `script/` and the dependency manifests it needs
before running it. These are examples:
above it, so that check builds keep them; the `prompts` repo's own
`Dockerfile` does this. A stage that runs `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/`
- `go.mod` and `go.sum`
@@ -305,8 +304,15 @@ style conventions are in separate documents:
- its own line or a line above it
- the files copied before it
Never prune the build cache (`docker builder prune` and the like): it is
shared with every other build on the host.
Nothing needs to run again on an unchanged tree. Never prune the build cache
(`docker builder prune` and the like): it is shared with every other build
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 lint phase is based on the `golangci/golangci-lint` image (pinned by
@@ -491,7 +497,7 @@ style conventions are in separate documents:
already do.
- **A Python `test` phase that installs its packages from `Pipfile.lock` does it
before `COPY . .`, so a change to the code keeps them.** The steps are:
before `COPY . .`, so check builds keep them.** The steps are:
- `COPY script/ script/`
- `COPY Pipfile Pipfile.lock ./`
- `RUN script/bootstrap`