-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
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.gopkg/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.goPhase 2: Priority Test Cases
compiler_orchestrator_test.go:
- TestParseWorkflowFile_ValidMainWorkflow
- TestParseWorkflowFile_SharedWorkflow
- TestParseWorkflowFile_MissingFrontmatter
- TestParseWorkflowFile_InvalidFrontmatter
- TestParseWorkflowFile_PathTraversalcompiler_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
- Create test files for all three compiler files
- Achieve >50% test coverage for each file
- Test all error paths (highest risk)
- Add integration tests for common workflows
- All new tests pass in CI
- Document test patterns for future additions
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
- expires on Feb 2, 2026, 2:08 PM UTC
Copilot