Skip to content

fix(signals): classify Java protobuf message stubs as generated - #3746

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

fix(signals): classify Java protobuf message stubs as generated#3746
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/signals-java-pb-generated

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

Extend isGeneratedFile to recognize protoc Java message stubs (.pb.java), complementing the existing grpc-java *Grpc.java service-stub matcher. Includes positive/negative isGeneratedFile / classifyChangedFile assertions and a classification-table entry.

Fixes #3006

Scope

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, auth, or UI changes.
  • N/A for UI Evidence.

UI Evidence

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

Notes

Incremental path-matcher parity for #3006: Java .pb.java protobuf output now classifies as generated via classifyChangedFile, so slop signals and candidate-diff heuristics do not treat machine-generated protoc Java as hand-authored source when comparing iteration attempts.

Does not deliver the pairwise candidate-selection slice — only closes a generated-classification gap in the shared path-matcher module.

Conflict avoidance: Touches only src/signals/path-matchers.ts and test/unit/path-matchers.test.ts. Zero overlap with open PRs (#3738 enrichment auth circuit-break, #3737 changed_files_summary config test, #3724 local-branch Dart scoring, #3721 automated-review skip hold, #3712 visual shot bounds, #3704 miner calibration types, #3702 miner README, #3698 ignored-author gate).

Made with Cursor

Recognize protoc Java .pb.java message stubs in isGeneratedFile alongside
the existing grpc-java *Grpc.java service stub matcher.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 6, 2026 07:11
@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 6, 2026
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.29%. Comparing base (12a0d96) to head (a4a9052).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3746   +/-   ##
=======================================
  Coverage   93.29%   93.29%           
=======================================
  Files         317      317           
  Lines       32347    32347           
  Branches    11871    11871           
=======================================
  Hits        30179    30179           
  Misses       1537     1537           
  Partials      631      631           
Files with missing lines Coverage Δ
src/signals/path-matchers.ts 89.09% <ø> (ø)
🚀 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 6, 2026

Copy link
Copy Markdown
Contributor

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-06 07:17:49 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This diff extends the existing protoc `.pb.{ext}` generated-file regex in isGeneratedFileFrom to include `java`, mirroring the already-supported go/ts/js/cc/h/swift/dart/kt/cs/rs/ex/erl/hrl/cr/hs/scala plugin suffixes, so `.pb.java` message stubs now classify as generated. The change is additive and does not conflict with the separate pre-existing `grpc\.java$` service-stub matcher (different suffix shape), and is covered by both a positive/negative isGeneratedFile test and a classifyChangedFile table row. It's a narrow, low-risk, well-tested one-line parity fix consistent with the module's established pattern.

Nits — 3 non-blocking
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #3006
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: 118 registered-repo PR(s), 84 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 118 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: 118 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

@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 6930533 into JSONbored:main Jul 6, 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.

feat(miner): pick the best candidate fix via order-swapped pairwise self-comparison

1 participant