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:118 — downloadRunArtifacts is 321 lines
pkg/cli/logs_report.go:83 — buildLogsData is 321 lines
pkg/cli/logs_download.go:20 — downloadWorkflowRunLogs is 64 lines
pkg/cli/logs_download.go:472 — ensureUsageAwInfoFallback is 73 lines
pkg/cli/audit_expanded.go:469 — buildMCPServerHealth 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
Copilot instructions
- Work only on the listed CLI log/reporting functions.
- Split artifact download, log parsing, and summary aggregation into small helpers.
- Preserve user-facing output and current error semantics.
- Keep edits local and behavior-preserving.
- Validate with
make golint-custom before finishing.
Generated by 🧌 LintMonster · gpt54 · 19.8 AIC · ⌖ 6.72 AIC · ⊞ 5.9K · ◷
Summary
Daily
make golint-customsurfaced a concentrated long-function cluster in CLI logs/reporting flows. This issue tracks one focused remediation slice from the broaderfunction-length refactoringbacklog.Primary targets in this slice:
pkg/cli/logs_download.go:118—downloadRunArtifactsis 321 linespkg/cli/logs_report.go:83—buildLogsDatais 321 linespkg/cli/logs_download.go:20—downloadWorkflowRunLogsis 64 linespkg/cli/logs_download.go:472—ensureUsageAwInfoFallbackis 73 linespkg/cli/audit_expanded.go:469—buildMCPServerHealthis 96 linesValidation command:
make golint-customExpected 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
make golint-customafter changes.Copilot instructions
make golint-custombefore finishing.