Skip to content

feat(signals): treat __fixtures__ and __mocks__ paths as test evidence - #2105

Closed
kiannidev wants to merge 2 commits into
JSONbored:mainfrom
kiannidev:feat/test-evidence-fixtures-mocks
Closed

feat(signals): treat __fixtures__ and __mocks__ paths as test evidence#2105
kiannidev wants to merge 2 commits into
JSONbored:mainfrom
kiannidev:feat/test-evidence-fixtures-mocks

Conversation

@kiannidev

Copy link
Copy Markdown
Contributor

Summary

  • Count Jest/Vitest __fixtures__ and __mocks__ directories as test paths in isTestPath.
  • Improves missing-test-evidence classification when fixture/mock files accompany source changes.

No-issue rationale

Small slop/test-evidence hardening with no linked issue.

Test plan

  • npx vitest run test/unit/test-evidence.test.ts

Made with Cursor

Count Jest and Vitest fixture/mock directories when classifying local test
coverage and slop missing-test-evidence signals.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kiannidev
kiannidev requested a review from JSONbored as a code owner July 1, 2026 09:08
@dosubot dosubot Bot added the size:XS label Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (a52c3b0) to head (d71c8fa).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #2105       +/-   ##
==========================================
- Coverage   95.71%       0   -95.72%     
==========================================
  Files         222       0      -222     
  Lines       24653       0    -24653     
  Branches     8945       0     -8945     
==========================================
- Hits        23597       0    -23597     
+ Misses        433       0      -433     
+ Partials      623       0      -623     

see 222 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - reject/close recommended

Review updated: 2026-07-01 11:38:52 UTC

2 files · 1 AI reviewer · 1 blocker · readiness 48/100 · CI green · blocked

🛑 Suggested Action - Reject/Close

  • AI reviewers agree on a likely critical defect: src/signals/engine.ts:isTestFile still omits `__fixtures__` and `__mocks__`, so a PR that only adds `src/__fixtures__/user.json` or `lib/__mocks__/fetch.ts` will be counted as test evidence by `src/signals/test-evidence.ts:isTestPath` but not by the engine's duplicate matcher. — Resolve the flagged defect, or override if the AI reviewers are mistaken, then re-run the gate.

Review summary
This change correctly extends `isTestPath` and its direct unit coverage, but it only updates one of the repository's test-path classifiers. The signals engine still has a separate hard-coded `isTestFile` matcher, so the advertised fixture/mock evidence behavior remains inconsistent on the engine path that consumes its local classifier.

Blockers

  • src/signals/engine.ts:isTestFile still omits `__fixtures__` and `__mocks__`, so a PR that only adds `src/__fixtures__/user.json` or `lib/__mocks__/fetch.ts` will be counted as test evidence by `src/signals/test-evidence.ts:isTestPath` but not by the engine's duplicate matcher.
Nits — 5 non-blocking
  • Replace the duplicate matcher in `src/signals/engine.ts:isTestFile` with the shared `isTestPath` helper, or update both matchers in the same patch with a reason for keeping them separate.
  • Add an engine-level regression test that drives the production signal path with `__fixtures__` and `__mocks__` paths, not only the standalone helper in `test/unit/test-evidence.test.ts`.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

Why this is blocked

  • src/signals/engine.ts:isTestFile still omits `__fixtures__` and `__mocks__`, so a PR that only adds `src/__fixtures__/user.json` or `lib/__mocks__/fetch.ts` will be counted as test evidence by `src/signals/test-evidence.ts:isTestPath` but not by the engine's duplicate matcher.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (size label size:XS; no linked issue context).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 2833 registered-repo PR(s), 1581 merged, 51 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kiannidev; Gittensor profile; 2833 PR(s), 51 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: kiannidev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: TypeScript, C++, HTML, MDX, Rust
  • Official Gittensor activity: 2833 PR(s), 51 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (PR #2272)
Contributor next steps
  • Explain no-issue PR.
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Await review-lane availability.
  • Triage stale or unlinked PRs.
  • Refresh registry data or choose a registered active repo.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing, see review for blockers.

src/signals/engine.ts:isTestFile still omits `__fixtures__` and `__mocks__`, so a PR that only adds `src/__fixtures__/user.json` or `lib/__mocks__/fetch.ts` will be counted as test evidence by `src/signals/test-evidence.ts:isTestPath` but not by the engine's duplicate matcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants