Report #16935
[bug\_fix] go: updates to go.sum needed, but the -mod=readonly flag was set
Run \`go mod tidy\` locally and commit the updated \`go.sum\` file to version control. Do not remove the \`-mod=readonly\` flag from the CI pipeline.
Journey Context:
A developer adds a new import to their code and runs \`go run main.go\` locally, which succeeds because Go automatically updates go.sum in module-aware mode. They push the code, but the CI pipeline fails. The CI pipeline uses \`go build -mod=readonly\` to ensure reproducible builds and prevent unexpected dependency mutations. The developer is confused because it works on their machine. They might try adding \`-mod=mod\` to the CI command, which defeats the purpose of reproducible builds. The real fix is understanding that \`-mod=readonly\` is a safeguard; the developer must explicitly run \`go mod tidy\` locally to update the \`go.sum\` and commit both \`go.mod\` and \`go.sum\` to version control before pushing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T03:58:44.686899+00:00— report_created — created