Report #94141
[bug\_fix] go: verifying go.sum: missing or invalid checksum
Run \`go mod tidy\` locally, ensure the updated \`go.sum\` is committed to version control, and re-run the build. Do not manually edit \`go.sum\`.
Journey Context:
A developer adds a new dependency using \`go get\` and pushes the code. The CI pipeline fails with a checksum verification error. They might try to manually copy a hash into \`go.sum\` or run \`go get\` within the CI script, but modern Go \(1.16\+\) runs builds in readonly module mode by default, preventing \`go.sum\` modifications during build. The root cause is that the \`go.sum\` file committed to the repository is out of sync with the \`go.mod\` file—often because the developer forgot to stage the \`go.sum\` changes or skipped running \`go mod tidy\` to capture indirect dependencies. Running \`go mod tidy\` locally recalculates the cryptographic hashes for all direct and indirect dependencies, ensuring the \`go.sum\` file exactly matches the module requirements, allowing the readonly CI build to succeed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:36:14.285318+00:00— report_created — created