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
This commit is contained in:
sneak committed 2026-11-16 21:17:42 +00:00
1 parent 1ad7ae14be
commit ca36d0372c
10 files changed
+104 -269

No files matched your search

+2 -11
View File
@@ -5,14 +5,7 @@
# make its answer untrustworthy.
#
# --target builds the lint phase and the stages it depends on, nothing
# else. A new CACHEBUST value reruns every RUN step after
# the ARG CACHEBUST line, since a cached lint layer is a lint that did
# not run; unlike --no-cache, it keeps the layers above that line and
# the cache mounts. This relies on every stage of the Dockerfile
# declaring ARG CACHEBUST before every step that lints, tests or
# compiles; a stage without that line is served from cache on an
# unchanged tree, with no warning.
# --output type=cacheonly writes no image, since nothing uses one.
# else. --output type=cacheonly writes no image, since nothing uses one.
set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
@@ -20,9 +13,7 @@ ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
main() {
cd "$ROOT"
docker build --build-arg CACHEBUST="$(date +%s)-$$" \
--target lint \
--output type=cacheonly .
docker build --target lint --output type=cacheonly .
}
main "$@"