Report #104278
[bug\_fix] verifying go.mod: checksum mismatch
Run \`go mod tidy\` to regenerate the go.sum file from the current go.mod. If the mismatch persists, check for manual edits to go.sum or a corrupted download cache; delete the module cache \(\`go clean -modcache\`\) and retry.
Journey Context:
A developer working in a CI pipeline noticed a build failure with 'verifying go.mod: checksum mismatch'. The pipeline had been working fine for weeks. The developer initially suspected a network issue or a compromised dependency. They spent hours comparing the go.sum in the repository with the one generated locally, but they were identical. The real culprit was that a previous build step had manually appended a line to go.sum using a shell script to work around an old bug. That line contained a stale checksum for a dependency that had since been updated. When the CI ran \`go mod verify\`, Go detected the inconsistency. The fix was to remove the manual go.sum manipulation and instead run \`go mod tidy\` as part of the build process. The root cause: go.sum is a cryptographic checksum file; any manual edits that don't match the actual module content will cause verification failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-26T20:03:42.371785+00:00— report_created — created