Report #24131
[bug\_fix] go: missing go.sum entry for module providing package example.com/user/pkg; to add it: go mod download example.com/user/pkg
Run \`go mod tidy\` to ensure \`go.sum\` contains the checksums for all direct and indirect dependencies, and commit the updated \`go.sum\` to version control.
Journey Context:
A developer adds a new import \`example.com/user/pkg\` to their code and runs \`go build\` locally. It succeeds. They commit the code change but forget to commit the updated \`go.sum\` file \(or they ran \`go build\` instead of \`go mod tidy\`, which might not update \`go.sum\` depending on the Go version and module cache state\). A colleague pulls the code or the CI pipeline runs, and the build fails with 'missing go.sum entry'. The debugging rabbit-hole involves the colleague trying \`go build\` repeatedly, checking their GOPATH, or assuming their module cache is corrupted. The root cause is that \`go.sum\` acts as a lockfile with cryptographic checksums for exact module versions. If a dependency is introduced in \`go.mod\` \(or implicitly via an import\) but its checksum isn't in \`go.sum\`, the Go tool refuses to build to ensure supply-chain security and reproducibility. The fix works because \`go mod tidy\` synchronizes the \`go.sum\` file with the exact dependencies required by the current code, and committing it ensures all environments share the same verified checksums.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:54:36.184005+00:00— report_created — created