-
Notifications
You must be signed in to change notification settings - Fork 6
fix: surface AI reviewer feedback posted as COMMENTED in pr-loop WAITING state #401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ING state Bots like Gemini Code Assist post reviews as COMMENTED rather than CHANGES_REQUESTED, so GitHub's reviewDecision stays NONE and the pr-loop WAITING path never surfaced their feedback. Now checks for unresolved review threads before falling through to stale-review logic, consistent with how the READY path already handles this.
Summary of ChangesHello @marcusquinn, 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 significantly improves the robustness of the automated PR review process by ensuring that feedback from AI reviewers, even when submitted with a 'COMMENTED' status, is no longer overlooked. By integrating a check for unresolved AI comments into the 'WAITING' state, the system now proactively surfaces this feedback, guiding developers to address relevant suggestions and enhancing the overall efficiency and thoroughness of code reviews. Highlights
Changelog
Activity
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
|
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Feb 6 21:58:29 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively addresses a gap in the PR review loop where feedback from AI bots posting with a COMMENTED status was being ignored. The solution to check for unresolved review threads within the WAITING state is logical and correctly implemented. The accompanying documentation update is also clear. I have one minor suggestion for the shell script to improve its conciseness.
| local waiting_unresolved_result | ||
| check_unresolved_review_comments "$pr_number" | ||
| waiting_unresolved_result=$? | ||
|
|
||
| if [[ $waiting_unresolved_result -eq 1 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For conciseness and to follow common shell scripting idioms, you can check the exit code ($?) directly in the if condition immediately after calling the function. This avoids the need for the intermediate waiting_unresolved_result local variable, making the code cleaner.
| local waiting_unresolved_result | |
| check_unresolved_review_comments "$pr_number" | |
| waiting_unresolved_result=$? | |
| if [[ $waiting_unresolved_result -eq 1 ]]; then | |
| check_unresolved_review_comments "$pr_number" | |
| if [[ $? -eq 1 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissing: ShellCheck SC2181 recommends against if [[ $? -eq ... ]] and prefers capturing the exit code in a variable first, which is what we already do. The intermediate variable also makes the three-way branch (0/1/2) clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.agents/scripts/quality-loop-helper.sh:
- Around line 915-933: check the handling of the return code from
check_unresolved_review_comments: currently waiting_unresolved_result is only
compared to 1 and else treats 2 (API error) same as 0; update the branch to
explicitly test for return code 2 and log a caution (similar to the READY
handling) without triggering auto-trigger_review or re-review actions.
Specifically, after calling check_unresolved_review_comments (and setting
waiting_unresolved_result), add an explicit condition for
waiting_unresolved_result -eq 2 to call print_warning with an API-error message
and skip the auto_trigger_review/check_and_trigger_review path; keep the
existing behavior for -eq 1 and -eq 0 unchanged.
Address CodeRabbit feedback: when check_unresolved_review_comments returns 2 (API error), log a caution warning instead of falling through to stale-review trigger logic. Consistent with READY path handling at lines 875-876.
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Feb 6 22:02:50 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
WAITINGpath now detects unresolved review threads from AI bots (Gemini Code Assist, etc.) that post asCOMMENTEDrather thanCHANGES_REQUESTEDreviewDecisionstayedNONEcheck_unresolved_review_comments()GraphQL function, consistent with how theREADYpath already handles thisProblem
Bots like Gemini Code Assist submit reviews with state
COMMENTED(notCHANGES_REQUESTED), so:reviewDecisionremainsNONEWAITINGbranchFix
The
WAITINGbranch now callscheck_unresolved_review_comments()first. If unresolved threads exist, it surfaces the feedback viaget_pr_feedback()with the standard AI verification warning. Only falls through to stale-review logic if no unresolved threads are found.Files Changed
.agents/scripts/quality-loop-helper.sh.agents/scripts/commands/pr-loop.mdSummary by CodeRabbit
Bug Fixes
Improvements