Skip to content

[CI Failure Doctor] lint-go fails because safe outputs helper is unused #15255

@github-actions

Description

@github-actions

🏥 CI Failure Investigation - Run #35217

Summary

The lint-go job for run 35217 failed because golangci-lint reported that generateMaxWithRequiredFieldsConfig is unused, so the unused linter stopped the build before the new safe-outputs change could run.

Failure Details

  • Run: 21967944297
  • Commit: 9c5b6d076f55df676e93a69b551f2d4961248f21
  • Trigger: push

Root Cause Analysis

A new helper that builds configs with required label/title filters was added in safe_outputs_config_generation_helpers.go, but no caller references it yet. golangci-lint’s unused check therefore fails before the lint phase completes.

Failed Jobs and Errors

  • lint-go: pkg/workflow/safe_outputs_config_generation_helpers.go:64:6: func generateMaxWithRequiredFieldsConfig is unused (unused)

Investigation Findings

  • The helper is intended to back the close_issue configuration, but the current generateSafeOutputsConfig implementation built the required fields manually.
  • Reusing the helper when generating close_issue removes the unused warning and keeps the configuration logic centralized.
  • Job logs: (productionresultssa13.blob.core.windows.net/redacted)

Recommended Actions

  • Reconcile helper usage with the close_issue config (or drop the helper) so that golangci-lint no longer reports the symbol as unused.
  • Run make lint or golangci-lint locally when adding new helper functions to the safe output generator to catch these errors before merging.

Prevention Strategies

Treat every new helper in pkg/workflow as requiring a consumer; if no current code needs it, either delete the helper or document that future work must consume it and add a TODO test to verify it gets used.

AI Team Self-Improvement

Before introducing a helper, update instructions.md to remind the next AI author to search for and add a consumer for that helper and rerun golangci-lint so unused-lint failures do not regress.

Historical Context

No earlier investigations match this exact unused-helper failure pattern; a new pattern record has been logged for this run.

AI generated by CI Failure Doctor

To add this workflow in your repository, run gh aw add githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d. See usage guide.

  • expires on Feb 13, 2026, 11:24 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Labels

    cookieIssue Monster Loves Cookies!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions