Skip to content

fix(signals): classify Perl and Scala protobuf stubs as generated - #3715

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

fix(signals): classify Perl and Scala protobuf stubs as generated#3715
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/signals-perl-scala-protobuf-generated

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

Extend isGeneratedFile to recognize protoc Perl message stubs (*_pb.pm) and Scala message stubs (.pb.scala), matching the existing .pb.* plugin coverage for Go/TS/JS/C++/Rust/Elixir/etc. Includes positive/negative isGeneratedFile / classifyChangedFile assertions and classification-table entries.

Fixes #2144

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 supporting the changed-files summary pipeline (#2144). Does not deliver summarizeChangedFiles grouping — only closes generated-classification gaps for Perl/Scala protoc output.

Conflict avoidance: Touches only src/signals/path-matchers.ts and test/unit/path-matchers.test.ts. Zero overlap with open PRs (#3714 config docs, #3712 visual shot bounds, #3704 miner calibration types, #3702 miner README, #3698 ignored-author gate, #3688 scroll GIF capture).

Made with Cursor

Recognize protoc Perl *_pb.pm and Scala .pb.scala output in isGeneratedFile
so generated-only diffs classify correctly for slop signals and the
changed-files summary classifier dependency.

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

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

⏸️ Suggested Action - Manual Review

Review summary
This PR extends the protoc-generated-file matcher to recognize Perl (`*_pb.pm`) and Scala (`.pb.scala`) stub conventions, mirroring the existing per-language patterns in `isGeneratedFileFrom`. The regex changes are correctly scoped (Scala added to the existing `.pb.(...)` alternation group, Perl added as its own `_pb\.pm$` anchor, consistent with the Ruby/PHP/Nim/Lua `_pb.*` precedent), and both new tests exercise positive (`gen/service_pb.pm`, `proto/messages.pb.scala`), negative (`lib/MyApp.pm`, `src/Main.scala`), and `classifyChangedFile` cases. The change is narrow, additive, and does not touch any other classification path.

Nits — 3 non-blocking
  • The doc comment above the `.pb.(...)` regex (src/signals/path-matchers.ts) was extended in-place to fold in the Scala mention, producing one very long line — consider splitting it onto its own line for readability like the Perl comment above `_pb\.pm$` was.
  • No test asserts that a non-protobuf file merely containing `pb` in a Scala/Perl filename (e.g. `src/PbUtils.scala`) is NOT misclassified as generated — low risk given the `.pb.` infix requirement, but would tighten the negative-case coverage already established for other languages.
  • Keep following the same `_pb.<ext>` vs `.pb.<ext>` split convention documented in the surrounding comments if further language plugins are added later, since two different generator naming schemes are in play (message-stub suffix vs plugin infix).
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2144
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

@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.36%. Comparing base (762a569) to head (6a5dae6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3715   +/-   ##
=======================================
  Coverage   93.36%   93.36%           
=======================================
  Files         315      315           
  Lines       32204    32204           
  Branches    11812    11812           
=======================================
  Hits        30066    30066           
  Misses       1507     1507           
  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 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 bddbfa0 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(review): group changed files by class with +/- counts and large-group collapse

1 participant