fix(build): pin gofumpt and golangci-lint as one matched pair

`task fmt` formats with the standalone gofumpt and `task lint` re-checks that
formatting with the gofumpt golangci-lint vendors. `task check` runs `fmt`
then `lint` without diffing the tree, so `lint` is the only hard failure for
formatting -- and when the two versions differ, any construct they disagree on
makes the gate unsatisfiable: the standalone formatter rewrites a file one way
and lint rejects it, with nothing a contributor can run to satisfy both.

The surfaces had drifted onto three different pairs. This machine ran gofumpt
v0.7.0 against golangci-lint 2.13.2 (vendors v0.11.0), the image pinned
golangci-lint 2.12.2 (vendors v0.9.2) next to gofumpt v0.11.0, and CI
installed gofumpt@latest. `any((Trees)(nil))` in changes_test.go is the
construct that surfaced it: gofumpt <= v0.9.2 keeps the redundant parens,
>= v0.10.0 removes them.

- Dockerfile: golangci-lint 2.13.2, whose vendored gofumpt v0.11.0 now equals
  the pinned GOFUMPT_VERSION, so the image's two formatters agree.
- Dockerfile: fail the build if the pins ever diverge, rather than ship an
  image whose gate cannot pass.
- deploy.yml: gofumpt@v0.11.0 instead of @latest, which drifts ahead of
  whatever golangci-lint vendors.
- Record the invariant where an agent will meet it: AGENTS.md (CLAUDE.md) and
  the build-and-env skill, whose snapshots now name the pinned pair instead of
  calling both unpinned.
This commit is contained in:
sam committed 2026-09-19 18:52:10 +10:00
1 parent b6d0c1857d
commit 4b51722440
4 files changed
+39 -7

No files matched your search

+5 -1
View File
@@ -64,8 +64,12 @@ jobs:
with:
node-version: "22"
# Pinned, not @latest: this gate rewrites formatting with the standalone
# gofumpt, and the agent image that gates PRs re-checks it with the
# gofumpt bundled in its golangci-lint. Those two versions must agree
# (see Dockerfile), or a PR passes here and fails there unfixably.
- name: Install gofumpt
run: go install mvdan.cc/gofumpt@latest
run: go install mvdan.cc/gofumpt@v0.11.0
- name: Install protobuf tools
run: bash tools/proto.sh install