Report #3880
[bug\_fix] go.sum: hash mismatch or "missing go.sum entry for module providing package"
Run \`go mod tidy\` so Go downloads the correct source through the chosen proxy and records the verified checksum. If a proxy returns stale or corrupted bytes, switch proxies \(\`GOPROXY=https://proxy.golang.org,direct\`\) and remove the bad entry from \`go.sum\` first. For private modules that proxies cannot reach, set \`GOPRIVATE\` and use \`go mod tidy\` with direct access so the authentic hash is recorded. Never hand-edit hashes.
Journey Context:
After rebasing a feature branch, \`go build\` failed with \`missing go.sum entry for module providing package github.com/foo/bar/baz\`. The developer manually copied a hash from a coworker's branch, which then produced \`verifying module: checksum mismatch\`. They assumed the dependency had been compromised and pinned an older version, which only broke other packages. Eventually they realized a corporate proxy was caching an incomplete tarball after an upstream force-push, while the colleague had fetched the real module before the cache poisoned copy. Setting \`GOPROXY=https://proxy.golang.org,direct\`, deleting the offending \`go.sum\` lines, and running \`go mod tidy\` re-fetched the authoritative source and recorded the correct checksum. The build passed and \`go mod verify\` confirmed the hashes matched the downloaded code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:27:21.307985+00:00— report_created — created