task fmt cannot satisfy the gate's bundled gofumpt #1296

Closed
opened 2026-10-27 13:39:49 +00:00 by sam · 0 comments
Owner

Tooling drift found while gating the per-run task detail change.

The installed gofumpt v0.7.0 does NOT rewrite the redundant parens in any((Trees)(nil)).(changeStatsReader); golangci-lint 2.13.2 ships its own newer gofumpt that DOES. So task fmt (gofumpt -w .) can never converge golangci-lint's gofumpt formatter check, and task check fails at the lint step with a diff that re-running task fmt never applies.

Proof, both run against the same unmodified file:
gofumpt -l internal/domain/workflow/changes_test.go -> empty
golangci-lint fmt --diff internal/domain/workflow/changes_test.go

  • if _, ok := any((Trees)(nil)).(changeStatsReader); ok {
  • if _, ok := any(Trees(nil)).(changeStatsReader); ok {

Impact: any contributor whose code contains a construct the two versions disagree on sees a permanently red gate that no local formatting can fix. Worked around in commit d31c2796 by adopting golangci-lint's output (paren-only, no semantic change); gofumpt -l is now empty under both versions.

Fix options: pin gofumpt to the version golangci-lint bundles, or remove the gofumpt formatter from .golangci.yml so the Taskfile's gofumpt owns formatting.

Close reason

Not a formatting bug -- toolchain drift. The gate has two formatter owners: task fmt uses the standalone gofumpt, task lint re-checks with the gofumpt golangci-lint vendors, and task check never diffs the tree in between. Three surfaces had three different pairs: local gofumpt v0.7.0 vs golangci-lint 2.13.2 (vendors v0.11.0); the agent image pinned golangci-lint 2.12.2 (vendors v0.9.2) next to gofumpt v0.11.0; CI installed gofumpt@latest. Proven boundary: gofumpt <= v0.9.2 keeps any((Trees)(nil))'s redundant parens, >= v0.10.0 removes them. Fixed at the producer in 64aeb6c8 (Dockerfile: golangci-lint 2.13.2 so its vendored gofumpt equals the pinned GOFUMPT_VERSION, plus a build-time check that fails if the pins diverge; deploy.yml: gofumpt@v0.11.0 not @latest; invariant recorded in CLAUDE.md and the build-and-env skill). Environments aligned: gofumpt v0.11.0 installed here and on carina (was v0.7.0 / v0.10.0), carina's checkout fast-forwarded to 68bbb49. Verified: task check exit 0 here; golangci-lint run ./... 0 issues and gofumpt -l . empty on carina. Residual gap, not fixed: CI's quality gate never runs golangci-lint, so it cannot catch this class of drift.


Imported from beads archie-core-ebzk · GitHub #866 · type task · priority P2 · created 2026-09-18 · closed 2026-09-19

Tooling drift found while gating the per-run task detail change. The installed gofumpt v0.7.0 does NOT rewrite the redundant parens in any((Trees)(nil)).(changeStatsReader); golangci-lint 2.13.2 ships its own newer gofumpt that DOES. So task fmt (gofumpt -w .) can never converge golangci-lint's gofumpt formatter check, and task check fails at the lint step with a diff that re-running task fmt never applies. Proof, both run against the same unmodified file: gofumpt -l internal/domain/workflow/changes_test.go -> empty golangci-lint fmt --diff internal/domain/workflow/changes_test.go - if _, ok := any((Trees)(nil)).(changeStatsReader); ok { + if _, ok := any(Trees(nil)).(changeStatsReader); ok { Impact: any contributor whose code contains a construct the two versions disagree on sees a permanently red gate that no local formatting can fix. Worked around in commit d31c2796 by adopting golangci-lint's output (paren-only, no semantic change); gofumpt -l is now empty under both versions. Fix options: pin gofumpt to the version golangci-lint bundles, or remove the gofumpt formatter from .golangci.yml so the Taskfile's gofumpt owns formatting. ### Close reason Not a formatting bug -- toolchain drift. The gate has two formatter owners: task fmt uses the standalone gofumpt, task lint re-checks with the gofumpt golangci-lint vendors, and task check never diffs the tree in between. Three surfaces had three different pairs: local gofumpt v0.7.0 vs golangci-lint 2.13.2 (vendors v0.11.0); the agent image pinned golangci-lint 2.12.2 (vendors v0.9.2) next to gofumpt v0.11.0; CI installed gofumpt@latest. Proven boundary: gofumpt <= v0.9.2 keeps any((Trees)(nil))'s redundant parens, >= v0.10.0 removes them. Fixed at the producer in 64aeb6c8 (Dockerfile: golangci-lint 2.13.2 so its vendored gofumpt equals the pinned GOFUMPT_VERSION, plus a build-time check that fails if the pins diverge; deploy.yml: gofumpt@v0.11.0 not @latest; invariant recorded in CLAUDE.md and the build-and-env skill). Environments aligned: gofumpt v0.11.0 installed here and on carina (was v0.7.0 / v0.10.0), carina's checkout fast-forwarded to 68bbb49. Verified: task check exit 0 here; golangci-lint run ./... 0 issues and gofumpt -l . empty on carina. Residual gap, not fixed: CI's quality gate never runs golangci-lint, so it cannot catch this class of drift. --- _Imported from beads `archie-core-ebzk` · GitHub #866 · type task · priority P2 · created 2026-09-18 · closed 2026-09-19_
sam added the mediumtask labels 2026-10-27 13:39:49 +00:00
sam self-assigned this 2026-10-27 13:39:49 +00:00
sam closed this issue 2026-10-27 13:39:49 +00:00
sam added a new dependency 2026-10-27 13:42:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1296