Report #49992
[bug\_fix] missing go.sum entry for module providing package ...
Run \`go mod tidy\` to ensure go.sum contains the cryptographic hashes for all direct and indirect dependencies, then commit the updated go.sum to version control.
Journey Context:
A developer adds a new import to their code and pushes it to CI. The CI pipeline runs \`go build\` but fails with a missing go.sum entry error. The developer might try \`go mod download\` or manually editing go.sum, which doesn't fix the cryptographic verification failure. The rabbit hole involves checking if the CI is caching modules correctly or if there's a proxy issue. The root cause is that \`go build\` does not automatically add new dependencies to go.mod or go.sum \(since Go 1.16\). The go.sum file acts as a bill of materials and integrity checker. Without the corresponding hash in go.sum, the Go toolchain refuses to build for security reasons. Running \`go mod tidy\` works because it recalculates the required module graph and populates go.sum with the correct cryptographic hashes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:23:36.431249+00:00— report_created — created