Skip to content

docs(merge-queue): document serial-mode batch grouping heuristic#11693

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/sileht/mrgfy-7456-document-serial-mode-batch-grouping/document-serial-mode-batch-grouping-heuristic--a6adeea3
Jun 2, 2026
Merged

docs(merge-queue): document serial-mode batch grouping heuristic#11693
mergify[bot] merged 1 commit into
mainfrom
devs/sileht/mrgfy-7456-document-serial-mode-batch-grouping/document-serial-mode-batch-grouping-heuristic--a6adeea3

Conversation

@sileht
Copy link
Copy Markdown
Member

@sileht sileht commented Jun 1, 2026

The heuristic that groups pull requests into batches in serial mode was
changed in #32298 (group by changed-directory similarity when no scopes
source is configured) and was undocumented.

Document, in the Batches page, how Mergify decides which pull requests
share a batch: priority and queue order come first, then similarity
fills the batch (scopes when configured, otherwise the directories each
PR changes), and stacks are kept together. Replace the vague,
out-of-place note in the failure-handling section with this accurate
description.

Fixes MRGFY-7456

Copilot AI review requested due to automatic review settings June 1, 2026 14:30
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 1, 2026 14:30 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Jun 1, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify Bot requested a review from a team June 1, 2026 14:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents the updated serial-mode batch grouping heuristic in the Merge Queue “Batches” documentation, clarifying how Mergify chooses which pull requests share a batch and removing a vague/incorrect note from the failure-handling section.

Changes:

  • Add a new section explaining batch composition rules (priority/queue order, similarity via scopes or changed directories, and stack co-location).
  • Provide an illustrative DOT diagram and a note about batch_max_wait_time affecting candidate availability.
  • Remove the previous note in the failure-handling section that gave an incomplete description of batching behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/content/docs/merge-queue/batches.mdx Outdated
Comment thread src/content/docs/merge-queue/batches.mdx
@sileht sileht marked this pull request as ready for review June 1, 2026 14:39
@sileht sileht force-pushed the devs/sileht/mrgfy-7456-document-serial-mode-batch-grouping/document-serial-mode-batch-grouping-heuristic--a6adeea3 branch from 39926da to b3b9cca Compare June 1, 2026 14:42
@sileht
Copy link
Copy Markdown
Member Author

sileht commented Jun 1, 2026

Revision history

# Type Changes Reason Date
1 initial 39926da 2026-06-01 14:42 UTC
2 content 39926da → b3b9cca (raw) 2026-06-01 14:42 UTC
3 content b3b9cca → 208ba38 (raw) 2026-06-01 15:35 UTC
4 content 208ba38 → c100266 (raw) 2026-06-01 15:43 UTC

@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 1, 2026 14:42 Failure
jd
jd previously approved these changes Jun 1, 2026
@mergify mergify Bot requested a review from a team June 1, 2026 15:27
Comment thread src/content/docs/merge-queue/batches.mdx
@sileht sileht force-pushed the devs/sileht/mrgfy-7456-document-serial-mode-batch-grouping/document-serial-mode-batch-grouping-heuristic--a6adeea3 branch from b3b9cca to 208ba38 Compare June 1, 2026 15:35
@mergify mergify Bot dismissed jd’s stale review June 1, 2026 15:35

Pull request has been modified.

@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 1, 2026 15:35 Failure
The heuristic that groups pull requests into batches in serial mode was
changed in #32298 (group by changed-directory similarity when no scopes
source is configured) and was undocumented.

Document, in the Batches page, how Mergify decides which pull requests
share a batch: priority and queue order come first, then similarity
fills the batch (scopes when configured, otherwise the directories each
PR changes), and stacks are kept together. Replace the vague,
out-of-place note in the failure-handling section with this accurate
description.

Fixes MRGFY-7456

Change-Id: Ia6adeea393375646d6c530dc85e560339e81a9a3
@sileht sileht force-pushed the devs/sileht/mrgfy-7456-document-serial-mode-batch-grouping/document-serial-mode-batch-grouping-heuristic--a6adeea3 branch from 208ba38 to c100266 Compare June 1, 2026 15:43
@mergify mergify Bot deployed to Mergify Merge Protections June 1, 2026 15:43 Active
@mergify mergify Bot requested a review from a team June 2, 2026 07:03
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Jun 2, 2026

Merge Queue Status

This pull request spent 2 minutes 9 seconds in the queue, including 1 minute 42 seconds running CI.

Required conditions to merge

mergify Bot added a commit that referenced this pull request Jun 2, 2026
@mergify mergify Bot added the queued label Jun 2, 2026
@mergify mergify Bot merged commit 940dc33 into main Jun 2, 2026
8 of 13 checks passed
@mergify mergify Bot deleted the devs/sileht/mrgfy-7456-document-serial-mode-batch-grouping/document-serial-mode-batch-grouping-heuristic--a6adeea3 branch June 2, 2026 07:31
@mergify mergify Bot removed the queued label Jun 2, 2026
sileht added a commit that referenced this pull request Jun 2, 2026
…atching

The batch-grouping section listed priority, scopes, changed directories,
and queue time as the similarity ranking, then described stacks in a
separate paragraph that read as a fifth tier of that order. Readers
(jd on PR #11693) took it as "scope -> files -> stack" and expected
stack to come before files.

Reframe the stack rule to match the engine: in serial mode stack
co-location is a separate constraint outside the similarity ranking
(_add_pull_with_predecessors), not a ranking tier. Selected pull
requests drag their queued predecessors into the same batch regardless
of scope or directory overlap, so stack relationships take precedence
over scope and directory similarity, bounded only by batch_size.

Also repoint the stale parallel-scopes link to queue-modes#parallel-mode.

Fixes MRGFY-7466

Change-Id: I8a0172f86b0629e0086e51c038e0244339086447
mergify Bot pushed a commit that referenced this pull request Jun 2, 2026
…atching (#11702)

The batch-grouping section listed priority, scopes, changed directories,
and queue time as the similarity ranking, then described stacks in a
separate paragraph that read as a fifth tier of that order. Readers
(jd on PR #11693) took it as "scope -> files -> stack" and expected
stack to come before files.

Reframe the stack rule to match the engine: in serial mode stack
co-location is a separate constraint outside the similarity ranking
(_add_pull_with_predecessors), not a ranking tier. Selected pull
requests drag their queued predecessors into the same batch regardless
of scope or directory overlap, so stack relationships take precedence
over scope and directory similarity, bounded only by batch_size.

Also repoint the stale parallel-scopes link to queue-modes#parallel-mode.

Fixes MRGFY-7466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants