Repository navigation
Description
Description
The compiler_yaml_main_job.go file (612 lines) lacks a dedicated test file. Main job generation is tested only indirectly through integration tests, making it harder to validate edge cases and regression test specific behaviors.
Current State
File: pkg/workflow/compiler_yaml_main_job.go (612 lines)
Test Coverage: No dedicated test file compiler_yaml_main_job_test.go
Testing Method: Indirect integration tests only via compiler_yaml_test.go
Why This Matters
- Critical path: Main job generation is core workflow compilation logic
- Edge cases: Hard to test specific behaviors (repository imports, runtime deduplication, custom steps)
- Regression testing: Changes risk breaking existing workflows without direct unit tests
- Code quality: Dedicated test file improves maintainability and catches issues early
Suggested Tests
Create pkg/workflow/compiler_yaml_main_job_test.go with tests for:
-
Repository import checkout generation
- Test multiple repository imports
- Test ref parsing (owner/repo@ref format)
- Test sanitization of refs for paths
-
Runtime deduplication logic
- Test that duplicate runtime configurations are merged
- Test version conflicts are detected
- Test runtime setup step generation
-
Custom steps insertion
- Test custom steps are inserted at correct positions
- Test step ID generation
- Test conditional step execution
-
Error handling
- Test invalid repository import specs
- Test malformed custom step configurations
- Test missing required fields
Files Affected
pkg/workflow/compiler_yaml_main_job_test.go(new file)
Success Criteria
- Test file created with comprehensive test coverage
- Tests for repository import checkout generation
- Tests for runtime deduplication logic
- Tests for custom steps insertion
- Tests for error handling paths
- All tests pass with
go test -v ./pkg/workflow/
Source
Extracted from Daily Compiler Code Quality Report discussion #13934
Priority
High - Main job generation is critical path and needs direct unit tests for regression safety.
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 7, 2026, 5:23 AM UTC
Activity
github-actions commentedon Feb 7, 2026
This issue was automatically closed because it expired on 2026-02-07T05:23:40.675Z.