Skip to content

fix(signals): classify Java gRPC service stubs as generated - #3598

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/signals-java-grpc-generated
Jul 5, 2026
Merged

fix(signals): classify Java gRPC service stubs as generated#3598
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/signals-java-grpc-generated

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

Extend isGeneratedFile to recognize grpc-java service stubs (*Grpc.java), matching the existing Swift .grpc.swift and Kotlin GrpcKt.kt conventions. Includes positive/negative isGeneratedFile / classifyChangedFile assertions and a classification-table entry.

Fixes #1957

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an open issue (Changed-files summary table in the unified review comment #1957 changed-files summary depends on accurate path-matchers classification).

Validation

  • git diff --check
  • npm run test:ci on Node 22
  • npm audit --audit-level=moderate — 0 vulnerabilities
  • Unit tests cover isGeneratedFile, classifyChangedFile, and the representative cases table

If any required check was skipped, explain why:

  • None skipped.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • No auth, cookie, CORS, GitHub App, Cloudflare, or session changes.
  • N/A for UI Evidence.

UI Evidence

N/A — signals-only change with no visible UI.

Notes

Incremental path-matcher parity for #1957 (group changed files by source/test/docs/config/generated via path-matchers). Does not deliver the summary-table renderer — only closes a generated-classification gap for grpc-java stubs.

Conflict avoidance: Touches only src/signals/path-matchers.ts and test/unit/path-matchers.test.ts. Zero overlap with open PRs (#3595 pg-queue, #3594 enrichment exhaustiveness-drift).

Made with Cursor

Recognize grpc-java *Grpc.java service stubs in isGeneratedFile so
generated-only diffs classify correctly for slop signals and the
changed-files summary path-matcher dependency.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 5, 2026 18:29
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 5, 2026
@loopover-orb

loopover-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 18:34:05 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This is a narrow, well-scoped fix that adds a `/grpc\.java$/` regex to `isGeneratedFileFrom` in src/signals/path-matchers.ts, following the exact same convention already used for Swift (`.grpc.swift`) and Kotlin (`grpckt.kt`) gRPC stubs. The change is correct: since `norm` is already lowercased, the regex matches any path ending in `grpc.java` (e.g. `GreeterGrpc.java`) while leaving hand-written sources like `Greeter.java` unmatched, exactly as the new tests assert. Tests cover both `isGeneratedFile` and `classifyChangedFile` positive/negative cases and add a row to the representative classification table, consistent with the file's existing test structure.

Nits — 3 non-blocking
  • The bare `/grpc\.java$/` pattern (like the existing `grpckt\.kt$` one) would also match a literal file named `grpc.java` with no class-name prefix, which is an unlikely but theoretically hand-writable filename — not new to this diff, just an inherited edge case worth a comment if it ever bites.
  • The updated block comment in src/signals/path-matchers.ts:56-62 is getting long with each new plugin; consider a small per-ecosystem list structure if more gRPC languages get added, though it's a stylistic call, not required here.
  • Consider grouping the Swift/Kotlin/Java gRPC-stub regexes into a single alternation (e.g. `/\.(grpc\.swift|grpckt\.kt|grpc\.java)$/`) if more languages get added later, purely for readability — not necessary for this PR's scope.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #1957
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 ❌ 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: 115 registered-repo PR(s), 80 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 115 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jimcody1995
  • 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, JavaScript
  • Official Gittensor activity: 115 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
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 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (b98229d) to head (d102fe6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3598   +/-   ##
=======================================
  Coverage   93.19%   93.19%           
=======================================
  Files         313      313           
  Lines       31874    31874           
  Branches    11666    11666           
=======================================
  Hits        29705    29705           
  Misses       1517     1517           
  Partials      652      652           
Files with missing lines Coverage Δ
src/signals/path-matchers.ts 88.46% <ø> (ø)
🚀 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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 937ad9e into JSONbored:main Jul 5, 2026
8 checks passed
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.

Changed-files summary table in the unified review comment

1 participant