Full spec: docs/hardening-roadmap-2026-04-16.md#h-12
Description
packages/scoring/src/__tests__/ has 3 files vs 12 in apps/cli/. Grounding logic, tier edge cases, and red-flag handling are under-covered in the package where correctness matters most.
Current State
signal-extractor.test.ts, score-calculator.test.ts, narrative-generator.test.ts only.
- No
grounding-validator.test.ts.
Suggested Fix
Verification
Automation Hints
scope: packages/scoring/src/tests
do-not-touch: production code unless specifically required
approach: add-tests
risk: low
max-files-changed: 5
blocked-by: #5, #15
bail-if: existing scoring tests break
Priority
Medium
Full spec:
docs/hardening-roadmap-2026-04-16.md#h-12Description
packages/scoring/src/__tests__/has 3 files vs 12 inapps/cli/. Grounding logic, tier edge cases, and red-flag handling are under-covered in the package where correctness matters most.Current State
signal-extractor.test.ts,score-calculator.test.ts,narrative-generator.test.tsonly.grounding-validator.test.ts.Suggested Fix
grounding-validator.test.ts:score-calculator.test.ts:narrative-generator.test.tswith post-H-1 injection fixtures — narrative must not echo injected instructions.Verification
pnpm buildpassespnpm testpassespnpm typecheckcleanpackages/scoringtest count at least doublesgrounding-validator.tsline coverage > 90%Automation Hints
scope: packages/scoring/src/tests
do-not-touch: production code unless specifically required
approach: add-tests
risk: low
max-files-changed: 5
blocked-by: #5, #15
bail-if: existing scoring tests break
Priority
Medium