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
Warn before queueing when predecessors push the candidate over budget #1295
A PR can fit the current main and still be dequeued when Mergify combines it with the PRs ahead of it. The owner sees a green PR and gets no warning about that particular stack before making the queue request.
PR #1238 passed its source check. I replayed c0fe3a0 on the candidate's recorded main (49c08f99), where the source budget passed at 7,478 of 7,500. With the changes from #1146 and #1219 ahead of it, the same PR measured 7,504 against that same main and failed, matching Mergify candidate #1246. #1238 spent 64 seconds in the queue. #1185, #1192 and #860 also passed on their respective recorded main in the offline replay and failed the budget only with predecessors included, for four lost queue attempts and about seven minutes of queue time across them. Source check · Candidate #1246 · Failed check · Dequeue
Mergify runs up to three candidate checks in parallel, even with one PR per batch. The budget check counts the whole candidate checkout and compares it to the candidate's target SHA. The CLI only reads membership for the PR being submitted. Existing attestation code already walks predecessor batches and reconstructs their integration trees. Reuse the current-main budget check from #1293 and take one read-only snapshot of the relevant queue when its predecessor order and heads can be established. Queue config · Budget calculation · Queue admission · Predecessor lookup · Integration tree
Acceptance criteria
In an offline fixture where a PR fits on current main and exceeds a cap after two clean predecessors are applied, the existing readiness or pre-request output names the cap, projected total and predecessor PR numbers. Compare the projected tree to the same main SHA the candidate workflow uses.
A speculative failure is advisory because the predecessors may leave or reorder. An empty, unavailable or ambiguous queue preserves the existing admission behavior and makes no claim about a predicted failure.
Reuse the existing budget calculation without changing caps, adding a required check, introducing a CLI option, or recording new state.
Activity
eowca commentedon Nov 26, 2026
#1313 was closed because both review rounds requested changes and the repaired head has no eligible review. This issue remains open for a fresh PR.