Skip to content

feat(review): multi-line ```suggestion blocks via RIGHT-side range validation #2141

Description

@JSONbored

Support multi-line suggested changes: a finding may carry a start/end line range that maps to a GitHub multi-line inline comment with a ```suggestion block spanning the range. Depends on the single-line render + anchor-safety slices; validates the whole contiguous range is commentable before emitting.

Deliverables

  • Add optional endLine? (or a startLine/line pair) to InlineFinding (src/services/ai-review.ts:215) + parser (src/services/ai-review.ts:414)
  • Extend ReviewInlineComment (src/review/inline-comments.ts:38) to carry start_line/start_side for GitHub multi-line comments
  • In selectInlineComments, require EVERY line in [start,end] to be in rightSideLinesFromPatch; else downgrade to the single anchored line (no 422)
  • Tests: full-range valid, partial-range invalid → downgrade, inverted range guard, single-line still works, all branches

References

  • src/review/inline-comments.ts:38
  • src/review/inline-comments.ts:79
  • src/services/ai-review.ts:215
  • part of #1956

Part of #1956.


size: S · held for later release (gittensor:feature once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions