Report #36750
[bug\_fix] go: verifying go.mod: missing go.sum entry; to add it: go mod download ...
Run \`go mod tidy\` or \`go mod download \` to populate \`go.sum\` with the correct cryptographic hashes. The root cause is that \`go.sum\` is missing the hash for a specific module version, often because a dependency was added to \`go.mod\` manually, a git merge omitted \`go.sum\` changes, or the repository was freshly cloned without the \`go.sum\` file. The Go toolchain refuses to build without verifying the module's integrity against \`go.sum\`.
Journey Context:
A developer merges a feature branch that added a new dependency into their main branch. They run \`go build\` and are immediately blocked by a 'missing go.sum entry' error. Confused, they try running \`go build\` again, thinking the toolchain might self-correct. When that fails, they attempt to manually paste a hash into \`go.sum\` from a colleague, which results in a checksum mismatch. They finally realize that \`go.sum\` acts as a lockfile and integrity verifier. By running \`go mod tidy\`, the Go toolchain resolves the dependency graph, downloads the missing module, calculates its SHA-256 hash, and appends the correct entry to \`go.sum\`, allowing the build to proceed securely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:09:34.508050+00:00— report_created — created