Skip to content

[lint-monster] lint-monster: cli logs-reporting largefunc slice #53270

Description

@github-actions

Summary

Daily make golint-custom surfaced a concentrated long-function cluster in CLI logs/reporting flows. This issue tracks one focused remediation slice from the broader function-length refactoring backlog.

Primary targets in this slice:

  • pkg/cli/logs_download.go:118downloadRunArtifacts is 321 lines
  • pkg/cli/logs_report.go:83buildLogsData is 321 lines
  • pkg/cli/logs_download.go:20downloadWorkflowRunLogs is 64 lines
  • pkg/cli/logs_download.go:472ensureUsageAwInfoFallback is 73 lines
  • pkg/cli/audit_expanded.go:469buildMCPServerHealth is 96 lines

Validation command: make golint-custom

Expected outcome

Reduce long-function findings in CLI log collection/reporting by extracting focused helpers for artifact enumeration, parsing, aggregation, and fallback handling while keeping output unchanged.

Remediation checklist

  • Keep remediation scoped to the CLI logs/reporting cluster only.
  • Prefer minimal, targeted helper extraction.
  • Preserve CLI output shape and error handling behavior.
  • Run make golint-custom after changes.
  • Do not broaden into unrelated CLI cleanup.

Copilot instructions

  1. Work only on the listed CLI log/reporting functions.
  2. Split artifact download, log parsing, and summary aggregation into small helpers.
  3. Preserve user-facing output and current error semantics.
  4. Keep edits local and behavior-preserving.
  5. Validate with make golint-custom before finishing.

Generated by 🧌 LintMonster · gpt54 · 19.8 AIC · ⌖ 6.72 AIC · ⊞ 5.9K ·

  • expires on Aug 23, 2026, 6:53 PM UTC-08:00

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions