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 · ◷
Description
compiler_yaml_ai_execution.gois a 508-line YAML generation file with zero test coverage, creating high regression risk. Two core functions (generateEngineInstallAndPreAgentStepsat 118 lines andgenerateAgentRunStepsat 120 lines) are also oversized and untested.Suggested Changes
compiler_yaml_ai_execution_test.gogenerateEngineInstallAndPreAgentStepscovering the UseSamples path, normal engine resolution path, and error pathgenerateAgentRunStepscovering main branchesFiles Affected
pkg/compiler/compiler_yaml_ai_execution.go(508 lines, no tests)pkg/compiler/compiler_yaml_ai_execution_test.go(new file)Success Criteria
make test)Source
Extracted from Daily Compiler Code Quality Report #45370
Priority
High — 508 lines untested is a significant regression risk