Files
template-go-agent/scripts
mathiasandClaude Opus 5 4038339727
CD / Lint / Test / Vet (push) Successful in 9s
CD / Build & Import (push) Skipped
CD / Deploy via GitOps (push) Skipped
fix(test): grade golangci-lint on its exit code, not on grepping its output
Found by an adversarial review of the same harness in template-go-web
(template-go-web#13). This copy had the identical defect.

The harness matched golangci-lint's human-readable summary to decide pass or
fail. Any failure that is not "found issues" -- bad config, unwritable TMPDIR,
OOM, or simply a future change to the output format -- produces non-matching
text and was scored as a pass.

That is the exact defect class this harness exists to end. It is the only gate
covering cmd/__PROJECT_NAME__, so a linter that dies leaves the entrypoint
unchecked with CI green.

golangci-lint exits 0 clean / 1 issues found / >1 the linter itself failed.
Now graded on that, with the >1 case reported as UNCHECKED rather than clean.

Also: a missing tool now fails instead of `exit 0` with zero assertions, which
was indistinguishable from a real pass to anything reading the exit code. And
Dockerfile joins the substituted file set -- it references the entrypoint path,
which is the one thing a rename has historically broken here.

Verified with a shimmed linter exiting 3: 3 passed, 1 failed. Normal run 4/4.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 18:14:10 +02:00
..