Keep Go's build cache in check builds (closes #113) #129

Merged
clawbot merged 4 commits from issue-113-keep-go-build-cache into next 2026-10-15 16:50:31 +02:00
4 Commits
Author SHA1 Message Date
sneak d19b604797 Give a reason that holds for not keeping the module cache
check / check (push) Canceled after 0s
Go builds from whatever files a kept module cache holds without
checking them again, so a changed file would go unnoticed; skipping a
download skipped no check and was no reason.

Model: opus-5-5
2026-10-15 14:22:46 +00:00
sneak ae3bef5362 Drop the wrong go.sum reason for not keeping the module cache
check / check (push) Canceled after 0s
The key point under the canonical Go Dockerfile said a kept module
cache would skip checking modules against go.sum. Go checks every
module it takes from the module cache against go.sum, so a kept
module cache skips only the download. The sentence now says that.

Model: opus-5-5
2026-10-15 12:59:47 +00:00
sneak 236d30bb3c Correct the build cache wording after review
check / check (push) Canceled after 0s
REPO_POLICIES.md no longer says a Go test phase's image holds every
compiled package; with Go's build cache mounted, those stay in the
mount. The comments in script/lint, script/test, script/cibuild and
script/docker now say that a new CACHEBUST value reruns the RUN steps
only because every stage of the Dockerfile declares ARG CACHEBUST
first, and that a stage without the line is served from cache with no
warning. NEW_REPO_CHECKLIST.md tells a new repository to add the
scripts and every stage's ARG CACHEBUST line in the same commit, in
place of re-vendoring them.

Model: opus-5-5
2026-10-15 11:56:16 +00:00
sneak 9bd1f006f4 Keep Go's build cache in check builds (closes #113)
check / check (push) Canceled after 0s
script/lint, script/test, script/cibuild and script/docker pass a new
CACHEBUST build argument on every build in place of --no-cache, which
empties every cache mount. Every Dockerfile stage declares ARG
CACHEBUST first, so every RUN step still runs on every check build.
The canonical Go Dockerfile mounts Go's build cache on the steps that
compile and runs both go test runs with -count=1, so no test result is
reused. REPO_POLICIES.md, both checklists, the Go styleguide and the
README say so. A stage without the ARG line is served from cache, so a
repository re-vendors the scripts and the ARG lines in one commit.

Model: opus-5-5
2026-10-15 09:09:17 +00:00