fix(ci): stop Go toolchain auto-download in the CI image #24

Merged
pti merged 1 commit from fix-go-toolchain-download into main 2026-07-08 11:31:43 +02:00
Owner

Why it happened

  • The CI image (packed from manifest.scm) contains Go 1.26.0manifest.scm pins Go by name only ("go"), so its version floats with whatever guix channel the runner packed on.
  • go.mod declared go 1.26.1 — an over-specific patch directive that nothing requires (cobra/yaml/xdg need far older Go; it was set at project init).
  • GOTOOLCHAIN=auto + image Go (1.26.0) < go.mod (1.26.1) → Go auto-downloaded the 1.26.1 toolchain at build time; that download broke gofmt/golangci-lint.
  • Invisible locally: dev hosts run a newer guix (Go 1.26.4 ≥ 1.26.1), so they never download.

Fix

  • go.modgo 1.26.0 (its true minimum; the image satisfies it).
  • GOTOOLCHAIN=local in both CI lint jobs (GitLab + Forgejo) — use the pinned image/manifest Go, never silently download; a real mismatch now fails loudly (signal to refresh the image) instead of a flaky download.

Verified

gofmt + go vet run clean inside the 1.26.0 CI image with no toolchain download. Local build/vet/golangci-lint clean; YAML valid.

Durable follow-up (not in this PR)

Pin the guix channel (channels.scm) shared by dev + the CI runner so "go" resolves identically everywhere — removes the version float at the source.

🤖 Generated with Claude Code

## Why it happened - The CI image (packed from `manifest.scm`) contains **Go 1.26.0** — `manifest.scm` pins Go by name only (`"go"`), so its version floats with whatever guix channel the runner packed on. - `go.mod` declared **`go 1.26.1`** — an over-specific *patch* directive that **nothing requires** (cobra/yaml/xdg need far older Go; it was set at project init). - `GOTOOLCHAIN=auto` + image Go (1.26.0) **< go.mod (1.26.1)** → Go **auto-downloaded** the 1.26.1 toolchain at build time; that download broke gofmt/golangci-lint. - Invisible locally: dev hosts run a newer guix (**Go 1.26.4 ≥ 1.26.1**), so they never download. ## Fix - `go.mod` → **`go 1.26.0`** (its true minimum; the image satisfies it). - **`GOTOOLCHAIN=local`** in both CI lint jobs (GitLab + Forgejo) — use the pinned image/manifest Go, never silently download; a real mismatch now **fails loudly** (signal to refresh the image) instead of a flaky download. ## Verified gofmt + go vet run clean **inside the 1.26.0 CI image** with no toolchain download. Local build/vet/golangci-lint clean; YAML valid. ## Durable follow-up (not in this PR) Pin the guix channel (`channels.scm`) shared by dev + the CI runner so `"go"` resolves identically everywhere — removes the version float at the source. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ci): stop Go toolchain auto-download in the CI image
All checks were successful
Lint / lint (pull_request) Successful in 1m15s
3a438271ca
The CI image (packed from manifest.scm on the guix runner) carries Go 1.26.0,
but go.mod declared `go 1.26.1` — an over-specific patch directive nothing needs
(cobra/yaml/xdg require far older Go). With GOTOOLCHAIN=auto the image's 1.26.0
auto-downloaded the 1.26.1 toolchain at build time, and that download broke
gofmt/golangci-lint in CI. It was invisible locally because dev hosts run a newer
guix (Go 1.26.4 >= 1.26.1).

Set go.mod to its true minimum (`go 1.26.0`), which the image satisfies, and set
GOTOOLCHAIN=local in both CI lint jobs so a version mismatch fails loudly (a
signal to refresh the image) instead of a flaky silent download.

Verified: gofmt/go vet run clean in the 1.26.0 CI image with no toolchain
download.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pti merged commit 30b3db1923 into main 2026-07-08 11:31:43 +02:00
pti deleted branch fix-go-toolchain-download 2026-07-08 11:31:44 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pti/wraptool!24
No description provided.