feat(review): add a category-tally line to the unified review comment (#2150) - #3865
Conversation
…JSONbored#2150) Adds a compact, deterministic one-liner of the finding mix (e.g. "2 correctness · 1 security · 1 style") to the unified comment so maintainers see the category spread at a glance. Pure aggregation + render; no AI, no gate impact. - unified-comment.ts: pure tallyFindingCategories(findings) — counts CATEGORIZED findings, ordered by count desc then category name asc (deterministic); a local UnifiedFindingCategory type keeps this renderer self-contained (no cross-module import). Rendered as a one-line summary right after the blockers section; omitted entirely when no finding carries a category ⇒ byte-identical. New optional UnifiedReviewInput.inlineFindings (structural { category? } shape) supplies it. - Tests: tally ordering (count desc, name-tie asc), single category, uncategorized ignored, empty; render line present with categorized findings, omitted (byte-identical) when none. Verified: full suite (npm run test) green — 10577 passed, 0 failed.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-06 20:29:01 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3865 +/- ##
=======================================
Coverage 93.48% 93.48%
=======================================
Files 333 333
Lines 33172 33182 +10
Branches 12134 12138 +4
=======================================
+ Hits 31011 31021 +10
Misses 1530 1530
Partials 631 631
🚀 New features to boost your workflow:
|
Closes #2150.
Adds a compact, deterministic one-liner of the finding mix (e.g.
2 correctness · 1 security · 1 style) to the unified comment, so maintainers see the category spread at a glance. Pure aggregation + render — no AI, no gate impact.What's here
unified-comment.ts— puretallyFindingCategories(findings): counts categorized findings, ordered by count desc then category name asc (deterministic). A localUnifiedFindingCategorytype keeps this renderer self-contained (no cross-module import, matching the module's convention). Rendered as a one-line summary right after the blockers section; omitted entirely when no finding carries a category ⇒ byte-identical. A new optionalUnifiedReviewInput.inlineFindings(structural{ category? }shape, so anInlineFinding[]is assignable without importing it) supplies the data — absent by default ⇒ byte-identical.Validation
Full suite (
npm run test):Typecheck clean.