Skip to content

test(signals): cover isTestFile and isCodeFile path classifiers - #947

Merged
2 commits merged into
JSONbored:mainfrom
jason020818:test/local-branch-file-classifiers
Jun 20, 2026
Merged

test(signals): cover isTestFile and isCodeFile path classifiers#947
2 commits merged into
JSONbored:mainfrom
jason020818:test/local-branch-file-classifiers

Conversation

@jason020818

Copy link
Copy Markdown
Contributor

Summary

Adds unit coverage for isTestFile and isCodeFile in src/signals/local-branch.ts — pure path classifiers that decide whether a changed file is a test or a production source file.

Why

These helpers feed file-level signal logic but had no direct tests; the existing local-branch.test.ts exercises only buildLocalBranchAnalysis/findCurrentBranchPullRequest. The new table covers every isTestFile branch (test/spec directories, src/test, _test.{go,py,rb}, _spec.rb, dotted .test/.spec) plus near-miss negatives (testing/, contest/, helper_test.ts, config_spec.py), and isCodeFile's full extension set together with its test-file exclusion.

Validation

npx vitest run test/unit/local-branch-file-classifiers.test.ts

No product behavior changes; tests only.

@jason020818
jason020818 requested a review from JSONbored as a code owner June 20, 2026 17:20
@dosubot dosubot Bot added the size:XS label Jun 20, 2026
@ghost ghost added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 20, 2026
@ghost

ghost commented Jun 20, 2026

Copy link
Copy Markdown

🔍 Maintainer review

Reviewed 1 file(s) — ✅ all CI green.

Suggested action:Safe to merge — both reviewers found no blocking issues.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR adds comprehensive unit tests for the isTestFile and isCodeFile path classifiers. The tests cover positive and negative cases across various languages and directory patterns, respect the project's public/private sanitization rules, and do not introduce security concerns. No production code is altered, so maintainability impact is minimal and regression risk is low. Assuming CI passes, the changes are safe and improve test coverage.

No blocking issues spotted.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
Adds comprehensive unit tests for isTestFile and isCodeFile classifiers covering various file path patterns, extensions, and edge cases. No production code changes, so no security or correctness risks introduced.

No blocking issues spotted.

@ghost ghost added the reviewbot-review label Jun 20, 2026
@ghost

ghost commented Jun 20, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #947 is no longer open. No action.

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

@ghost ghost added the gittensory:reviewed label Jun 20, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (64b152d) to head (d8a3fcd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #947   +/-   ##
=======================================
  Coverage   96.62%   96.62%           
=======================================
  Files         110      110           
  Lines       15006    15006           
  Branches     5423     5423           
=======================================
  Hits        14500    14500           
  Misses        104      104           
  Partials      402      402           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Both reviewers approved, all CI is green, and this is a small, low-risk change — auto-merging.

@ghost
ghost merged commit d9382c0 into JSONbored:main Jun 20, 2026
17 checks passed
@ghost ghost removed reviewbot-review labels Jun 20, 2026
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant