Description
The Daily Compiler Code Quality Check (2026-08-03) flagged pkg/workflow/compiler_yaml_prompt.go (336 lines, 11 functions) as having no dedicated test file — the most significant maintainability gap identified in that run. The file handles non-trivial prompt-chunking and import-interleaving logic (compile-time inlining vs. runtime-import fallback, expression mapping merges) that currently relies entirely on indirect/integration coverage elsewhere.
Suggested Changes
- Create
pkg/workflow/compiler_yaml_prompt_test.go
- Add focused unit tests for:
splitContentIntoChunks
processOrderedPromptImports
processLegacyPromptImports
enrichExpressionMappings
buildMainWorkflowPromptChunks
- Cover edge cases: empty prompt, single chunk, mixed ordered/legacy imports, expression-mapping merge conflicts
Files Affected
pkg/workflow/compiler_yaml_prompt.go (source, no changes expected)
pkg/workflow/compiler_yaml_prompt_test.go (new)
Success Criteria
- New test file exists with coverage for the functions listed above
go test ./pkg/workflow/... -run TestCompilerYamlPrompt (or similar) passes
- No regressions in existing compiler tests
Source
Extracted from Daily Compiler Code Quality Report - 2026-08-03
Priority
Medium - improves test coverage for non-trivial logic but not blocking.
🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 47.3 AIC · ⌖ 4.61 AIC · ⊞ 10.3K · ◷
Description
The Daily Compiler Code Quality Check (2026-08-03) flagged
pkg/workflow/compiler_yaml_prompt.go(336 lines, 11 functions) as having no dedicated test file — the most significant maintainability gap identified in that run. The file handles non-trivial prompt-chunking and import-interleaving logic (compile-time inlining vs. runtime-import fallback, expression mapping merges) that currently relies entirely on indirect/integration coverage elsewhere.Suggested Changes
pkg/workflow/compiler_yaml_prompt_test.gosplitContentIntoChunksprocessOrderedPromptImportsprocessLegacyPromptImportsenrichExpressionMappingsbuildMainWorkflowPromptChunksFiles Affected
pkg/workflow/compiler_yaml_prompt.go(source, no changes expected)pkg/workflow/compiler_yaml_prompt_test.go(new)Success Criteria
go test ./pkg/workflow/... -run TestCompilerYamlPrompt(or similar) passesSource
Extracted from Daily Compiler Code Quality Report - 2026-08-03
Priority
Medium - improves test coverage for non-trivial logic but not blocking.