You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Paginate and Filter the cleanup Head Pull Request Read Before Counting Overflow as Branch Users #3003
Raised by Copilot on the develop -> main promotion #3002, against branch_users in scripts/pr_review.py (added in #2988).
The heads query in Q_CLEANUP_USERS reads the first 20 open pull requests whose head ref name is the branch, across every repository, forks included. branch_users then filters those nodes to heads in owner/repo, but adds totalCount - len(nodes) as "N more with the branch as head" without knowing whether any of the unread ones is local. So where more than 20 open fork pull requests share the branch name and none is local, cleanup refuses a delete that is safe, and the message counts fork pull requests as users of this repository's branch.
Why It Is Not Fixed on the Promotion
The failure is fail-closed: cleanup refuses and deletes nothing, and the maintainer is told. It needs over 20 open fork pull requests sharing one feature branch name, which no fleet repository has seen. That makes it an over-refusal with no safety gain, filed rather than chased under the round's review-loop stop rule.
Fix Shape
Paginate the heads connection, filter each page by headRepository, and decide from the filtered set, keeping an unread page as a refusal (exit 2). Add a test for the fork-only overflow case, and one for a local pull request past the first page.
Activity
ptr727 commentedon Oct 14, 2026
Claim (engineering round 25, grouped with #2985): branch
feature/2985-3003-pr-review-readers, filesscripts/pr_review.pyandtests/test_pr_review.py.Pair Overview Findings With Threads by File and Read Every Cleanup He…