Description
pkg/workflow/compiler_yaml_runtime_setup.go (434 lines) has zero test coverage - there is no corresponding _test.go file at all. An automated code-quality scan scored it 58/100 (Needs Work), the lowest of the files reviewed. Its most complex function, addCustomStepsWithRuntimeInsertion (81 lines), handles multiple branching insertion strategies with no dedicated test coverage.
Suggested Changes
- Create
pkg/workflow/compiler_yaml_runtime_setup_test.go.
- Add table-driven tests covering
addCustomStepsWithRuntimeInsertion's branching strategies (each insertion mode/path).
- Cover the remaining exported/unexported helpers in the file with at least basic happy-path and edge-case tests.
Files Affected
pkg/workflow/compiler_yaml_runtime_setup.go
pkg/workflow/compiler_yaml_runtime_setup_test.go (new)
Success Criteria
- New test file exists with coverage for
addCustomStepsWithRuntimeInsertion and other functions in this file.
go test ./pkg/workflow/... passes.
- File no longer flagged as having zero test coverage in subsequent code-quality scans.
Source
Extracted from Daily Compiler Code Quality Report - 2026-07-29 discussion #48759 (#48759)
Priority
Medium - untested complex branching logic in the compiler is a maintainability/regression risk.
🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · sonnet50 · 29.8 AIC · ⌖ 4.66 AIC · ⊞ 9.8K · ◷
Description
pkg/workflow/compiler_yaml_runtime_setup.go(434 lines) has zero test coverage - there is no corresponding_test.gofile at all. An automated code-quality scan scored it 58/100 (Needs Work), the lowest of the files reviewed. Its most complex function,addCustomStepsWithRuntimeInsertion(81 lines), handles multiple branching insertion strategies with no dedicated test coverage.Suggested Changes
pkg/workflow/compiler_yaml_runtime_setup_test.go.addCustomStepsWithRuntimeInsertion's branching strategies (each insertion mode/path).Files Affected
pkg/workflow/compiler_yaml_runtime_setup.gopkg/workflow/compiler_yaml_runtime_setup_test.go(new)Success Criteria
addCustomStepsWithRuntimeInsertionand other functions in this file.go test ./pkg/workflow/...passes.Source
Extracted from Daily Compiler Code Quality Report - 2026-07-29 discussion #48759 (#48759)
Priority
Medium - untested complex branching logic in the compiler is a maintainability/regression risk.