feat(review): multi-line suggestion blocks with range validation (#2141) - #4048
Conversation
…Nbored#2141) Add optional endLine to inline findings, resolve multi-line GitHub anchors when every RIGHT-side line in the range is commentable, and strip suggestions when any line in the range is not added. Extract pure range logic to inline-comment-range.ts with unit tests. Co-authored-by: Cursor <cursoragent@cursor.com>
…SONbored#2141) Cover missing branches in rightLinesByPath, anchor downgrade paths, composeInlineFindings endLine merge, and multi-line GitHub post payload. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 14:13:36 UTC
⏸️ Suggested Action - Manual Review 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 #4048 +/- ##
=======================================
Coverage 93.58% 93.58%
=======================================
Files 382 383 +1
Lines 35538 35573 +35
Branches 13030 13045 +15
=======================================
+ Hits 33257 33292 +35
Misses 1618 1618
Partials 663 663
🚀 New features to boost your workflow:
|
Summary
endLinetoInlineFinding+ parser; carry throughcomposeInlineFindingsinline-comment-range.tsto validate contiguous RIGHT-side ranges and downgrade to single-line when any line is un-commentableReviewInlineComment/ GitHub review payload withstart_line/start_side; multi-line suggestions require every line in the range to be ADDED (feat(review): anchor-safety validation drops un-commentable suggested changes #2140 anchor-safety)Fixes #2141
Test plan
inline-comment-range.test.ts— range parse, every-line check, anchor resolve/downgradeinline-comments.test.ts— multi-line suggestion kept, partial-range downgrade, context-line suggestion strippedinline-suggestion-anchor.test.ts— multi-line added vs context rangesai-review.test.ts— parser accepts/dropsendLine, compose merge carriesendLinenpx tsc -p tsconfig.json --noEmitpasses locallyMade with Cursor