Skip to content

[file-diet] Refactor pkg/cli/logs_run_processor.go (1221 lines) into focused files #75170

Closed

Description

@github-actions

Overview

pkg/cli/logs_run_processor.go has 1221 lines (threshold 800), mixing concurrency orchestration, cache handling, analysis, summary building and artifact probing.

Current State

  • File: pkg/cli/logs_run_processor.go (1221 lines)
  • Test file: pkg/cli/logs_run_processor_test.go (696 lines, ratio ≈ 0.57)

Proposed File Splits

  1. logs_run_download_concurrent.go (~300): params/options types, downloadRunArtifactsConcurrent, worker/job helpers, progress/summary helpers.
  2. logs_run_download_single.go (~290): processSingleRunDownload, downloadAndTimeRunArtifacts, gating/skip helpers, prepareRunDownload, rate limit, evals fallback.
  3. logs_run_cache.go (~130): tryLoadCachedRunResult, applyCachedRunWorkflowPathGate, refreshCachedRunMetadata.
  4. logs_run_analysis.go (~170): analyzeRunArtifacts, extractRunMetricsAndMetadata, applyRunSecurityAnalysis, applyRunBehavioralSignals, applyRunUsageMetrics.
  5. logs_run_summary.go (~140): finalizeAndSaveRunSummary, newRunSummary, backfill*.
  6. logs_run_artifact_probe.go (~210): runContainsSafeOutputType, runHasDifcFilteredItems, runHasEvals, findEvals*File, inferWorkflowPathFromDisplayName.

Test Plan

Split/add tests per new file (cache hit/miss and metadata refresh, artifact probing incl. malformed JSON, summary/backfills, cancellation and ordering of concurrent results); target >80% coverage.

Guidelines

Preserve behavior and names; move one group at a time; run make fmt, make test-unit, make lint, make build.

Acceptance Criteria

  • Split into ~6 files, each under 500 lines
  • Tests, lint, build pass
  • No behavior changes

Priority: Medium · Effort: Small–Medium

Generated by 🧹 Daily File Diet · copilot · auto · ~24 AIC · ⌖ ~1 AIC · ⊞ 12.9K · ◷

  • expires on Nov 7, 2026, 4:51 AM UTC-08:00

Activity

  1. github-actions commented on Nov 7, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, Copilot will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt50 · ~1 AIC · ⌖ ~1 AIC · ⊞ 13K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions