feat(signals): recognize testdata paths as test evidence - #2272
feat(signals): recognize testdata paths as test evidence#2272luciferlive112116 wants to merge 7 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-01 18:05:57 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 3 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Fixed gate blocker: removed the contradictory negative assertion for src/testdata/client.ts - any path with a /testdata/ directory segment is valid test evidence per the matcher. Updated PR description accordingly. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2272 +/- ##
=======================================
Coverage 95.71% 95.71%
=======================================
Files 222 222
Lines 24661 24661
Branches 8949 8949
=======================================
Hits 23605 23605
Misses 433 433
Partials 623 623
🚀 New features to boost your workflow:
|
JSONbored
left a comment
There was a problem hiding this comment.
Minor issues:
The added regression cases cover the shared helper and the local-branch delegation path; the main remaining maintainability concern is the duplicated classifier logic in `src/signals/engine.ts`.
Summary
Go and other ecosystems place fixture inputs under a
testdata/directory (sibling to_test.gofiles).isTestPathinsrc/signals/test-evidence.tsalready recognizes__tests__/,*_test.go, and__snapshots__/, but nottestdata/, so PRs that only add or update golden/fixture files underpkg/foo/testdata/were misclassified as missing test evidence by slop, reviewability, and local-branch scoring surfaces.This counts any path containing a
testdata/directory segment as test evidence (e.g.pkg/auth/testdata/golden.jsonandsrc/testdata/client.ts), matching the Go convention.Also adds the same
testdata/segment matcher toengine.ts:isTestFileso engine-driven signal paths stay aligned withlocal-branch.ts(which delegates toisTestPath). No linked-issue rationale changes — those belong in separate PRs (#2117 / #2271).Distinct from #2105 (fixtures/mocks path segments); this PR only adds the
testdata/directory convention.No linked issue: small, self-evident slop/test-evidence hardening with no open tracker;
linkedIssuePolicyispreferred.Scope
feat(signals): …) forgittensor:featurescoring.CONTRIBUTING.md; no UI/API/schema/migration changes.Validation
git diff --checknpm run typechecknpm run test:coverage— extendedtest evidence helpersandlocal-branch-file-classifierswith positivetestdata/cases and boundary negatives (contestdata,testdatabase); engineisTestFileadds matchingtestdata/segment.npm run test:ciIf any required check was skipped, explain why:
Safety
Notes
isTestPath("pkg/auth/testdata/golden.json")returnedfalse(should betrue); after the fix it returnstruefor any path with a/testdata/segment on both shared and engine classifiers.