Commit 2ef93c0
authored
`loopover_check_test_evidence` was documented as modeled on `checkSlopRisk`, but
its shape only had `changedPaths`/`testFiles` and its handler called
`classifyTestCoverage(allPaths)` directly, never consulting `hasLocalTestEvidence`.
So a caller whose only evidence is free-text (e.g. "ran `go test ./...` locally,
no new file") got an "absent" verdict from this tool, even though
`loopover_check_slop_risk` and `loopover_suggest_boundary_tests` correctly credit
the exact same evidence via the shared `hasLocalTestEvidence` helper.
- Add an optional `tests` field to `checkTestEvidenceShape`, same bounds as the
sibling shapes (`z.array(z.string().max(400)).max(2000).optional()`).
- Import `hasLocalTestEvidence` and, in the handler, override an otherwise-
"absent" classification to "adequate" (with testFileCount >= 1) only when
`hasLocalTestEvidence({ tests, testFiles })` is true, plus a distinct guidance
line noting the evidence came from the free-text field.
- The override applies ONLY above "absent": weak/adequate/strong path-based
classifications are returned unchanged, so the tool never becomes more lenient
than the path signal once real test-file evidence exists.
Adds three test cases to test/unit/mcp-check-test-evidence.test.ts: free-text-only
evidence lifts absent→adequate with distinct guidance; an empty `tests: []` stays
absent; and a weak path classification stays weak (override does not fire above
absent).
Closes #6618
1 parent 8b20ad6 commit 2ef93c0
2 files changed
Lines changed: 56 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
| 1185 | + | |
1185 | 1186 | | |
1186 | 1187 | | |
1187 | 1188 | | |
| |||
3640 | 3641 | | |
3641 | 3642 | | |
3642 | 3643 | | |
3643 | | - | |
3644 | 3644 | | |
3645 | | - | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
3646 | 3657 | | |
3647 | 3658 | | |
3648 | 3659 | | |
| 3660 | + | |
| 3661 | + | |
3649 | 3662 | | |
3650 | 3663 | | |
3651 | 3664 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
66 | 106 | | |
0 commit comments