Repository navigation
perf(pr-merge): skip re-reading a queue-ejected head while it stands unchanged - #17644
Conversation
…unchanged enable-auto-merge's skip-unchanged now keeps a head at the merge-queue ejection cap, timed from the gate's ejection comment, so later reader runs leave it refused without the verifier read until the head or another key input changes or the skip expires. An unread ejection count is never kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgdbwavfuWZGmKnMhWX
Codex Review Summary: ✅ CompletedThis 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: no findingsI read every hunk of all three changed files: the changelog fragment, What the change does. Skip-unchanged can now also keep a refusal that starts with Merge hold: not weakened. A skipped pull request is only ever left refused. The skip path at enable-auto-merge.mjs#L2268-L2273 calls
Other surfaces. No token scope, secret handling, trusted-actor, kill-switch or untrusted-text path is touched. There are no workflow or manifest changes. Spend. The change reduces GitHub API reads per pr-merge sweep and adds no billable resource. critical-findings: 0 |
|
claude-review reviewed Code review: no findings. This PR lets
Closing issue: none. The PR says it comes from an owner-approved optimization item, so there are no acceptance criteria to check. Cost: none. The change only reduces GitHub API requests per pr-merge sweep. Loosened checks would be marked: fail (default: no Verifier dropped 0 of 0 candidates. |
No related issue: owner-approved GitHub Optimization item (EAM ejected-head skip, hub D465), recorded in the lane's ledger
Summary
The pr-merge lane's
enable-auto-merge.mjsre-reads a lanes App pull request on every sweep, even when the merge queue ejected its head up tomerge.max-queue-ejections. Until the head changes, the decision for that head stays the same: "pr-merge's gate would not enqueue it again (queue-ejected:…)". Skip-unchanged now keeps that refusal. While the gate's ejection comment stays unchanged and the skip key matches, later reader runs leave the pull request refused without the verifier read.Fix
.github/scripts/pr-merge/enable-auto-merge.mjs:SKIPPABLEgainspr-merge's gate would not enqueue it again (queue-ejected:. The gate's count-at-cap refusal (babysit_merge.pyqueue_ejection_refusal) starts withqueue-ejected:. The unread-count refusal ("the merge queue's removals of this head are unreadable") does not match, so a failed queue read is never kept.laneBegan()holds the refusal start-time logic thatunarmedStatus()used inline. The marked comment is timed from its last change; the lane comment from itsLANE_SINCEline. The skip record'suntiland the failing-status escalation now read one function, so they cannot disagree. An older lane risk comment at the same head no longer times the ejection hold.EJECTION_HOLDnames the reason prefix thatejectionHold()writes andSKIPPABLEmatches..github/scripts/pr-merge/enable-auto-merge.test.mjs: four new tests:.changes/pr-pipeline/: a patch fragment.babysit_merge_skip.py'sSKIPPABLE, which is the Python gate's own skip set and outside this decision.Verification
left: pr-merge's gate would not enqueue it again (queue-ejected:…)lines with no refusal write after them. Those five heads took 121 of the run's 146 API requests (the profile's per-PR split of the job log). Run 44559265914 spent 88 requests on 4 ejected heads.max-skips(3) of the next sweeps leave each ejected head with no read, withinmax-minutes(60). On 2026-11-19 that is about 500 requests saved (estimate: 0.5 × ~92 verifier-counted calls × 10 runs, plus about 30). The saving only occurs while ejected heads exist; the 2026-11-20 samples so far have none.babysit_merge.py_infra_removal), where a failed read counts the removal. A refusal that a later read would excuse stands for at mostmax-minutes(60) ormax-skips(3) runs. The owner approved this bound (D13, "Go w/ recommendations" on option b).node --test --test-concurrency=4 .github/scripts/pr-merge/*.test.mjs: 1,011 tests, 1,011 pass, 0 fail.an unchanged queue-ejection hold is left…,…timed from the gate's comment). The guard tests pass both before and after.scripts/check-changelog-fragments.sh --check: all fragments valid.left, unchanged since … pr-merge's gate would not enqueue it again (queue-ejected:lines in the arm step, and fewer requests per run on sweeps with ejected heads.Related
babysit_merge_skip.py) keeps its separate refusal set; it is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgdbwavfuWZGmKnMhWX