Skip to content

errormessage: only CI gate (error-message-lint.yml) disabled since 2026-05-20, despite completed remediation effort #54142

Description

@github-actions

Summary

error-message-lint.yml — the only CI workflow that runs the errormessage custom analyzer (pkg/linters/errormessage) against changed .go files on every PR — has been disabled_manually since 2026-05-20, after five consecutive failing runs that same day. It has not been re-enabled since, despite a full-repo audit and multi-PR remediation effort explicitly targeting errormessage violations completing on 2026-08-12. errormessage is documented as 1 of the "66 active analyzers" in pkg/linters/doc.go and is fully registered via linters.All(), but it currently has zero live CI enforcement of any kind — this is worse than the 13 other "unenforced but still executed via golint-custom" linters, because errormessage isn't in that allowlist either (see Evidence).

Evidence

Impact

  • Any .go file changed since 2026-05-20 can introduce errormessage violations (non-actionable "invalid/cannot/must/failed" messages without guidance, fmt.Errorf used in _validation.go files instead of NewValidationError, empty/example-less NewValidationError suggestions) with no CI signal at all — not even a non-blocking report, since the report target isn't wired into CI either.
  • The August remediation investment (1,129 violations found, ~8 PRs of fixes) has no regression protection going forward — new violations will silently accumulate again until the next manual full-repo audit.
  • This is a case the existing sergo "unenforced linter" pattern class doesn't fully capture: unlike the 14 linters merely absent from LINTER_FLAGS (which still get selectively enabled elsewhere or are read for metrics), errormessage has no live invocation path in CI whatsoever.

Suggested fix

  1. Determine why the 5 runs failed on 2026-05-20 (root cause is not recoverable from logs — retention expired — but the size/pattern of the August violation cleanup, "1,129 violations", strongly suggests the workflow was simply red on real (pre-existing) violations in changed files, not an infra bug).
  2. Re-enable the workflow: gh api -X PUT repos/github/gh-aw/actions/workflows/error-message-lint.yml/enable (or via repo Settings → Actions), then run it once via workflow_dispatch against current main to confirm it's clean post-cleanup before trusting it on PRs.
  3. If it's still noisy, consider first wiring make lint-error-messages-report (already built, non-blocking) into cgo.yml as an interim report-only signal, then flipping error-message-lint.yml back to blocking once the report is clean — mirroring the enforce-readiness pattern already used for the other custom linters.

Validation checklist

  • Confirm error-message-lint.yml state after fix is active (gh api repos/github/gh-aw/actions/workflows/error-message-lint.yml --jq .state)
  • A workflow_dispatch run (full-repo, since it falls back to git ls-files outside pull_request) completes without the "Run errormessage linter on changed files" step failing
  • A subsequent PR touching a .go file shows the check running (not skipped/absent) in its status checks

Effort

Small — this is a re-enable + verify task, not a code change, unless step 1 surfaces a real bug in the analyzer itself.

Location

  • .github/workflows/error-message-lint.yml (disabled workflow)
  • .github/workflows/cgo.yml:1372, :1375 (LINTER_FLAGS allowlist, errormessage absent)
  • Makefile:1032-1037 (unused report-only target)
  • pkg/linters/errormessage/errormessage.go (the dormant analyzer)

Generated by 🤖 Sergo - Serena Go Expert · agent · 275.6 AIC · ⌖ 5.24 AIC · ⊞ 6.3K ·

  • expires on Aug 26, 2026, 8:16 PM UTC-08:00

Metadata

Metadata

Labels

cookieIssue Monster Loves Cookies!sergo

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions