fix(eval): a held or otherwise blocked PR does not take bonsai-merge-first - #1158
Merged
Merged
Conversation
…first reconcile_bonsai_merge_labels skipped only needs-rebase PRs when picking the round's winner. A PR under hold -- or any other AUTOMERGE_BLOCK label -- could still win merge-first, have its merge refused, and push the next-best PR to needs-rebase for a merge that never happened. On 2026-09-24 #1154 was held for review with the round's best score (XL, +35.4%), which would have done that to every other Bonsai PR for as long as the hold lasted. Blocked PRs are now left out of the ranking, and a stale merge-first on one is removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At the end of each round,
reconcile_bonsai_merge_labelsexcluded onlyneeds-rebasePRs when choosing thebonsai-merge-firstwinner. So a PR underhold, or carrying any otherAUTOMERGE_BLOCKlabel, could still win. Its merge was then refused, and the next-best PR was pushed toneeds-rebasefor a merge that never happened.Where it came up: today #1154 was put on hold for review while holding the round's best score (
XL, +35.4%). It would have takenmerge-firstevery round for as long as the hold lasted, blocking every other Bonsai PR.Fix:
bonsai-merge-firston a blocked PR is removed.Tests:
ReconcileTests. A held XL PR neither wins nor demotes the next-best PR; without a hold, the best still wins. 42 tests pass.