-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Description
The compiler orchestrator modules (compiler_orchestrator_*.go) have excellent architecture with a 5-module split, but test coverage is only 22% (274 test lines / 1,225 source lines). This is below the project's typical standards and needs improvement.
Current Test Coverage
| Module | Lines | Test Coverage |
|---|---|---|
compiler_orchestrator.go |
8 | N/A (logger only) |
compiler_orchestrator_engine.go |
239 | Low |
compiler_orchestrator_frontmatter.go |
167 | Low |
compiler_orchestrator_tools.go |
274 | Low |
compiler_orchestrator_workflow.go |
537 | Low |
| Total | 1,225 | 22% |
Project target: >60% coverage for production code
Suggested Changes
Add integration tests for orchestration flow in compiler_orchestrator_test.go:
-
End-to-end workflow parsing tests
- Test complete workflow compilation from markdown to YAML
- Verify all orchestration phases execute correctly
- Test with various engine types (copilot, claude, codex)
-
Error propagation tests
- Verify errors flow correctly through orchestration layers
- Test error context is preserved at each phase
- Ensure typed result structures work correctly
-
Edge case tests
- Engine detection with missing/invalid frontmatter
- Tool processing with malformed configuration
- Workflow data assembly with missing required fields
Files Affected
pkg/workflow/compiler_orchestrator_test.go(add comprehensive tests)- Potentially add individual test files for each module if needed
Success Criteria
- Test coverage increased to 60%+ (target: 735+ test lines)
- End-to-end integration tests for
ParseWorkflowFile() - Error propagation tests for all orchestration phases
- Edge case tests for engine detection and tool processing
- All tests pass (
make test-unit) - Test-to-source ratio improved from 0.22 to >0.60
Priority
Medium-High - The orchestrator is critical compiler infrastructure with excellent architecture but insufficient test coverage
Estimated Effort
Medium (4-6 hours to write comprehensive integration tests)
Source
Extracted from Daily Compiler Code Quality Report discussion #13034 - Immediate Action #1
Context
The orchestrator refactoring from a monolithic file into 5 focused modules (lines 8-537) is a best-in-class architectural achievement. However, the test coverage hasn't kept pace with this excellent refactoring. Adding comprehensive tests will ensure this critical infrastructure is well-protected.
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 15, 2026, 9:08 AM UTC