Drop untracked PRs to prevent feature/#0 ghost branches#20
Merged
Conversation
PRs not created by Dani (manual, external contributor) have no linked issue number. When these entered the review→implementation cycle, the `issue_number or 0` fallback produced `feature/#0` branches and ghost PRs in an infinite loop. Guard the three entry points (_handle_review_round_agent_event, _handle_implementation_agent_event, _queue_pull_request_review) to return untracked_pr when issue_number cannot be resolved. Closes #18 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
untracked_prinstead of entering the review→implementation cycle_handle_review_round_agent_event,_handle_implementation_agent_event, and_queue_pull_request_reviewissue_number or 0fallback from creatingfeature/#0ghost branches and infinite loopsCloses #18
Test plan
test_pr_opened_without_issue_reference_is_ignored— external PR without issue ref is droppedtest_review_round_without_issue_drops_untracked_pr— review-round signature missing issue field is droppedtest_implementation_without_issue_drops_untracked_pr— implementation signature missing issue field is dropped🤖 Generated with Claude Code