Repository navigation
fix(analyzer): correct added-line→patch-line mapping for delta re-reviews - #73
Conversation
…iews The mapping loop compared lstrip()ed patch lines against stripped added lines, but patch lines retain their '+'/' ' diff prefixes, so lstrip() never removed them and the mapping was always empty. The get(i, i) fallback then misaligned indices whenever context lines preceded a finding — the synchronize re-review (delta) case — silently dropping error-handling findings on re-sync. Fix: strip the diff prefix before comparing. Verified against the live PR #72 delta (0 findings -> 1) and full PR diff (regression: 2 findings). Regression test added; suite 551 passing.
✨ Review Required@ChonSong:
🤖 Generated by Riptide · deterministic analysis (Phase 1) + ELI5 enrichment (Phase 2) · |
|
Warning Review limit reached
Next review available in: 54 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

Summary
Live-test discovery (PR #72 sync path): deterministic re-review on
synchronizewas silently dropping error-handling findings. The first sync (full diff) flaggedException silently ignored, but subsequent delta re-reviews reported 0 findings for the same pattern.Root cause
_check_error_handlingmaps added lines to patch lines so_is_silently_ignoredcan inspect the handler body in context. The mapping loop comparedpatch_lines[patch_idx].lstrip().startswith(add_line)— but patch lines retain their+/' ' diff prefixes, solstrip()never removes them and the mapping was always empty. Theget(i, i)fallback misaligns indices whenever context lines precede a finding (the delta case), so the handler body inspection looked at the wrong line and returnedFalse(not silently ignored) — finding dropped.Fix
Strip the diff prefix before comparing in the mapping loop.
Verification
a94176c...3628105: 0 findings → 1 finding (correct)