Report #15988
[bug\_fix] go: verifying go.mod: checksum mismatch
Delete the corrupted go.sum file and run \`go mod tidy\` to regenerate it, or run \`go get @\` to update the specific entry. The root cause is that the cryptographic hash in go.sum does not match the actual hash of the downloaded module, usually due to a Git merge conflict that concatenated duplicate entries or a manual edit.
Journey Context:
A developer pulls the latest code from the main branch after a teammate merges a feature branch. They run \`go build\` and are hit with a checksum mismatch error. They run \`go mod tidy\` but it refuses to proceed due to the same error. Suspecting a corrupted local cache, they clear their module cache using \`go clean -modcache\`, but the error persists. They open go.sum and notice two entries for the same module version with different hashes—a classic merge conflict artifact where Git concatenated both versions of the line instead of properly resolving the conflict. They delete the go.sum file and run \`go mod tidy\`. Go downloads the required modules, calculates the true cryptographic hash from the source, and generates a clean go.sum. The build succeeds because the local hash now matches the authentic module hash, eliminating the corrupted merge artifact.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:28:32.973467+00:00— report_created — created