fix(signals): detect JVM/C#/Swift class-suffix test conventions - #2743
Conversation
isTestPath recognized JS/TS/Go/Python/Ruby/Cypress test files, but had no rule for the PascalCase class-suffix convention used across the JVM and adjacent ecosystems — JUnit (FooTest.java), Kotlin (FooTests.kt), ScalaTest (FooSpec.scala), Spock (FooSpec.groovy), xUnit/NUnit (FooTests.cs), and XCTest (FooTests.swift). Those files (when not under a test/ directory) were misclassified as source, understating a PR's test evidence. Add a case-sensitive `\w*(Tests?|Spec)\.(java|kt|kts|scala|cs|swift|groovy)` rule so the PascalCase suffix can't false-positive on words that merely end in test/spec (Latest.java, Contest.cs, manifest.scala). Covered with positive and false-positive cases.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2743 +/- ##
=======================================
Coverage 96.03% 96.03%
=======================================
Files 245 245
Lines 27340 27340
Branches 9930 9930
=======================================
Hits 26255 26255
Misses 460 460
Partials 625 625
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-03 10:55:00 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.
|
…x + JVM/C#/Swift) (#2753) The MCP local-branch isTestFile is a standalone inlined copy of the server's canonical isTestPath (packages/gittensory-mcp ships as a Node bin package, so it cannot import from src/). Two conventions added to isTestPath were never mirrored here: the pytest `test_*.py` prefix (#2666) and the JVM/C#/Swift `SomethingTest(s)`/`Spec` class-suffix (#2743). So the local pre-submit predictor counted Java/Kotlin/Scala/C#/Swift test classes and pytest-prefixed files as SOURCE, disagreeing with the server gate's own test-coverage classification and misleading contributors in those ecosystems about readiness. Add both rules verbatim from isTestPath (same order, same case-sensitive JVM suffix so `Latest.java`/`Contest.cs`/`manifest.scala` stay source). Adds regressions to the MCP-copy classifier test.
Summary
isTestPathrecognized JS/TS/Go/Python/Ruby/Cypress test files, but had no rule for the PascalCase class-suffix convention used across the JVM and adjacent ecosystems — JUnit (FooTest.java), Kotlin (FooTests.kt), ScalaTest (FooSpec.scala), Spock (FooSpec.groovy), xUnit/NUnit (FooTests.cs), and XCTest (FooTests.swift). Outside atest/directory those files were misclassified as source, understating a PR's test evidence.Adds a case-sensitive
\w*(Tests?|Spec)\.(java|kt|kts|scala|cs|swift|groovy)rule — case-sensitive so it cannot false-positive on words that merely end in test/spec (Latest.java,Contest.cs,manifest.scala).Validation
npx vitest run test/unit/test-evidence.test.ts— green (positives + false-positive cases)npm run typecheck— clean