Skip to content

Drop untracked PRs to prevent feature/#0 ghost branches#20

Merged
vkehfdl1 merged 1 commit intomainfrom
Feature/issue-18-ghost-branch-fix
Apr 6, 2026
Merged

Drop untracked PRs to prevent feature/#0 ghost branches#20
vkehfdl1 merged 1 commit intomainfrom
Feature/issue-18-ghost-branch-fix

Conversation

@vkehfdl1
Copy link
Copy Markdown
Contributor

@vkehfdl1 vkehfdl1 commented Apr 6, 2026

Summary

  • PRs without a traceable issue number (manual/external PRs) now return untracked_pr instead of entering the review→implementation cycle
  • Guards added at _handle_review_round_agent_event, _handle_implementation_agent_event, and _queue_pull_request_review
  • Prevents the issue_number or 0 fallback from creating feature/#0 ghost branches and infinite loops

Closes #18

Test plan

  • test_pr_opened_without_issue_reference_is_ignored — external PR without issue ref is dropped
  • test_review_round_without_issue_drops_untracked_pr — review-round signature missing issue field is dropped
  • test_implementation_without_issue_drops_untracked_pr — implementation signature missing issue field is dropped
  • All 82 existing tests pass

🤖 Generated with Claude Code

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>
@vkehfdl1 vkehfdl1 merged commit 6bdd4d4 into main Apr 6, 2026
6 checks passed
@vkehfdl1 vkehfdl1 deleted the Feature/issue-18-ghost-branch-fix branch April 6, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue_number or 0 fallback creates ghost feature/#0 branches

1 participant