| id | 2607051919 |
|---|---|
| title | Add dedicated unit tests for helpers added by the word-list and reflow features |
| status | ✅ |
| model | sonnet |
| summary | Several unexported helpers added for word-lists, no-llm-tells, line-length reflow, and the concisenessscoring classifier are only exercised transitively, with no TestFoo by name. Flagged by the 2026-07-05 audit. |
Give every unexported helper flagged by the 2026-07-05
audit its own TestFoo (or TestReceiver_Foo) test.
This follows the test pyramid's "every function has a
dedicated unit test"
rule.
The 2026-07-05 audit found these new helpers. Each one is covered only indirectly, through an end-to-end test of its caller:
internal/wordlist/wordlist.go:allNames,flatteninternal/config/wordlist_files.go:toWordlistMap,stripLists,resolveListEntries,expandRuleLists(these three have zero test-file references at all)internal/convention/nollmtells.go:llmVocabulary,llmPhrases,llmVocabularyAndPhrases,llmParagraphOpenersinternal/rules/linelength/fix.goandreflow.go:overlapsGeneratedRange,trimTrailingCR,cloneBytes,paragraphHasRawHTMLinternal/rules/concisenessscoring/classifier/model.go:buildPhraseMarkers
stringsToAny/toAnySlice also appeared in the audit's
test-debt list. They are handled instead by
plan/2607051918,
which replaces them outright, so no separate test is
needed here.
internal/wordlist/wordlist_test.go: addTestAllNamesandTestFlattencovering the empty, single-entry, andextends-chain cases.internal/config/wordlist_files_test.go(create if missing): addTestToWordlistMap,TestStripLists,TestResolveListEntries,TestExpandRuleLists.internal/convention/nollmtells_test.go: addTestLlmVocabulary,TestLlmPhrases,TestLlmVocabularyAndPhrases,TestLlmParagraphOpeners— each asserting non-empty output and a couple of known entries, mirroring the existingTestNoLLMTellsWordlistsstyle.internal/rules/linelength/fix_test.go/reflow_test.go: addTestOverlapsGeneratedRange,TestTrimTrailingCR,TestCloneBytes,TestParagraphHasRawHTML.internal/rules/concisenessscoring/classifier/model_test.go: addTestBuildPhraseMarkers.go test ./...passes.- Confirm the allocation-budget test
(
internal/integration/alloc_budget_test.go) still passes — new tests must not touch ruleCheckhot paths.
- Every helper named above has a dedicated test by
name in a sibling
_test.gofile. -
go test ./...is green. -
mdsmith check .is green.