What happens
When post-code.sh runs authoritative pre-commit on an enrolled repo whose
go.mod targets a Go version newer than the golangci-lint binary pre-commit
installs on the GHA runner, the golangci-lint hooks fail with exit code 3
before analyzing any code. The workflow exits red and no PR is created.
Reproduced on konflux-ci/segment-bridge via
Code run #116
(2026-06-09):
-
User triggered the code agent on an enrolled repo (segment-bridge).
-
Agent completed (Agent completed annotation).
-
post-code.sh ran authoritative pre-commit on changed files.
-
golangci-lint-fmt and golangci-lint-full both failed:
Error: can't load config: the Go language version (go1.25) used to build
golangci-lint is lower than the targeted Go version (1.26.0)
Hook log also shows:
golangci-lint has version 2.0.0-20260506110125-c0d3ddc9cf3f+dirty
built with go1.25.0
-
Post-script blocked with:
BLOCKED — pre-commit hooks failed on agent's changes
The agent's code does not pass the repo's pre-commit hooks.
-
Workflow conclusion: failure. No PR opened.
Other pre-commit hooks in the same run passed (markdownlint, go-mod-tidy,
gitleaks). Only golangci-lint hooks failed, and the failure is
infrastructure/version mismatch, not a lint finding in agent code.
What should happen
post-code.sh should be able to run golangci-lint pre-commit hooks against
repos whose go.mod declares the current Go release. At minimum, the
authoritative pre-commit gate should use a golangci-lint build whose Go
toolchain is >= the target repo's go directive.
Repo CI is unaffected: segment-bridge's own workflow uses
actions/setup-go with go-version-file: go.mod and the same pre-commit
hooks pass there. Only the fullsend post-code runner environment is broken.
How to reproduce
- Enroll a repo with
go 1.26.0 (or newer) in go.mod.
- Add golangci-lint hooks to
.pre-commit-config.yaml (e.g.
golangci-lint-fmt, golangci-lint-full from
https://github.com/golangci/golangci-lint).
- Trigger
/fs-code on an issue in that repo.
- Let the code agent produce commits on a feature branch.
- Observe
post-code.sh fail at authoritative pre-commit with the
go1.25 ... lower than ... 1.26.0 error.
Enrolled repo used in repro: konflux-ci/segment-bridge (enabled: true
in konflux-ci/.fullsend config.yaml).
Target repo pre-commit hooks (.pre-commit-config.yaml):
yamllint, shellcheck, gitlint, conventional-pre-commit, actionlint,
markdownlint, go-mod-tidy, golangci-lint-fmt, golangci-lint-full, gitleaks.
Context
This is a runner-side toolchain gap, distinct from the recently fixed sandbox
Go mismatch (#1344,
fixed by
PR #1990). That fix
updated the code agent sandbox image. This failure happens on the GHA
runner during post-code.sh, after the sandbox is destroyed.
As more Konflux repos adopt Go 1.26, any enrolled repo using golangci-lint
pre-commit hooks will hit this block. The agent cannot fix it: the failure is
in the runner's pre-commit environment, not in the code it wrote.
What this is NOT (avoid duplicate closure)
This is not the same issue as:
- #1997 — UX gap:
no bot comment on the source issue when post-code pre-commit blocks. Same
repro family, but this report is the root-cause infrastructure failure
(golangci-lint Go toolchain mismatch), not missing notification.
- #1344 /
#1990 — sandbox Go
version mismatch. Fixed for the agent sandbox; does not fix post-code
runner pre-commit.
- #850 — missing
binaries (lychee, uvx) on the runner. Here the binary exists but is
built with an incompatible Go version.
- #1270 — registry
coverage for precommit-tools.yaml. golangci-lint uses language: golang
and is auto-managed by pre-commit; the failure is version skew, not a
missing registry entry.
- #1866 — blocking on
pre-existing hook failures unrelated to agent changes. Here the hook cannot
run at all due to toolchain mismatch.
- #1865 — PR created,
CI failed later. Here pre-commit blocks before any PR.
Acceptance criteria
What happens
When
post-code.shruns authoritative pre-commit on an enrolled repo whosego.modtargets a Go version newer than the golangci-lint binary pre-commitinstalls on the GHA runner, the golangci-lint hooks fail with exit code 3
before analyzing any code. The workflow exits red and no PR is created.
Reproduced on konflux-ci/segment-bridge via
Code run #116
(2026-06-09):
User triggered the code agent on an enrolled repo (
segment-bridge).Agent completed (
Agent completedannotation).post-code.shran authoritative pre-commit on changed files.golangci-lint-fmtandgolangci-lint-fullboth failed:Hook log also shows:
Post-script blocked with:
BLOCKED — pre-commit hooks failed on agent's changesThe agent's code does not pass the repo's pre-commit hooks.Workflow conclusion: failure. No PR opened.
Other pre-commit hooks in the same run passed (markdownlint, go-mod-tidy,
gitleaks). Only golangci-lint hooks failed, and the failure is
infrastructure/version mismatch, not a lint finding in agent code.
What should happen
post-code.shshould be able to run golangci-lint pre-commit hooks againstrepos whose
go.moddeclares the current Go release. At minimum, theauthoritative pre-commit gate should use a golangci-lint build whose Go
toolchain is >= the target repo's
godirective.Repo CI is unaffected: segment-bridge's own workflow uses
actions/setup-gowithgo-version-file: go.modand the same pre-commithooks pass there. Only the fullsend post-code runner environment is broken.
How to reproduce
go 1.26.0(or newer) ingo.mod..pre-commit-config.yaml(e.g.golangci-lint-fmt,golangci-lint-fullfromhttps://github.com/golangci/golangci-lint)./fs-codeon an issue in that repo.post-code.shfail at authoritative pre-commit with thego1.25 ... lower than ... 1.26.0error.Enrolled repo used in repro: konflux-ci/segment-bridge (
enabled: truein konflux-ci/.fullsend
config.yaml).Target repo pre-commit hooks (
.pre-commit-config.yaml):yamllint, shellcheck, gitlint, conventional-pre-commit, actionlint,
markdownlint, go-mod-tidy, golangci-lint-fmt, golangci-lint-full, gitleaks.
Context
This is a runner-side toolchain gap, distinct from the recently fixed sandbox
Go mismatch (#1344,
fixed by
PR #1990). That fix
updated the code agent sandbox image. This failure happens on the GHA
runner during
post-code.sh, after the sandbox is destroyed.As more Konflux repos adopt Go 1.26, any enrolled repo using golangci-lint
pre-commit hooks will hit this block. The agent cannot fix it: the failure is
in the runner's pre-commit environment, not in the code it wrote.
What this is NOT (avoid duplicate closure)
This is not the same issue as:
no bot comment on the source issue when post-code pre-commit blocks. Same
repro family, but this report is the root-cause infrastructure failure
(golangci-lint Go toolchain mismatch), not missing notification.
#1990 — sandbox Go
version mismatch. Fixed for the agent sandbox; does not fix post-code
runner pre-commit.
binaries (
lychee,uvx) on the runner. Here the binary exists but isbuilt with an incompatible Go version.
coverage for
precommit-tools.yaml. golangci-lint useslanguage: golangand is auto-managed by pre-commit; the failure is version skew, not a
missing registry entry.
pre-existing hook failures unrelated to agent changes. Here the hook cannot
run at all due to toolchain mismatch.
CI failed later. Here pre-commit blocks before any PR.
Acceptance criteria
post-code.shruns golangci-lint pre-commit hooks successfully on arepo with
go 1.26.0ingo.modand golangci-lint hooks in.pre-commit-config.yaml.pre-commit without the
go1.25 ... lower than ... 1.26.0error.