Skip to content

docs(changelog): switch a monitor's action type after creation#155

Merged
samgutentag merged 1 commit into
mainfrom
sam-gutentag/changelog-flaky-tests-monitor-action-types
May 29, 2026
Merged

docs(changelog): switch a monitor's action type after creation#155
samgutentag merged 1 commit into
mainfrom
sam-gutentag/changelog-flaky-tests-monitor-action-types

Conversation

@samgutentag
Copy link
Copy Markdown
Member

What shipped

Flaky Tests monitors (Failure Rate / Failure Count) can now have their action type switched after creation — between Classify test status and Apply labels, and between flaky and broken for a classification monitor — without deleting and recreating the monitor. Active test cases are reconciled against the new configuration immediately.

This entry focuses on the NEW, previously-unpublished story: switching the action type post-creation. The creation-time action picker and label actions themselves were already published in changelog/2026-05-18-flaky-tests-monitor-label-actions.mdx, so this entry deliberately does not re-announce them.

Source

  • Primary eng PR: trunk-io/trunk2#3951 — "Allow switching action type after monitor creation" (mergedAt 2026-05-14)
  • Related cluster PRs: trunk2#3945 (action type at creation), trunk2#3774 (label actions)
  • Date basis: latest source PR mergedAt across the cluster = 2026-05-14.

Tickets (4-ticket dedup cluster, one synthesized entry)

  • TRUNK-18262 (PRIMARY) — action type selection at creation, v174
  • TRUNK-18259 (absorbed) — same, trunk2#3945
  • TRUNK-18172 (absorbed) — Label Action on monitors, trunk2#3774
  • TRUNK-18346 (absorbed) — switch action type after creation, v183, trunk2#3951

Wired into all four sites

  • changelog/2026-05-14-flaky-tests-monitor-action-types.mdx (new entry)
  • docs.json (Changelog nav, 2026 group)
  • changelog/index.mdx (May 2026 section)
  • flaky-tests/changelog.mdx (product index, May 2026)

Docs link

https://docs.trunk.io/flaky-tests/detection/failure-rate-monitor#action — the Action section already states "You pick the action at creation and can switch it at any time."

Overlap note

Partial overlap with the published 2026-05-18 label-actions entry, but NOT redundant: that entry announced the Apply-labels action and the creation-time picker; this one is specifically about changing the action type after a monitor already exists, which the 2026-05-18 entry does not cover.

🤖 Generated with Claude Code

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 29, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
trunk 🟢 Ready View Preview May 29, 2026, 5:49 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@samgutentag samgutentag added changelog PR touches the changelog (auto-generated drafts, hosting, formatting, indexing). ready to merge Verify docs PR: customers can use this. Ready to publish. labels May 29, 2026
@samgutentag
Copy link
Copy Markdown
Member Author

samgutentag commented May 29, 2026

Verification status (2026-05-28): live

Verified: customers can use this. Ready to publish.

  • Eng PRs: trunk-io/trunk2#3951 (switch action type after creation, mergedAt 2026-05-14), trunk-io/trunk2#3945 (action type at creation, mergedAt 2026-05-12), trunk-io/trunk2#3774 (label actions). All merged and intact on main (compare status behind, not diverged).
  • Flag: showLabelActions (the creation-time toggle in #3945 is gated by showToggle = showLabelActions && actionTypeEditable; #3951 adds no new flag).
  • Signals:
    • LaunchDarkly bot change event for showLabelActions in #production-notifications dated 2026-05-15 (after the eng PR merges).
    • The sibling label-actions feature on the same flag has a PUBLISHED changelog entry dated 2026-05-18 (changelog/2026-05-18-flaky-tests-monitor-label-actions.mdx). A published customer changelog entry for the same flag is strong confirmation the flag reached prod.
    • e2e flag default for showLabelActions is true.
    • No "remove flag / delete legacy" follow-up PR yet, but the prod LD event + published sibling entry outweigh that.

Note: an earlier verify-changelog comment on TRUNK-18262 (2026-05-14) read pending because the flag was not yet at 100% in prod that day. The 2026-05-15 prod LD event and the 2026-05-18 published entry supersede it.

No action needed. PR is non-draft and ready for review/publish.

@samgutentag samgutentag added the code-verified verify-docs-against-code: all factual claims confirmed in source. label May 29, 2026
@samgutentag
Copy link
Copy Markdown
Member Author

Code verification (2026-05-28): 5 confirmed / 0 contradicted / 0 ambiguous / 0 unverifiable

Claim Verdict Source
Action types named "Classify test status" and "Apply labels" confirmed monitor-actions-section.tsx:90-101
Classification options are "Flaky" and "Broken" confirmed monitor-actions-section.tsx:25-26
Action type is editable after creation (not locked) confirmed trunk2#3951 EditMonitorDialog diff
Flaky/broken classification can be switched after creation confirmed monitor-actions-section.tsx:34,49
Active test cases are reconciled when the action changes confirmed classify.vitest.ts (monitor.classify_action.changed)

All claims in the entry match source. No corrections needed.


Source #1 — Action type names (confirmed)

File: trunk-io/trunk2/.../monitor/monitor-actions-section.tsx#L90-L101

            Classify test status
...
            Apply labels

Reasoning: These are the literal toggle labels rendered in the monitor actions UI, matching the entry's "Classify test status" and "Apply labels" verbatim (including casing).

Source #2 — Classification options Flaky / Broken (confirmed)

File: trunk-io/trunk2/.../monitor/monitor-actions-section.tsx#L25-L26

  { value: "FLAKY", label: "Flaky" },
  { value: "BROKEN", label: "Broken" },

Reasoning: The classification options for a Classify-test-status action are exactly Flaky and Broken. The entry's "flip flaky and broken" is accurate.

Source #3 — Action type editable after creation (confirmed)

File: trunk2#3951, EditMonitorDialog change

            <MonitorActionsSection
              actionType={actionType}
              onActionTypeChange={setActionType}
-             actionTypeEditable={false}
              classifyAction={classifyAction}

Reasoning: Before this PR, the Edit dialog passed actionTypeEditable={false}, locking the action type after creation. PR 3951 removes that line; the prop defaults to true (monitor-actions-section.tsx:32), so the action type becomes switchable in the edit flow. This is the precise code change behind the entry's headline.

Source #4 — Classification switchable after creation (confirmed)

File: trunk-io/trunk2/.../monitor/monitor-actions-section.tsx#L34

  classificationEditable = true,
...
  onClassificationChange?: (next: MonitorClassification) => void;

Reasoning: A dedicated classificationEditable prop plus onClassificationChange handler allow toggling flaky/broken on an existing classification action. (The Create dialog passes classificationEditable={false} to lock it at creation, but the Edit path leaves it editable.)

Source #5 — Reconciliation on action change (confirmed)

File: trunk-io/trunk2/.../flake-detection-side-effects-handler/__tests__/classify.vitest.ts

  it("monitor.classify_action.changed calls reconcile for active test cases", async () => {
    const event = makeClassifyActionChangedEvent("failure_rate");
    ...
    expect(fetchArgs?.[0]).toContain("/reconcile");

Reasoning: A monitor.classify_action.changed event triggers a /reconcile call for the monitor's active test cases. This backs the entry's claim that Trunk reconciles active tests against the new configuration immediately, and the "failure_rate" argument confirms it applies to the Failure Rate monitor.

New Flaky Tests entry covering post-creation action-type switching for
Failure Rate / Failure Count monitors (Classify <-> Apply labels, and
flaky <-> broken) with immediate reconciliation of active test cases.

Synthesized from a 4-ticket dedup cluster:
- TRUNK-18262 (primary, action-type at creation, v174)
- TRUNK-18259 (absorbed, same, trunk2#3945)
- TRUNK-18172 (absorbed, label action, trunk2#3774)
- TRUNK-18346 (absorbed, switch action type after creation, v183, trunk2#3951)

Focus is the NEW story (post-creation switching). The creation-time
action picker and label actions were already published in
changelog/2026-05-18-flaky-tests-monitor-label-actions.mdx.

Source eng PR: trunk-io/trunk2#3951 (mergedAt 2026-05-14). Date basis:
latest source PR mergedAt across the cluster.

Wired into all four sites: entry .mdx, docs.json nav, changelog/index.mdx,
flaky-tests/changelog.mdx.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@samgutentag samgutentag force-pushed the sam-gutentag/changelog-flaky-tests-monitor-action-types branch from d9ce616 to 833901d Compare May 29, 2026 06:17
@samgutentag samgutentag marked this pull request as ready for review May 29, 2026 06:19
@samgutentag samgutentag merged commit 6ce465e into main May 29, 2026
3 checks passed
@samgutentag samgutentag deleted the sam-gutentag/changelog-flaky-tests-monitor-action-types branch May 29, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog PR touches the changelog (auto-generated drafts, hosting, formatting, indexing). code-verified verify-docs-against-code: all factual claims confirmed in source. ready to merge Verify docs PR: customers can use this. Ready to publish.

Development

Successfully merging this pull request may close these issues.

1 participant