feat(signals): add test-coverage classification to test-evidence - #1046
Conversation
Add `classifyTestCoverage()` which maps a list of changed paths to a `TestCoverageClassification` band — `strong` (≥40% test ratio), `adequate` (≥20%), `weak` (>0% but below 20%), or `absent` (no test files at all). Slop signals currently detect the presence of any test file but have no lightweight way to express how well-covered a change is relative to its source footprint. This helper fills that gap: callers pass the full list of changed paths and receive a single band they can include in advisory output or weight against the contribution score. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary Suggestions
Risks
Nits — 1 non-blocking
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. The PR introduces a new `classifyTestCoverage` helper with comprehensive unit tests. The implementation correctly handles empty inputs, counts test files using existing `isTestPath`, and applies the specified ratio thresholds. All CI checks pass, and no build or runtime issues are evident. Suggestions
Risks
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1046 +/- ##
=======================================
Coverage 95.28% 95.28%
=======================================
Files 149 149
Lines 18053 18060 +7
Branches 6535 6539 +4
=======================================
+ Hits 17202 17209 +7
Misses 363 363
Partials 488 488 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 🛠️ Maintainer review — Held for maintainer reviewReviewed 2 changed file(s) — two independent AI reviewers, synthesized. ✅ Safe to merge — both reviewers found no blocking issues.
Merge readiness: ✅ Mergeable · all CI checks green/neutral/skipped. Summary The change introduces a pure utility for classifying test coverage and adds comprehensive unit tests. The implementation follows project conventions, does not expose any security concerns, and all CI checks pass. No correctness or safety defects are found. 💡 Nits — non-blocking, optional
|
ghost
left a comment
There was a problem hiding this comment.
Held for maintainer (guardrail_area) — correct + CI green
ghost
left a comment
There was a problem hiding this comment.
Gittensory approves — the gate is satisfied and CI is green.
Route local-branch scoring through the shared test path matcher so slop classification and branch previews never drift when test-evidence gains new conventions (JSONbored#1046). Co-authored-by: Cursor <cursoragent@cursor.com>
Route local-branch scoring through the shared test path matcher so slop classification and branch previews never drift when test-evidence gains new conventions (#1046). Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
Add
classifyTestCoverage()which maps a list of changed paths to aTestCoverageClassificationband —strong(≥40% test ratio),adequate(≥20%),weak(>0% but below 20%), orabsent(no test files at all).Slop signals currently detect the presence of any test file but have no lightweight way to express how well-covered a change is relative to its source footprint. This helper fills that gap: callers pass the full list of changed paths and receive a single band they can include in advisory output or weight against the contribution score.