Description
Three core compiler files totaling 2,291 lines have zero test coverage, including a critical 792-line function that is completely untested. This creates significant risk for regressions and makes refactoring dangerous.
Problem
Test files missing for:
pkg/workflow/compiler_orchestrator.go (854 lines, 792-line untested function)
pkg/workflow/compiler_activation_jobs.go (790 lines)
pkg/workflow/compiler.go (647 lines)
Impact:
- Cannot verify error handling paths
- Refactoring is risky without tests
- High risk of bugs during modifications
- 2,291 lines of untested code
Files Affected
pkg/workflow/compiler_orchestrator.go:19-807 (ParseWorkflowFile function)
pkg/workflow/compiler_activation_jobs.go
pkg/workflow/compiler.go
Suggested Implementation
Phase 1: Create Test Files (Week 1)
touch pkg/workflow/compiler_test.go
touch pkg/workflow/compiler_orchestrator_test.go
touch pkg/workflow/compiler_activation_jobs_test.go
Phase 2: Priority Test Cases
compiler_orchestrator_test.go:
- TestParseWorkflowFile_ValidMainWorkflow
- TestParseWorkflowFile_SharedWorkflow
- TestParseWorkflowFile_MissingFrontmatter
- TestParseWorkflowFile_InvalidFrontmatter
- TestParseWorkflowFile_PathTraversal
compiler_test.go:
- Expression validation tests
- Lock file generation tests
- Valid workflow compilation tests
- Invalid frontmatter handling tests
compiler_activation_jobs_test.go:
- Activation logic tests
- Reaction handling tests
- Permission calculation tests
- Custom field extraction tests
Success Criteria
Estimated Effort
2-3 weeks total:
- Week 1: Create test infrastructure and basic tests
- Week 2: Add comprehensive error path tests
- Week 3: Integration tests and edge cases
Source
Extracted from Daily Compiler Code Quality Report discussion #10644
Priority
High - Required before any refactoring work can safely proceed
AI generated by Discussion Task Miner - Code Quality Improvement Agent
Description
Three core compiler files totaling 2,291 lines have zero test coverage, including a critical 792-line function that is completely untested. This creates significant risk for regressions and makes refactoring dangerous.
Problem
Test files missing for:
pkg/workflow/compiler_orchestrator.go(854 lines, 792-line untested function)pkg/workflow/compiler_activation_jobs.go(790 lines)pkg/workflow/compiler.go(647 lines)Impact:
Files Affected
pkg/workflow/compiler_orchestrator.go:19-807(ParseWorkflowFile function)pkg/workflow/compiler_activation_jobs.gopkg/workflow/compiler.goSuggested Implementation
Phase 1: Create Test Files (Week 1)
Phase 2: Priority Test Cases
compiler_orchestrator_test.go:
compiler_test.go:
compiler_activation_jobs_test.go:
Success Criteria
Estimated Effort
2-3 weeks total:
Source
Extracted from Daily Compiler Code Quality Report discussion #10644
Priority
High - Required before any refactoring work can safely proceed