Repository navigation
fix(source-control): page the merge gate's force-push read - #11850
Conversation
_force_pushed_heads read one page of 100 force-push events and raised whenever totalCount was larger, so a pull request rebased more than 100 times failed its risk gate on every run and could never arm. It now follows the cursor up to 10 pages and still raises on a missing cursor, a count the pages do not reach, or a listing past the cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e-push-read-pages
…e-push-read-pages
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #11850 (page the merge gate's force-push read)I found no security issues. What I checked.
Other changed files. The Spend (not a finding). A pull request with more than 100 force pushes now uses up to 10 GraphQL reads plus one check-run count read per extra head, instead of stopping on the first page. That is GitHub API rate budget, not a billed charge. critical-findings: 0 |
|
claude-review reviewed Code review: PR #11850, fix(source-control): page the merge gate's force-push readNo findings. I read every hunk of all 3 changed files (the changelog fragment, What changedBefore this change, Correctness checks
Other notes
|
No related issue: a pr-merge lane defect reported by the PR Lane Automation session on #11799.
Summary
The babysit merge gate's risk read failed on #11799 with
RuntimeError: #11799 force pushes: unread or past one pageand set a failingpr-merge/unarmedstatus at 27cd962. Every scheduled re-run hit the same error, so the pull request could never arm.Fix
_force_pushed_heads(babysit_merge.py) read one page of 100HEAD_REF_FORCE_PUSHED_EVENTitems and raised whenevertotalCountwas larger. It now followspageInfo.endCursorup to_FORCE_PUSH_PAGES(10) pages and still fails closed: a missing cursor on a next page, atotalCountthe pages do not reach, or a listing past the cap raises, so the evidence stays unbound rather than missing a head.Verification
python3 -m unittest discover -s plugins/source-control/skills/babysit-prs/scripts/tests -p test_babysit_merge.py: 143 OK, with five force-push cases (one page, two pages by cursor, a short count, a missing cursor, past the cap).scripts/run-ruff.sh checkandformaton both files: clean.Related
🤖 Generated with Claude Code