Keep Go's build cache in check builds: re-vendor sneak/prompts e3f79c4 (closes #129) #193

Merged
clawbot merged 1 commits from issue-129-keep-go-build-cache into next 2026-10-15 19:58:39 +02:00
Collaborator

Re-vendors the canonical files from sneak/prompts e3f79c4 on next, carrying sneak's ruling on #129 that Go's compile cache may survive between check builds.

--no-cache also emptied Go's build cache mount, so every make test first compiled everything with -race. The four builds in script/ now pass a new CACHEBUST value instead. Every Dockerfile stage, runtime included, declares ARG CACHEBUST first, so every RUN step still reruns on an unchanged tree; a stage without it would be served from cache silently.

Go's build cache is mounted only on the steps that compile (go vet, golangci-lint run, go test, the build); both go test runs keep -count=1. As in the canonical Dockerfile, the mount has no id, so all builds on a host share it.

  • Judgement call: script/install-precommit and script/setup are now the canonical files exactly, and script/bootstrap, script/fmt and script/fmt-check add this repository's Go steps; old template comments are gone.
  • Deviation from AGENTS.md: .golangci.yml, which the plan on the issue lists, takes the canonical change turning off canonicalheader.
  • Target missed: two fresh-clone runs took about 23 s and 41 s for the test build. Compiling takes under a second; the rest is re-downloading Go modules and the internal/cli tests under -race, slower on a busy host. sneak's ruling covered Go's compile cache only, so keeping a module cache is not part of this change.

Model: opus-5-5

Re-vendors the canonical files from `sneak/prompts` `e3f79c4` on `next`, carrying sneak's ruling on https://git.eeqj.de/sneak/secret/issues/129 that Go's compile cache may survive between check builds. `--no-cache` also emptied Go's build cache mount, so every `make test` first compiled everything with `-race`. The four builds in `script/` now pass a new `CACHEBUST` value instead. Every `Dockerfile` stage, runtime included, declares `ARG CACHEBUST` first, so every `RUN` step still reruns on an unchanged tree; a stage without it would be served from cache silently. Go's build cache is mounted only on the steps that compile (`go vet`, `golangci-lint run`, `go test`, the build); both `go test` runs keep `-count=1`. As in the canonical `Dockerfile`, the mount has no id, so all builds on a host share it. - Judgement call: `script/install-precommit` and `script/setup` are now the canonical files exactly, and `script/bootstrap`, `script/fmt` and `script/fmt-check` add this repository's Go steps; old template comments are gone. - Deviation from `AGENTS.md`: `.golangci.yml`, which the plan on the issue lists, takes the canonical change turning off `canonicalheader`. - Target missed: two fresh-clone runs took about 23 s and 41 s for the test build. Compiling takes under a second; the rest is re-downloading Go modules and the `internal/cli` tests under `-race`, slower on a busy host. sneak's ruling covered Go's compile cache only, so keeping a module cache is not part of this change. Model: opus-5-5
clawbot added the needs-review label 2026-10-15 17:29:30 +02:00
clawbot self-assigned this 2026-10-15 17:29:30 +02:00
Author
Collaborator
  1. TODO.md conflicts with current next. The entries that commit 25f4652 (#173) added at the top of Completed Steps overlap this PR's entry, so the branch no longer merges. Acceptable: the branch rebased onto current next, with this PR's entry first in Completed Steps and every entry from next kept.

  2. script/install-precommit and script/setup still differ from sneak/prompts e3f79c4 because of comments left over from an older template. The first has "Generic: needs no adaptation."; the second has "(script/bootstrap)" and "Add any repo-specific initialization (db init, .env template) here." Neither file holds anything this repository added itself, and this PR removed the same kind of comment from script/bootstrap. Acceptable: both files byte-identical to e3f79c4.

  3. The PR body is about 320 words, over the limit of about 250. Acceptable: about 250 words at most. For example, drop the paragraph that lists the other canonical changes, since the commit message and TODO.md already list them.

Model: opus-5-5

1. `TODO.md` conflicts with current `next`. The entries that commit `25f4652` (https://git.eeqj.de/sneak/secret/issues/173) added at the top of Completed Steps overlap this PR's entry, so the branch no longer merges. Acceptable: the branch rebased onto current `next`, with this PR's entry first in Completed Steps and every entry from `next` kept. 2. `script/install-precommit` and `script/setup` still differ from `sneak/prompts` `e3f79c4` because of comments left over from an older template. The first has "Generic: needs no adaptation."; the second has "(script/bootstrap)" and "Add any repo-specific initialization (db init, .env template) here." Neither file holds anything this repository added itself, and this PR removed the same kind of comment from `script/bootstrap`. Acceptable: both files byte-identical to `e3f79c4`. 3. The PR body is about 320 words, over the limit of about 250. Acceptable: about 250 words at most. For example, drop the paragraph that lists the other canonical changes, since the commit message and `TODO.md` already list them. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-15 18:17:01 +02:00
clawbot force-pushed issue-129-keep-go-build-cache from a530061843 to 746a433ef3 2026-10-15 18:33:45 +02:00 Compare
Author
Collaborator

Rework for #193 (comment):

  1. Rebased onto current next; this PR's entry is first in Completed Steps, followed by every entry from next.
  2. script/install-precommit and script/setup are now byte-identical to sneak/prompts e3f79c4.
  3. PR body cut to about 250 words: the paragraph on the other canonical changes is gone, every disclosure line stays, and "Target missed" now says sneak's ruling covered Go's compile cache only, so keeping a module cache is not part of this change.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/secret/pulls/193#issuecomment-143287: 1. Rebased onto current `next`; this PR's entry is first in Completed Steps, followed by every entry from `next`. 2. `script/install-precommit` and `script/setup` are now byte-identical to `sneak/prompts` `e3f79c4`. 3. PR body cut to about 250 words: the paragraph on the other canonical changes is gone, every disclosure line stays, and "Target missed" now says sneak's ruling covered Go's compile cache only, so keeping a module cache is not part of this change. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-15 18:34:02 +02:00
clawbot added needs-rebase and removed needs-review labels 2026-10-15 19:25:38 +02:00
clawbot added 1 commit 2026-10-15 19:35:12 +02:00
The vendored files are copies from sneak/prompts e3f79c4, with this
repository's own entries kept. The script/ builds pass a new CACHEBUST
value instead of --no-cache, which emptied Go's build cache mount, so
every make test compiled the standard library and every dependency with
-race. Every Dockerfile stage declares ARG CACHEBUST first, so every RUN
step still reruns on an unchanged tree. The steps that compile mount
Go's build cache, and both go test runs keep -count=1. The lint and test
builds write no image. script/bootstrap, script/fmt and script/fmt-check
are the canonical files plus this repository's Go steps.

Model: opus-5-5
clawbot force-pushed issue-129-keep-go-build-cache from 746a433ef3 to c9bafb962d 2026-10-15 19:35:12 +02:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-10-15 19:35:18 +02:00
Author
Collaborator

Review passed: ready to merge into next.

Model: opus-5-5

Review passed: ready to merge into `next`. Model: opus-5-5
clawbot merged commit 26a4739615 into next 2026-10-15 19:58:39 +02:00
clawbot deleted branch issue-129-keep-go-build-cache 2026-10-15 19:58:39 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/secret#193