t1406: Filter out approving reviews from quality-debt issue creation#3926
Conversation
…1406) Replace the weak body-length filter (>100 chars) for APPROVED reviews with content analysis that detects actionable language. APPROVED reviews without suggestions, warnings, security concerns, or code fix proposals are now excluded from quality-debt issue creation. Actionable patterns kept: should, consider, instead, suggest, recommend, warning, caution, avoid, don't, vulnerable, insecure, injection, xss, csrf, nit:, todo:, fixme, hardcoded, deprecated, race condition, deadlock, leak, overflow, workaround, hack, suggestion/diff blocks. Ambiguous words removed from filter (common in positive descriptions): bug, error, fix, patch, missing, incorrect, wrong, broken. Closes marcusquinn#2958
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the logic for creating quality-debt issues from pull request reviews. It introduces a more intelligent filtering mechanism for 'APPROVED' reviews, moving beyond a basic body length check to analyze review content for actionable language. This change aims to significantly reduce false positive quality-debt issues, particularly those generated by purely positive bot reviews, while ensuring that genuine feedback across all review states is captured. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This is a great improvement for filtering quality-debt issues, moving from a simple length check to a more intelligent content analysis. The regex approach for detecting actionable feedback is solid. I've added a couple of suggestions to make the regular expressions even more robust to handle common variations like typos and extra whitespace.
- Match 'dont' (no apostrophe) via (don ?'?t|do not) group - Allow whitespace between backticks and language identifier in code block detection (e.g., '``` suggestion')
|
This PR is from an external contributor (@johnwaldo). Auto-merge is disabled for external PRs — a maintainer must review and merge manually. |
|
Framework Validation failed due to ShellCheck errors in
Daily PR cap reached for aidevops today. Fix worker will be dispatched at next UTC day reset. |
… (SC1073, SC1089, SC1056, SC1072)
Maintainer review of Gemini suggestionsBoth Gemini Code Assist suggestions were valid and have been applied correctly across commits e122f69 and dfd1854:
The initial application (e122f69) introduced ShellCheck parse errors due to single-quote escaping inside the jq heredoc. These were fixed in dfd1854 using the Both review threads resolved. Removing |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Dispatching fix worker to address 2 unresolved bot review suggestions before merge.
|
Summary
> 100chars) for APPROVED reviews with content analysis that detects actionable languageProblem
scan-mergedcreates quality-debt issues for ALL review feedback, including purely positive APPROVED reviews from bots (CodeRabbit, Gemini). Example false positive: #3900 — Gemini's review was entirely positive ("well-executed and improve both documentation clarity") but generated a medium-severity quality-debt issue.The previous filter (
select(.state != "APPROVED" or (.body | length) > 100)) only skipped APPROVED reviews with short bodies (≤100 chars). Bot reviews typically have 500-2000 char bodies even when purely positive.Fix
For APPROVED reviews, scan the body for actionable language patterns before creating a finding:
Kept (actionable): should, consider, instead, suggest, recommend, warning, caution, avoid, don't, do not, vulnerable, insecure, injection, xss, csrf, nit:, todo:, fixme, hardcoded, deprecated, race condition, deadlock, leak, overflow, workaround, hack,
```suggestion,```diffRemoved from filter (ambiguous in positive context): bug, error, fix, patch, missing, incorrect, wrong, broken — these commonly appear in positive descriptions of what a PR accomplishes ("This PR fixes the bug", "corrects the error").
Testing
Verified with jq against 4 scenarios:
ShellCheck clean (only SC1091 external source, pre-existing).
Closes #2958