Skip to content

[Code Quality] Add test file for compiler_pre_activation_job.go (40 functions, 956 lines, zero tests) #48381

Description

@github-actions

Description

compiler_pre_activation_job.go has 40 functions and 956 lines but has no corresponding _test.go file, making it the only large compiler file without test coverage.

Suggested Changes

  • Create compiler_pre_activation_job_test.go in pkg/workflow/
  • Start with the highest-value functions:
    • buildPreActivationJob (57 lines — largest function)
    • applyPreActivationIfConditionGuards
    • buildPreActivationPermissions
  • Aim for > 70% line coverage
  • Follow the existing test style from other compiler test files

Files Affected

  • pkg/workflow/compiler_pre_activation_job.go (956 lines — source under test)
  • pkg/workflow/compiler_pre_activation_job_test.go (new file to create)

Success Criteria

  • Test file exists at pkg/workflow/compiler_pre_activation_job_test.go
  • buildPreActivationJob, applyPreActivationIfConditionGuards, and buildPreActivationPermissions are covered
  • make test-unit passes with no regressions

Source

Extracted from Daily Compiler Code Quality Report - 2026-07-27. Priority 1 (High): No compiler_pre_activation_job_test.go exists despite 40 functions and 956 lines of logic.

Priority

High — Only large compiler file with zero test coverage. Estimated effort: 3–4 hours.

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · sonnet46 · 55.3 AIC · ⌖ 5.38 AIC · ⊞ 7.2K ·

  • expires on Jul 28, 2026, 5:42 AM 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