Skip to content

[lint-monster] function-length refactoring backlog #52404

Description

@github-actions

Summary

make golint-custom reported 682 shared function-length findings in pkg/workflow and pkg/cli. Per repo policy, these are tracked as one consolidated backlog: function-length refactoring.

Current lint snapshot

  • Total shared findings: 682
  • pkg/workflow: 294 findings across 198 files
  • pkg/cli: 388 findings across 229 files
  • Validation command: make golint-custom

Representative diagnostics

  • pkg/workflow/awf_command_builder.go:26BuildAWFCommand is 395 lines long (limit: 60)
  • pkg/workflow/awf_config.go:468BuildAWFConfigJSON is 302 lines long (limit: 60)
  • pkg/workflow/safe_outputs_config_extraction.go:45extractSafeOutputsConfig is 370 lines long (limit: 60)
  • pkg/cli/mcp_tools_privileged.go:148registerLogsTool is 238 lines long (limit: 60)
  • pkg/cli/update_actions.go:160updateActions is 238 lines long (limit: 60)
  • pkg/cli/logs_metrics.go:50extractLogMetrics is 209 lines long (limit: 60)

Hotspots to refactor next

pkg/workflow

  • dependabot.go (6 findings)
  • compiler_custom_jobs.go (5)
  • cache.go (4)
  • central_slash_command_workflow.go (4)
  • frontmatter_extraction_security.go (4)

pkg/cli

  • mcp_tools_privileged.go (6 findings)
  • update_actions.go (6)
  • audit_diff_render.go (5)
  • forecast_compute.go (5)
  • add_workflow_resolution.go (4)

Expected outcome

Reduce this backlog by extracting helpers, isolating formatting/rendering branches, and splitting parsing/assembly phases without changing behavior.

Remediation checklist

  • Keep changes scoped to a small slice of these findings; do not try to clear the entire backlog at once.
  • Prefer minimal, targeted refactors that extract private helpers instead of rewriting behavior.
  • Preserve public APIs and existing behavior.
  • Add or update focused tests only when the touched code lacks coverage for the extracted paths.
  • Re-run make golint-custom and confirm the assigned slice no longer reports.

Copilot instructions

  1. Pick one narrow slice from the hotspots above.
  2. Refactor only functions in that slice until they are at or under the long-function limit.
  3. Avoid unrelated cleanup.
  4. Validate with make golint-custom before finishing.

Generated by 🧌 LintMonster · gpt54 · 29.9 AIC · ⌖ 4.17 AIC · ⊞ 5.7K ·

  • expires on Aug 19, 2026, 7:23 PM UTC-08:00

Summary

make golint-custom reports 682 shared function-length findings in pkg/workflow and pkg/cli. Per repo policy, these remain tracked as one consolidated backlog: function-length refactoring.

Current lint snapshot

  • Total shared findings: 682
  • pkg/workflow: 294 findings across shared long-function backlog
  • pkg/cli: 388 findings across shared long-function backlog
  • Validation command: make golint-custom

Representative diagnostics

  • pkg/workflow/awf_command_builder.go:26BuildAWFCommand is 396 lines long (limit: 60)
  • pkg/workflow/awf_config.go:468BuildAWFConfigJSON is 300 lines long (limit: 60)
  • pkg/workflow/safe_outputs_config_extraction.go:45extractSafeOutputsConfig is 370 lines long (limit: 60)
  • pkg/cli/mcp_tools_privileged.go:148registerLogsTool is 238 lines long (limit: 60)
  • pkg/cli/update_actions.go:160updateActions is 238 lines long (limit: 60)
  • pkg/cli/logs_metrics.go:50extractLogMetrics is 209 lines long (limit: 60)

Hotspots to refactor next

pkg/workflow

  • dependabot.go (6 findings)
  • compiler_custom_jobs.go (5)
  • cache.go (4)
  • central_slash_command_workflow.go (4)
  • frontmatter_extraction_security.go (4)

pkg/cli

  • mcp_tools_privileged.go (6 findings)
  • update_actions.go (6)
  • audit_diff_render.go (5)
  • forecast_compute.go (5)
  • add_workflow_resolution.go (4)

Expected outcome

Reduce this backlog by extracting helpers, isolating formatting/rendering branches, and splitting parsing/assembly phases without changing behavior.

Remediation checklist

  • Keep changes scoped to a small slice of these findings; do not try to clear the entire backlog at once.
  • Prefer minimal, targeted refactors that extract private helpers instead of rewriting behavior.
  • Preserve public APIs and existing behavior.
  • Add or update focused tests only when the touched code lacks coverage for the extracted paths.
  • Re-run make golint-custom and confirm the assigned slice no longer reports.

Copilot instructions

  1. Pick one narrow slice from the hotspots above.
  2. Refactor only functions in that slice until they are at or under the long-function limit.
  3. Avoid unrelated cleanup.
  4. Validate with make golint-custom before finishing.

Duplicate tracking issues

  • No duplicate open lint-monster function-length tracking issues were found in the current repository issue list.> Generated by 🧌 LintMonster · gpt54 · 25.3 AIC · ⌖ 4.17 AIC · ⊞ 5.7K ·

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions