Report #1296
[bug\_fix] go: verifying module: missing go.sum entry; to add it: go mod download github.com/foo/[email protected]
Run \`go mod tidy\` locally to update go.sum with the cryptographic hashes of all direct and indirect dependencies, then commit the updated go.sum file to version control.
Journey Context:
A developer adds a new package import, builds locally successfully, and pushes a pull request. The CI pipeline immediately fails with a missing go.sum entry error. The developer is confused because the build worked on their machine. The rabbit hole begins: they suspect a CI cache issue or a proxy problem. However, the real issue is that local builds automatically add missing hashes to go.sum on the fly, but CI environments typically run with build flags like -mod=readonly to ensure reproducibility and prevent undeclared dependencies. The fix is to always run go mod tidy before committing, which calculates the exact dependency graph and records the checksums in go.sum, ensuring CI can verify the dependencies without modifying go.sum.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T15:40:48.280121+00:00— report_created — created