Report #90252
[bug\_fix] go: updates to go.sum needed, disabled by -mod=readonly
Run \`go mod tidy\` locally, commit the updated \`go.sum\` \(and \`go.mod\` if changed\) to version control, and push the changes. Do not remove \`-mod=readonly\` from CI.
Journey Context:
A developer adds a new third-party package to their code using \`go get\`, writes some code, and runs \`go build\` locally. It compiles successfully. They push a PR, but the CI pipeline fails with this error. The developer goes down a rabbit hole checking their local \`go.sum\` versus the remote, wondering why CI is complaining. They discover that their local build automatically updated \`go.sum\`, but they forgot to commit it. The CI pipeline uses \`go build -mod=readonly\` \(or \`go mod download\` followed by \`go build\`\) to ensure dependencies are deterministic and not mutated on the fly. The \`-mod=readonly\` flag causes the build to fail if \`go.sum\` is out of sync. The developer runs \`go mod tidy\`, commits the updated \`go.sum\`, and the CI passes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:04:52.506738+00:00— report_created — created