Repository navigation
fix(source-control): stop counting infra merge-queue removals toward the ejection cap - #17451
Conversation
…the ejection cap pr-merge stopped re-arming a head after merge.max-queue-ejections failed-check removals, and only excused a run whose CI Status alone failed on a rate limit. The verify:unreadable read-floor refusals, kill-switch stops and rate limits in Check Plugins and Check Managed Files that ejected #17253, #17325, #17340, #17359 and #17417 all counted, so each sat at the cap with a failing pr-merge/unarmed status until a push. A removal is now excused when every failed job of its merge-group run names an infra cause (rate-limit, read-floor, verify-unreadable, kill-switch, lost-runner) apart from lines that only report it, or the job also failed on main's run at the time (main-red). A real check failure beside an infra line still counts, as does any unread run. The budget causes and main-red wait for their reset, or an hour, so the cap still protects the API budget. merge.queue-ejection-infra-causes names the causes (default all; base and main must both name one). Each excused removal gets a queue-ejection notice, and the failed-run listing pages back to the head's oldest removal. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 065dab43fe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
claude-security-review reviewed Security review: PR #17451, incremental (08877d1 → 565bb96)No security issues found. This lane already reviewed an earlier head ( What I read: the scope has one listed file, What changed: the
Possible crash checked: the Settled threads: the three resolved threads (quoted infra line, the gate's own refusal while Spend (not a finding): none beyond what the earlier review named. critical-findings: 0 |
|
claude-review reviewed Code review: incremental,
|
|
The pr-verify verifier failed head What it wrote (26 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
…and never excuse the gate as main-red - Split a failure annotation into its lines (dropping the hygiene headline, ::error:: and path prefixes) so a real failure quoted beside an infra line counts the removal. - Wait for each waiting cause's own reset: a cause whose lines name none waits an hour after the removal, beside another cause's named reset. - Never put CI Status through the main-red test: on main it fails whenever any job does, so its own refusal would be excused while main is red. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
…cer's own shape - Outside CI Status, a cause line must start as its producer writes it (a gh error, a guard's request, a runner message) or with the cause, so a test's output quoting a cause phrase counts the removal. - main-red needs main's job of the same name to have failed on every line the merge-group job failed with beyond the exit line, so a shard failing on main for another test does not excuse it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
…unner removals The owner decision excuses an infra merge-queue removal only once its named reset has passed, or one hour after the removal when none is named. The kill-switch and lost-runner causes were excused at once; they now wait DEFAULT_RESET like the other causes. Tests pair a counted-before and an excused-after case for each, and the docs, schema and changesets say every cause waits its reset. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
Every infra cause waits its named reset or DEFAULT_RESET, so the set and its always-true membership check in _infra_removal are removed. Behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
Closes #17489
Gate defect found by the hub sweep. Five rated, verify-passing lanes PRs (#17253, #17325, #17340, #17359, #17417) sit at the ejection cap with a failing
pr-merge/unarmedstatus, and every removal that put them there was infra.Summary
merge.max-queue-ejectionsstopped pr-merge from re-arming or enqueuing a head after 2 failed-check removals. The only removals it did not count were runs whereCI Statuswas the sole failing job and failed on a rate limit alone (babysit_merge.py_run_rate_limit_reset, removed here). The removals of the five PRs were verify:unreadable read-floor refusals, kill-switch stops, and rate limits inCheck PluginsandCheck Managed Files. All of them counted, and only a push reset the count. A push also voids the merge-risk rating and the pr-verify result.Owner decisions for this loosening of
merge.max-queue-ejections, recorded on #17489:main-redcause. Owner, verbatim: "go w/ recommendations" (hub session, 2026-11-19 ~18:5xZ). Row: https://github.com/melodic-software/architecture/blob/e197635b27cda83b499c26afbdd269546f051b48/docs/owner-decisions.md#L234Why the cap keeps its safety: the cap still counts every real check failure, including a real failure beside an infra line, a lane that fails on its exit line alone, and any read that fails. An infra-caused removal is excused only once the pool's named reset has passed, or an hour after the removal when none is named, so the rate-budget safety the cap provides stays. What the cap stops counting is removals that a re-queue cannot repeat once the reset has passed.
Fix
infra_removals/_infra_removal(babysit_merge.py) excuse a removal only when every failed job of its merge-group run passes one of two tests:rate-limit,read-floor,verify-unreadable,kill-switchorlost-runner. Each line of an annotation is judged alone (a hygiene check's quoted tail is split), its other lines must be generic lines or lines that only report that cause, and outsideCI Statusa cause line must start as its producer writes it (agherror, a guard's request line, a runner message) or with the cause, so a test's output quoting a cause phrase counts.CI Status, and it also failed on main's run of the same workflow at the time on every line it failed with beyond the exit line (main-red). A job failing on its exit line alone, or on lines main's job did not fail with (another shard's test), counts.pr-verify has not passedwith no unreadable line, whether main is red or not;kill-switchandlost-runnerincluded, excuses a removal only once its own named reset has passed, or an hour after the removal when it names none; the wait is the latest of them.merge.queue-ejection-infra-causesinpr-pipeline.yaml(schema, policy reader, cache check). Absent means every cause. An unknown name is dropped with a note, so removals for it count.stricter_configkeeps only the causes both the base and main name.::notice title=queue-ejection::#N removal at T not counted ... infra (causes), from the gate and fromenable-auto-merge.mjs;excludedRemovalsinevidence --lane-queueand in the enqueue step JSON.reset: nullanswers from the old classifier are not reused.Verification
test_babysit_merge_async.pyInfraQueueRemovalsAreNotCounted. Covered: the negative cases listed under Fix, a real failure quoted beside an infra line in one annotation, a lane assertion quoting a cause phrase, a stamped rate limit beside the unstamped verify-unreadable gate (counted at 08:00, excused at 09:00), the gate's own pr-verify refusal while main is red, main failing the same job on other lines, main red versus green at the time, a main run too old to count, the config leaving a cause out, and paging past the first 100. Each review-fix test fails on the code before its fix. The policy read andstricter_configintersection tests are intest_babysit_merge_policy.py, and the notice test is inenable-auto-merge.test.mjs.enable-auto-merge.test.mjs(234 tests).queue_ejection_holdon the five PRs left all five with no refusal.Related
plugins/source-controlis part of enable-auto-merge's skip key (SKIP_MAIN_PATHS), so the first pr-merge sweep after merge reads every lanes PR again. The sweep runs on cron11,41, or byworkflow_dispatch. It arms the five and writessuccessover theirpr-merge/unarmedstatus.🤖 Generated with Claude Code
https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj