Skip to content

fix(mcp): sync score-preview isCodeFile mirrors with isSourcePath (.kts)#3921

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/mcp-iscodefile-kts-parity
Closed

fix(mcp): sync score-preview isCodeFile mirrors with isSourcePath (.kts)#3921
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/mcp-iscodefile-kts-parity

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Follow-up to merged #3889: the server now recognizes .kts Gradle Kotlin-script source via isSourcePath, but the standalone MCP mirrors still omitted .kts from isCodeFile while isTestPath already knew SomethingTests.kts. That let local score previews misclassify Kotlin-script-only diffs as non-code.

This PR adds .kts to:

  • packages/gittensory-mcp/scripts/gittensor-score-preview.mjs
  • packages/gittensory-mcp/scripts/gittensor-score-preview.py (metadata_fallback)
  • packages/gittensory-mcp/lib/local-branch.js

Also adds a structural guard that isSourcePath and EXTENDED_SOURCE_EXTENSION extension sets stay disjoint, plus regression tests in the MCP/score-preview suites.

Closes #2235

Notes on scope

#2235 tracks the hosted gittensory_check_test_evidence MCP tool. This PR only lands the classifier parity prerequisite so local MCP previews agree with the server gate on .kts paths before that tool is built. If merge auto-closes #2235 with deliverables still open, please reopen it for the remaining tool/schema work.

Validation

  • npm test -- test/unit/path-matchers.test.ts test/unit/local-branch.test.ts test/unit/score-preview-script.test.ts (120 tests passed locally)
  • CI validate-code + validate green on this PR

Safety

  • No secrets, auth, API, UI, or migration changes.
  • Classifier-only parity fix in MCP mirrors; behavior-preserving for previously-covered extensions.

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 7, 2026 06:35
@superagent-security

Copy link
Copy Markdown
Contributor

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

Add .kts to the MCP local-branch and score-preview classifiers so Gradle Kotlin-script source counts as code in local score previews, matching merged JSONbored#3889 server isSourcePath behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-07 06:45:39 UTC

6 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
Straightforward classifier-parity fix: adds ".kts" to the isCodeFile regex/tuple in three MCP mirror files (local-branch.js, gittensor-score-preview.mjs/.py) so Gradle Kotlin-script source is recognized as code, matching the server's isSourcePath behavior from #3889. The change is a single alternation addition per file, regex alternation ordering (kt before kts) does not cause any matching bug since the engine backtracks correctly, and the PR adds solid regression tests (both .mjs/.py preview outputs, isCodeFile/isTestFile unit assertions, and a structural guard asserting the core/extended source-extension sets stay disjoint). CI is fully green and the diff is narrow and behavior-preserving for previously-covered extensions.

Nits — 4 non-blocking
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2235
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 234 registered-repo PR(s), 65 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 234 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Ruby, Svelte, TypeScript, Cuda, Markdown
  • Official Gittensor activity: 234 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.58%. Comparing base (61109fe) to head (88a0ab5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3921   +/-   ##
=======================================
  Coverage   93.58%   93.58%           
=======================================
  Files         358      358           
  Lines       34342    34342           
  Branches    12570    12570           
=======================================
  Hits        32138    32138           
  Misses       1580     1580           
  Partials      624      624           
🚀 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 7, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (Linked issue #2235 is assigned to the maintainer (@JSONbored) — that work is reserved for the maintainer, so this PR cannot be auto-accepted.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

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.

feat(mcp): add gittensory_check_test_evidence tool (deterministic coverage-gap self-check)

1 participant