Skip to content

[deep-report] Refactor the 365-line buildCustomJobs function in compiler_jobs.go #36672

@github-actions

Description

@github-actions

Context

The Daily Compiler Code Quality report (#36563) names buildCustomJobs in pkg/workflow/compiler_jobs.go (file scores 78/100) as the single most urgent finding: a 365-line function — a significant outlier. This also feeds the repo-wide Sentrux bottleneck of 895 complex functions (#36553), the dominant drag on the quality signal for 30+ days.

Task

Extract cohesive sub-steps of buildCustomJobs into well-named helpers to reduce its length and cyclomatic complexity, preserving behavior. The file already has a strong test ratio (3.66×), so refactor under test.

Acceptance criteria

  • buildCustomJobs is materially shorter (target < 150 lines) with extracted, named helpers.
  • No behavioral change: existing pkg/workflow tests pass unchanged.
  • make build && make test-unit pass.

Effort

~3–4h. Suggested agent: a Go refactoring agent.

Source: Daily Compiler Code Quality Report #36563. Identified by DeepReport 2026-06-03.

Generated by 🔬 DeepReport - Intelligence Gathering Agent · opus48 18.3M ·

  • expires on Jun 5, 2026, 4:17 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions