Skip to content

fix(signals): classify Kotlin protobuf stubs as generated#3424

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/path-matchers-pb-kt-generated
Jul 5, 2026
Merged

fix(signals): classify Kotlin protobuf stubs as generated#3424
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:fix/path-matchers-pb-kt-generated

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

  • Extend isGeneratedFile in path-matchers.ts to treat .pb.kt as protoc-generated output, matching the existing .pb.go/.pb.dart/.pb.swift handling (fix(signals): classify Dart protobuf stubs as generated #3412).
  • The Kotlin protoc plugin emits messages.pb.kt stubs; without this, classifyChangedFile miscounted them as substantive source. Hand-written .kt is unaffected — the .pb infix is required.

Scope

  • Conventional Commit title format.
  • Focused — path-matchers + unit tests only.
  • Follows CONTRIBUTING.md.
  • No linked issue needed.

Validation

  • git diff --check
  • npm run test:ci on Node 22
  • npm audit --audit-level=moderate — 0 vulnerabilities
  • Unit test covers proto/messages.pb.kt as generated and src/service.kt as non-generated

Safety

  • No secrets, auth, or UI changes.
  • N/A for UI Evidence.

UI Evidence

N/A — backend path classifier only.

Notes

Conflict avoidance: Touches only src/signals/path-matchers.ts and test/unit/path-matchers.test.ts. Zero overlap with open PRs (#3419 integrations, #3418 orb-broker, #3417/#3415 selfhost, #3414 review-evasion, #3413/#3406 engine, #3379 selfhost, #3314 miner, #3305 enrichment-wire, #3304 queue/gate). Merges cleanly after any of those land without rebase.

Made with Cursor

protoc's Kotlin plugin emits .pb.kt message stubs; slop already
treated .pb.dart/.pb.swift as generated but missed .pb.kt, so
machine output was miscounted as substantive source.

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

Copy link
Copy Markdown

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

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

gittensory-orb Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

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

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-05 06:45:49 UTC

2 files · 1 AI reviewer · no blockers · readiness 80/100 · CI pending · blocked

⏸️ Suggested Action - Manual Review

Review summary
This change correctly extends the existing protobuf generated-file matcher to include Kotlin `.pb.kt` stubs while preserving the `.pb` infix requirement, so ordinary Kotlin source remains classified normally. The unit test covers both the new generated path and a hand-written `.kt` sibling, and the implementation stays in the same path-only matcher layer used by `classifyChangedFile`. I do not see a reachable correctness issue in the visible diff.

Nits — 4 non-blocking
  • test/unit/path-matchers.test.ts:71 nit: The test name still says it covers Swift protobuf, Dart, and C# codegen even though the same case now also covers Kotlin protobuf stubs; rename it to include Kotlin so future readers can find the regression coverage quickly.
  • test/unit/path-matchers.test.ts:71 Rename the case to something like `matches Swift/Kotlin protobuf, Dart freezed/retrofit, and C# designer/XAML codegen`.
  • test/unit/path-matchers.test.ts:296 Consider adding `proto/messages.pb.kt` to the `classifyChangedFile` representative table as `generated`; `isGeneratedFile` already proves the matcher, but the table would document the end-to-end classifier behavior this PR is fixing.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
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 (no linked issue context).
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: 58 registered-repo PR(s), 31 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 58 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: not available
  • Official Gittensor activity: 58 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.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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.46%. Comparing base (c130490) to head (10f98bc).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3424   +/-   ##
=======================================
  Coverage   93.46%   93.46%           
=======================================
  Files         291      291           
  Lines       30790    30790           
  Branches    11221    11221           
=======================================
  Hits        28779    28779           
  Misses       1355     1355           
  Partials      656      656           
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.

@JSONbored JSONbored merged commit a42372f 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.5x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants