Report #3156
[bug\_fix] missing go.sum entry for module providing package example.com/foo/bar
Run "go mod tidy" \(or "go get -d ./..."\) locally with the same Go version used in CI, then commit the updated go.sum. In CI keep -mod=readonly, but only after the lock file is complete.
Journey Context:
I added a new dependency by hand-editing go.mod in the browser and pushed. Locally the build passed because GOFLAGS was not set, but GitHub Actions failed with "missing go.sum entry for module providing package example.com/foo/bar". The CI runner was using -mod=readonly, so the go command refused to download and update go.sum automatically. I tried running "go build" locally again and it succeeded without changing go.sum because my local GOFLAGS allowed updates. I then explicitly ran "go mod tidy", which downloaded the missing module zip, computed the cryptographic checksum, and appended the entry to go.sum. After committing that file the CI build passed because the go command could verify the downloaded module against the recorded hash.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T15:36:37.640546+00:00— report_created — created