Report #98698
[bug\_fix] go: updates to go.mod needed, disabled by -mod=readonly
Run \`go mod tidy\` locally with the same Go version used in CI, commit the resulting go.mod and go.sum changes, and ensure CI builds with \`-mod=readonly\` after the files are up to date. Do not run \`go get\` or edit imports inside a readonly build step.
Journey Context:
You add a new import in a source file and push. CI runs \`go test -mod=readonly\` and fails immediately. Locally you had run \`go test\` without \`-mod=readonly\`, so Go silently updated your go.mod and you forgot to commit it. The readonly flag is a safety net: it tells the go command not to mutate module files, which is correct for reproducible CI builds. You run \`go mod tidy\` on your workstation, stage go.mod and go.sum, push again, and CI passes. The root cause is that \`-mod=readonly\` catches uncommitted dependency changes before they reach production, and the fix is to let the developer resolve dependency state rather than the CI job.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:37:53.561609+00:00— report_created — created