Skip to content

[Code Quality] Refactor compiler_safe_outputs_job.go: extract buildSafeOutputsHandlerOutputsAndActionSteps (238 lines) #47520

Description

@github-actions

Description

compiler_safe_outputs_job.go is 1042 lines — 30% over the 800-line guideline. The last remaining oversized method is buildSafeOutputsHandlerOutputsAndActionSteps at 238 lines, identified in the daily compiler quality report.

Suggested Changes

  • Extract distinct logical sub-sections of buildSafeOutputsHandlerOutputsAndActionSteps into focused helper functions
  • Target each helper to be ≤50 lines with a single clear responsibility
  • After extraction, the file should approach or fall below the 800-line guideline
  • Ensure all existing tests continue to pass (make test-unit)

Files Affected

  • pkg/compiler/compiler_safe_outputs_job.go (primary, ~1042 lines)

Success Criteria

  • buildSafeOutputsHandlerOutputsAndActionSteps split into ≥3 focused helpers, each ≤80 lines
  • compiler_safe_outputs_job.go total size ≤ 900 lines (ideally ≤ 800)
  • Compiler quality score for this file improves from 82 toward 90+
  • All unit tests pass

Source

Extracted from [daily-compiler-quality] Daily Compiler Code Quality Report - 2026-07-23

Priority

Medium — improves maintainability; file is functional but structurally oversized

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · sonnet46 43 AIC · ⌖ 5.45 AIC · ⊞ 7.1K ·

  • expires on Jul 23, 2026, 11:40 PM UTC-08:00

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