feat(review): parse inline finding category with safe default (#2147) - #4231
Conversation
…red#2147) Normalize model-emitted category values to the fixed enum in a pure parser module so absent or unknown categories default to maintainability instead of being dropped during parseModelReview. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 19:07:25 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Linked issue satisfactionPartially addressed 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.
|
…bored#2147) Align parseModelReview and runGittensoryAiReview expectations with the new maintainability default when the model omits or mis-emits category. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4231 +/- ##
=======================================
Coverage 93.76% 93.76%
=======================================
Files 390 391 +1
Lines 36553 36554 +1
Branches 13389 13388 -1
=======================================
+ Hits 34274 34275 +1
Misses 1623 1623
Partials 656 656
🚀 New features to boost your workflow:
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Summary
inline-finding-category-parse.tswithparseInlineFindingCategory— valid enum literals pass through; unknown or absent values default tomaintainabilitytoInlineFindingsso parsed model output always carries a fixedcategoryfieldai-review.test.tsexpectations for absent/unknown categories; add dedicated parser unit testsFixes #2147
Test plan
inline-finding-category-parse.test.ts— each valid enum literal, unknown/absent/non-string →maintainabilityai-review.test.ts—parseModelReviewkeeps valid categories and defaults unknown/absent tomaintainabilitynpx tsc -p tsconfig.json --noEmitpasses locallyMade with Cursor