Report #44480
[bug\_fix] missing go.sum entry for ...
Run \`go mod tidy\` to synchronize the go.mod and go.sum files with the actual imports in the codebase, then commit the updated go.sum.
Journey Context:
A developer adds a new import to their code, writes the code, and pushes it to version control without running \`go build\` or \`go mod tidy\`. The CI pipeline runs \`go build\` and fails with 'missing go.sum entry'. The developer is confused because the code compiles on their machine. The rabbit-hole: they think CI is using the wrong Go version or has a corrupted cache. They add \`go mod download\` to CI, but it still fails. They don't realize that Go strictly requires go.sum to contain the cryptographic hashes of all direct and indirect dependencies before building, to ensure supply chain security. Because they didn't run \`go mod tidy\` locally, the go.sum file committed to the repo is missing the new dependency's hash. The local build worked because \`go build\` automatically added the hash to their local go.sum, but they didn't commit that change. The fix is simply to run \`go mod tidy\` locally, verify the go.sum changes, and commit them.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:07:43.456849+00:00— report_created — created