From 53d776ffe3b01593c6f762f6763e7e3e05f6d45e Mon Sep 17 00:00:00 2001 From: Sam Gutentag <1404219+samgutentag@users.noreply.github.com> Date: Tue, 17 Feb 2026 13:54:48 -0800 Subject: [PATCH 1/2] Clarify Testing Concurrency and Bisection Concurrency relationship Adds info hint clarifying that Testing Concurrency applies only to the main queue when Batching is enabled. Updates Bisection Testing Concurrency default description and minor wording fix in batching.md. Related: TRUNK-15603, TRUNK-16970, TRUNK-16973, TRUNK-16972, TRUNK-17117 Co-Authored-By: Claude Opus 4.6 --- merge-queue/administration/advanced-settings.md | 10 +++++++++- merge-queue/optimizations/batching.md | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/merge-queue/administration/advanced-settings.md b/merge-queue/administration/advanced-settings.md index d34c6e8c..9ac0b4ea 100644 --- a/merge-queue/administration/advanced-settings.md +++ b/merge-queue/administration/advanced-settings.md @@ -15,6 +15,10 @@ All of the following settings are specific to individual Merge Queues and can be Note that you must be an Organization admin to adjust any of these settings. {% endhint %} +{% hint style="info" %} +All queue settings can also be managed programmatically using the [Queue management API endpoints](../reference/merge.md#queue-management-endpoints). This is useful for automating queue configuration across multiple repositories or integrating with infrastructure-as-code workflows. +{% endhint %} + *** ## Merge Queue state @@ -183,6 +187,10 @@ The merge method is configured per repository, so different repositories in your Configure how many PRs may be tested in parallel. A larger number may increase throughput since more PRs are tested in parallel, but at the expense of CI since more jobs are running in parallel. When the queue is at capacity, PRs will still be submitted to it, but they will not begin testing until a PR leaves the queue. +{% hint style="info" %} +When [Batching](advanced-settings.md#batching) is enabled, Testing Concurrency applies only to the main queue. Bisection tests during batch failure isolation use a separate [Bisection Testing Concurrency](advanced-settings.md#bisection-testing-concurrency) setting. +{% endhint %} + {% hint style="info" %} If your testing workload contains some flaky tests, a deeper queue (i.e., a higher concurrency) may struggle. Running Merge in Parallel mode can help with this, as it will reduce the average depth of your merge queue since all PRs won't be queued directly behind each other. {% endhint %} @@ -301,7 +309,7 @@ Whether or not GitHub slash commands like `/trunk merge` are enabled for this me Configure how many PRs can be tested simultaneously during batch failure isolation (bisection). This setting is independent from the main Testing Concurrency and only applies when batches fail and need to be split to identify the failing PR. -**Default:** Same as Testing Concurrency (automatically mirrors your main concurrency setting) +**Default:** When not explicitly configured, bisection uses the same concurrency as your main Testing Concurrency setting. We recommend setting this to a higher value for faster failure isolation. **Recommended:** Set 2-5x higher than your main Testing Concurrency for faster failure isolation diff --git a/merge-queue/optimizations/batching.md b/merge-queue/optimizations/batching.md index 3a5188e3..86dc45d9 100644 --- a/merge-queue/optimizations/batching.md +++ b/merge-queue/optimizations/batching.md @@ -40,7 +40,7 @@ When a batch fails, Trunk automatically splits it apart (bisects) to identify wh #### Why Separate Bisection Concurrency? -By default, bisection tests use the same concurrency limit as your main queue. This means: +By default, bisection tests use the same concurrency limit as your main queue when bisection concurrency is not explicitly configured. This means: * Bisection can slow down other PRs waiting to merge * Developers wait longer to learn which PR broke the batch From d550c6a3d2356420e289ad6da5bb7bbc177f8c6f Mon Sep 17 00:00:00 2001 From: Sam Gutentag <1404219+samgutentag@users.noreply.github.com> Date: Tue, 17 Feb 2026 20:18:06 -0800 Subject: [PATCH 2/2] Refine bisection concurrency docs with cross-references and notification note Add cross-reference link from batching.md back to main Testing Concurrency setting, note that Slack/GitHub notifications report bisection concurrency changes, and link Bisection Testing Concurrency description to its parent setting for navigability. Co-Authored-By: Claude Opus 4.6 --- merge-queue/administration/advanced-settings.md | 6 +++++- merge-queue/optimizations/batching.md | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/merge-queue/administration/advanced-settings.md b/merge-queue/administration/advanced-settings.md index 9ac0b4ea..dc258b3f 100644 --- a/merge-queue/administration/advanced-settings.md +++ b/merge-queue/administration/advanced-settings.md @@ -307,12 +307,16 @@ Whether or not GitHub slash commands like `/trunk merge` are enabled for this me ### Bisection Testing Concurrency -Configure how many PRs can be tested simultaneously during batch failure isolation (bisection). This setting is independent from the main Testing Concurrency and only applies when batches fail and need to be split to identify the failing PR. +Configure how many PRs can be tested simultaneously during batch failure isolation (bisection). This setting is independent from the main [Testing Concurrency](advanced-settings.md#testing-concurrency) and only applies when batches fail and need to be split to identify the failing PR. **Default:** When not explicitly configured, bisection uses the same concurrency as your main Testing Concurrency setting. We recommend setting this to a higher value for faster failure isolation. **Recommended:** Set 2-5x higher than your main Testing Concurrency for faster failure isolation +{% hint style="info" %} +Changes to Bisection Testing Concurrency are reported in Slack notifications and GitHub PR comments when those integrations are enabled. +{% endhint %} + #### How to Configure 1. Navigate to **Settings** > **Repositories** > your repository > **Merge Queue** > **Batching** diff --git a/merge-queue/optimizations/batching.md b/merge-queue/optimizations/batching.md index 86dc45d9..54192987 100644 --- a/merge-queue/optimizations/batching.md +++ b/merge-queue/optimizations/batching.md @@ -34,7 +34,7 @@ A good place to start is with the defaults, Maximum wait time set to 5 (minutes) ### Bisection Testing Concurrency -When a batch fails, Trunk automatically splits it apart (bisects) to identify which PR caused the failure. You can configure a separate, higher concurrency limit specifically for these bisection tests to isolate failures faster without impacting your main queue. +When a batch fails, Trunk automatically splits it apart (bisects) to identify which PR caused the failure. You can configure a separate, higher concurrency limit specifically for these bisection tests to isolate failures faster without impacting your main queue. This setting is independent from the main [Testing Concurrency](../administration/advanced-settings.md#testing-concurrency), which applies only to the main queue when batching is enabled.