Skip to content

feat(review): title-cased category labels on inline comments (#2149) - #3936

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/inline-comment-category-label-2149
Jul 7, 2026
Merged

feat(review): title-cased category labels on inline comments (#2149)#3936
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bohdansolovie:feat/inline-comment-category-label-2149

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

  • Add pure inline-comment-label.ts to format inline severity labels with an optional title-cased category (Blocker · Security)
  • Update formatInlineBody to use the new label style when review.finding_categories is enabled; default-off path stays severity-only
  • Keep the deterministic classifyFindingCategory fallback when the model omits a category

Fixes #2149

Test plan

  • inline-comment-label.test.ts — title-case helper, enabled/disabled labels, classifier fallback
  • inline-comments.test.ts — updated category-tag expectations + e2e wiring
  • queue.test.ts — inline comment integration expects Nit · Security label
  • npx tsc -p tsconfig.json --noEmit passes locally
  • CI green including codecov/patch ≥99%

Made with Cursor

…ed#2149)

Extract pure inline-comment label formatting and render enabled
categories as `Blocker · Security` instead of parenthetical tags.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-07 07:22:10 UTC

5 files · 1 AI reviewer · no blockers · readiness 96/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR extracts the inline-comment severity/category label into a pure `inline-comment-label.ts` helper and switches the rendered format from `Nit (style)` to `Nit · Style`, title-casing the category via a simple first-char capitalization. The refactor correctly centralizes `classifyFindingCategory` fallback logic behind `formatInlineCommentSeverityLabel`, the default-off (categories disabled) path is unchanged and still severity-only, and the diff's tests (unit + queue.test.ts) are updated consistently with the new format. The change is narrow, behavior is verified end-to-end through `selectInlineComments`/`maybePostInlineComments`, and CI including codecov passed.

Nits — 3 non-blocking
  • src/review/inline-comment-label.ts:7-9 — `titleCaseFindingCategory` only capitalizes the first character of the whole string; confirm every `FindingCategory` enum literal is a single word (the visible set — security, correctness, style, maintainability, tests — all are), since a hyphenated or multi-word literal would render only the first word capitalized (e.g. `Best-practices` instead of `Best Practices`).
  • Purely cosmetic label-format change (parenthetical → middot-separated title case) with no behavior change beyond string formatting — low risk, well covered by tests.
  • Consider a small comment or test case in inline-comment-label.test.ts asserting titleCaseFindingCategory's behavior on a multi-word category if one exists in the FindingCategory union, to guard against future enum additions that break the simple char-uppercase assumption.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2149
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 (draft PR; 1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 371 registered-repo PR(s), 213 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 371 PR(s), 7 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: bohdansolovie
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, C++, JavaScript
  • Official Gittensor activity: 371 PR(s), 7 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Mark ready when done.
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 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.66%. Comparing base (4942547) to head (2a3efa8).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3936   +/-   ##
=======================================
  Coverage   93.66%   93.66%           
=======================================
  Files         372      373    +1     
  Lines       34856    34860    +4     
  Branches    12743    12744    +1     
=======================================
+ Hits        32649    32653    +4     
  Misses       1588     1588           
  Partials      619      619           
Files with missing lines Coverage Δ
src/review/inline-comment-label.ts 100.00% <100.00%> (ø)
src/review/inline-comments.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bohdansolovie
bohdansolovie marked this pull request as ready for review July 7, 2026 07:20
@bohdansolovie
bohdansolovie requested a review from JSONbored as a code owner July 7, 2026 07:20
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 31e744b into JSONbored:main Jul 7, 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): show finding category label on inline comments

1 participant