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 · ◷
Description
pkg/workflow/compiler_safe_outputs_job.gohas 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
buildSafeOutputsHandlerOutputsAndActionSteps(241 lines) into per-output-type helper functions.buildJobLevelSafeOutputEnvVars(144 lines) env-var construction logic into a separate file (e.g.compiler_safe_outputs_envvars.go).Files Affected
pkg/workflow/compiler_safe_outputs_job.goSuccess Criteria
compiler_safe_outputs_job.goreduced well below 800 lines.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)