Skip to content

[Code Quality] Add test coverage for compiler_yaml_ai_execution.go (0 tests, 508 lines) #45401

Description

@github-actions

Description

compiler_yaml_ai_execution.go is a 508-line YAML generation file with zero test coverage, creating high regression risk. Two core functions (generateEngineInstallAndPreAgentSteps at 118 lines and generateAgentRunSteps at 120 lines) are also oversized and untested.

Suggested Changes

  • Create compiler_yaml_ai_execution_test.go
  • Add table-driven tests for generateEngineInstallAndPreAgentSteps covering the UseSamples path, normal engine resolution path, and error path
  • Add tests for generateAgentRunSteps covering main branches
  • Target ≥70% test coverage for the file

Files Affected

  • pkg/compiler/compiler_yaml_ai_execution.go (508 lines, no tests)
  • pkg/compiler/compiler_yaml_ai_execution_test.go (new file)

Success Criteria

  • Test file created with at minimum 5 table-driven test cases
  • Coverage for both oversized functions
  • All existing tests continue to pass (make test)

Source

Extracted from Daily Compiler Code Quality Report #45370

Priority

High — 508 lines untested is a significant regression risk

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · 205.3 AIC · ⌖ 5.26 AIC · ⊞ 7K ·

  • expires on Jul 14, 2026, 11:36 PM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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