Conversation
… review loops Phase 1 - PR Description Auto-Update: - Add get_pr_description() and update_pr_description() to github_api.py - Add update_description_prompt() to prompts.py for agent-driven rewrite - Add UPDATE_DESCRIPTION orchestrator state between RESOLVE_COMMENTS and REQUEST_REVIEW, guaranteeing PR body stays in sync after every fix - Remove old step 8 from fix_prompt (no longer agent discretion) Phase 2 - 3-Tier CCR Verification Model: - Rewrite fix_prompt() with mandatory verification steps: read context, check tests, verify claims against actual codebase usage - Add 3-tier decision model: fixed (Tier 1), dismissed with evidence (Tier 2, resolves thread), uncertain with evidence (Tier 3, leaves thread unresolved for human review) - Update _do_resolve_comments() to handle dismissed and uncertain statuses - Require evidence field in fix summary JSON for dismissed/uncertain Phase 3 - Circular Loop Detection: - Add _detect_bouncing_comments() to detect comments that bounce back after being fixed 2+ times (matching by file path + body similarity) - Inject warning into fix_prompt when circular loops are detected, instructing agent to mark as uncertain instead of re-fixing - Add bouncing_comments parameter to fix_prompt() Tests: 19 new tests covering all three phases (262 total, all passing). Closes #69
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
Three improvements to the review-fix loop:
UPDATE_DESCRIPTIONorchestrator state (no longer left to agent discretion)Changes
Phase 1: PR Description Auto-Update
github_api.py: Addedget_pr_description()andupdate_pr_description()prompts.py: Addedupdate_description_prompt()for agent-driven PR body rewriteorchestrator.py: NewUPDATE_DESCRIPTIONstate betweenRESOLVE_COMMENTSandREQUEST_REVIEW. Non-fatal — failure doesn't block the loopfix_prompt()(was unreliably agent-discretionary)Phase 2: 3-Tier CCR Verification
prompts.py: Rewrotefix_prompt()with mandatory verification steps and 3-tier decision modelorchestrator.py:_do_resolve_comments()now handles 4 statuses:fixed→ reply + resolve (unchanged)skipped→ reply + resolve (unchanged)dismissed→ reply with evidence + resolve (NEW)uncertain→ reply + do NOT resolve (NEW — left for human)evidencefield for dismissed/uncertainPhase 3: Circular Loop Detection
orchestrator.py: Added_detect_bouncing_comments()— compares current unresolved comments against previous fix summaries by file path + body text similarityfix_prompttelling agent to mark asuncertainprompts.py:fix_prompt()acceptsbouncing_commentsparameterTests
test_github_api.pyandtest_orchestrator.pyruff check)Closes #69
🤖 autopilot-loop