-
Notifications
You must be signed in to change notification settings - Fork 261
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Description
The compiler_yaml_main_job.go file (612 lines) lacks a dedicated test file, making it harder to validate edge cases and regression test specific behaviors. Main job generation is a critical path in workflow compilation and needs direct unit tests.
Current State
- File:
pkg/workflow/compiler_yaml_main_job.go(612 lines) - Test File: Missing - currently tested only indirectly via integration tests
- Impact: Harder to validate edge cases, regression testing relies on slow integration tests
Suggested Changes
- Create test file:
pkg/workflow/compiler_yaml_main_job_test.go - Test repository import checkout generation
- Test parsing of
owner/repo@refformat - Test multiple repository imports
- Test invalid import specifications
- Test parsing of
- Test runtime deduplication logic
- Test duplicate runtime detection
- Test runtime version merging
- Test custom steps insertion
- Test steps are inserted at correct positions
- Test custom step ordering
Files Affected
pkg/workflow/compiler_yaml_main_job_test.go(new file, ~200-300 lines)
Success Criteria
- Test file created with at least 5-7 test functions
- Test coverage ratio ≥0.8:1 (target: ~500 test lines for 612 source lines)
- All existing tests continue to pass
- Tests use table-driven pattern with
t.Run() - Tests include both success and error cases
Priority
High - Main job generation is critical path, needs direct testing
Estimated Effort
2-4 hours
Source
Extracted from:
- Daily Compiler Code Quality Report - Feb 6 (#14159)
- Daily Compiler Code Quality Report - Feb 5 (#13934)
Mentioned as high-priority recommendation in both compiler quality reports.
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 7, 2026, 9:07 PM UTC
Reactions are currently unavailable