Lower circular loop detection threshold from 2 bounces to 1#72
Merged
Lower circular loop detection threshold from 2 bounces to 1#72
Conversation
A comment that was fixed once and reappeared is already a circular loop. Previously required 2 fix-then-reappear cycles before flagging, which wasted iterations on contradictory CCR suggestions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lower the circular loop detection threshold from 2 bounces to 1. A comment that was "fixed" in a previous iteration and reappears is already a circular review loop — no need to waste a second iteration confirming it.
What changed
_detect_bouncing_comments()now flags a comment after 1 fix-then-reappear cycle (was 2)iteration < 3toiteration < 2How comment resolution works (reference)
When the agent classifies each review comment, the orchestrator posts a reply and decides whether to resolve the thread:
fixedabc1234— Added null checkskippeddismissedEvidence: API contract at src/schema.py:42 requires this field
uncertainWhat was checked: Checked tests but inconclusive
Circular loop example
When a comment bounces (fixed once → reappeared), the agent is instructed to mark it
uncertaininstead of re-fixing. The reply would look like:The thread stays unresolved so a human can make the final call.
Why lower the threshold?
Previously, autopilot would:
With the new threshold:
This saves 1-2 wasted iterations per bouncing comment.
Closes #69 (remaining item)
🤖 autopilot-loop