Skip to content

fix: increase line proximity for finding grouping and dedup (#234)#403

Merged
justn-hyeok merged 1 commit intomainfrom
fix/increase-line-proximity-dedup-234
Apr 1, 2026
Merged

fix: increase line proximity for finding grouping and dedup (#234)#403
justn-hyeok merged 1 commit intomainfrom
fix/increase-line-proximity-dedup-234

Conversation

@justn-hyeok
Copy link
Copy Markdown
Collaborator

Summary

  • Increased LINE_PROXIMITY from 5 to 15 in threshold.ts so that findings on the same function but 10+ lines apart are grouped into a single discussion instead of creating duplicates.
  • Relaxed the strict overlap check in deduplication.ts to also consider proximity (within 15 lines), matching the threshold grouping logic.
  • Updated test expectation for non-overlapping ranges to use a wider gap (30+ lines) to reflect the new proximity value.

Closes #234

Test plan

  • pnpm --filter @codeagora/core test — all 219 tests pass
  • Manual verification: run pipeline on a diff with nearby findings (10-15 lines apart) and confirm they merge into a single discussion

🤖 Generated with Claude Code

LINE_PROXIMITY of 5 was too tight — findings on the same function
but 10+ lines apart created separate discussions. Increased to 15
to cover typical function bodies. Also relaxed deduplication
overlap check to match the same proximity threshold.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Warning

Rate limit exceeded

@justn-hyeok has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 38 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 28 minutes and 38 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 978b4e36-40d1-451b-8d7b-004a64b752e8

📥 Commits

Reviewing files that changed from the base of the PR and between 80863a5 and 5b9eeae.

📒 Files selected for processing (3)
  • packages/core/src/l2/deduplication.ts
  • packages/core/src/l2/threshold.ts
  • packages/core/src/tests/l2-dedup.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/increase-line-proximity-dedup-234

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the size/S <50 lines label Apr 1, 2026
@justn-hyeok justn-hyeok merged commit f3e21e6 into main Apr 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S <50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: duplicate findings on same location not merged in review output

1 participant