Skip to content

[Code Quality] Decompose compiler_safe_outputs_job.go: split 241-line buildSafeOutputsHandlerOutputsAndActionSteps and 144-line buildJobLevelSa [Content truncated due to length] #50515

Description

@github-actions

Description

pkg/workflow/compiler_safe_outputs_job.go has grown to 1093 lines (37% over the 800-line guideline) and regressed from a quality score of 82 to 69/100 in the daily compiler code quality report. The file mixes multiple responsibilities in two oversized functions.

Suggested Changes

  • Split buildSafeOutputsHandlerOutputsAndActionSteps (241 lines) into per-output-type helper functions.
  • Extract buildJobLevelSafeOutputEnvVars (144 lines) env-var construction logic into a separate file (e.g. compiler_safe_outputs_envvars.go).
  • Preserve existing behavior and function signatures where used externally.

Files Affected

  • pkg/workflow/compiler_safe_outputs_job.go

Success Criteria

  • compiler_safe_outputs_job.go reduced well below 800 lines.
  • No single function exceeds ~100 lines.
  • Existing tests (make test-unit) continue to pass unchanged.

Source

Extracted from Daily Compiler Code Quality Report - 2026-08-05

Priority

Medium - highest-priority regression flagged in the report (est. 1 day effort)

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 53.9 AIC · ⌖ 4.88 AIC · ⊞ 10.3K · ◷

  • expires on Aug 5, 2026, 11:42 PM UTC-08:00

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions