From f022ecc728ebcad279eb5ac3c734bb932d1657cc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 5 May 2026 10:55:54 +0000 Subject: [PATCH 1/2] docs(flaky-tests): document automatic labeling from monitors Replaces the "coming soon" placeholder with real documentation for the monitor label actions feature shipped in trunk2 PR #3774. Co-Authored-By: Claude Opus 4.6 --- flaky-tests/test-labels.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/flaky-tests/test-labels.md b/flaky-tests/test-labels.md index 6ee176a8..223bd277 100644 --- a/flaky-tests/test-labels.md +++ b/flaky-tests/test-labels.md @@ -32,8 +32,20 @@ On the tests list, you can filter the table down to test cases that have a parti ### Automatic labeling from monitors +Monitors can automatically apply and remove labels on test cases based on test behavior. When a monitor activates (detects a flaky or broken test), it applies any configured labels to that test case. When the monitor resolves, it removes those labels. + +You configure label actions in the **Actions** section of the monitor edit dialog. Use the **Add label** button to select the labels to apply when the monitor fires. You can configure separate sets of labels to apply on activation and remove on resolution. + +The monitor list view shows label action chips on any monitor that has a label action configured, so you can see at a glance which monitors are set up to auto-label. + +#### How label cleanup works + +- **When you disable or delete a monitor:** any labels that monitor had applied are automatically removed from all affected test cases. +- **When you change the label set on a monitor's label action:** Trunk reconciles the existing label assignments to match the new configuration. +- **Deleting a label is blocked** if it is still configured in a label action on an active monitor. Remove it from the monitor's label action first. + {% hint style="info" %} -**Coming soon.** Monitors will be able to automatically apply and remove labels on test cases based on test behavior. More details will be published when this is available. +Automatic labeling from monitors is available on paid plans. If you don't see the label action option in your monitor config, contact support to confirm access. {% endhint %} ### Related From 98d9f72179aec499028224862ecc3ca8eb6c67ad Mon Sep 17 00:00:00 2001 From: Sam Gutentag <1404219+samgutentag@users.noreply.github.com> Date: Thu, 7 May 2026 09:44:09 -0700 Subject: [PATCH 2/2] docs(test-labels): apply Claude review nits on monitor label-actions section Three small fixes flagged by the Claude review bot on 2026-05-05 and re-flagged on 2026-05-06. * Line 7: drop the stale "for what's coming" framing. The section it pointed to is documented in this same page now, so the lead-in contradicted the body. Reworded to "Labels can also be applied automatically via monitors; see [Automatic labeling from monitors]" which works regardless of the rollout state of the feature. * Line 43: add the missing article. "any labels that monitor had applied" to "Any labels that the monitor had applied". * Line 43: capitalize "Any" so the cleanup-bullet pattern matches line 44's "Trunk reconciles..." (sentence case after the bold colon). Note: feature is still flag-gated in prod (`showLabelActions` LD flag present in trunk2 main, no rollout signal yet). PR stays in draft and waits for prod rollout before merging. Content fixes apply now so nothing rots in the meantime. Co-Authored-By: Claude Opus 4.7 (1M context) --- flaky-tests/test-labels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flaky-tests/test-labels.md b/flaky-tests/test-labels.md index 223bd277..42adab3a 100644 --- a/flaky-tests/test-labels.md +++ b/flaky-tests/test-labels.md @@ -4,7 +4,7 @@ description: Organize and categorize test cases with organization-scoped labels. # Test Labels -Test labels are organization-scoped tags you can apply to individual test cases to organize, filter, and categorize your test suite. Labels are applied manually today; see [Automatic labeling from monitors](#automatic-labeling-from-monitors) for what's coming. +Test labels are organization-scoped tags you can apply to individual test cases to organize, filter, and categorize your test suite. Labels can also be applied automatically via monitors; see [Automatic labeling from monitors](#automatic-labeling-from-monitors).
Labels applied to a test on details page
@@ -40,7 +40,7 @@ The monitor list view shows label action chips on any monitor that has a label a #### How label cleanup works -- **When you disable or delete a monitor:** any labels that monitor had applied are automatically removed from all affected test cases. +- **When you disable or delete a monitor:** Any labels that the monitor had applied are automatically removed from all affected test cases. - **When you change the label set on a monitor's label action:** Trunk reconciles the existing label assignments to match the new configuration. - **Deleting a label is blocked** if it is still configured in a label action on an active monitor. Remove it from the monitor's label action first.