Skip to content

docs(changelog): master/develop as default stable branches, rendered webhook citations#157

Draft
samgutentag wants to merge 1 commit into
mainfrom
sam-gutentag/changelog-flaky-tests-stable-branches-webhook-citations
Draft

docs(changelog): master/develop as default stable branches, rendered webhook citations#157
samgutentag wants to merge 1 commit into
mainfrom
sam-gutentag/changelog-flaky-tests-stable-branches-webhook-citations

Conversation

@samgutentag
Copy link
Copy Markdown
Member

What shipped

Bundled Flaky Tests changelog entry covering two increments from this release window:

  • master and develop are now recognized as stable branches by default (alongside main); uploads from them are classified as stable-branch uploads and the stable-branch setup banner is removed for those repos.
  • The test_case.investigation_completed AI investigation webhook now delivers fully rendered citation links in markdown_summary and facts[].content, replacing raw CITE:TAG placeholders.

Source

Wired into all four sites

  • changelog/2026-04-17-flaky-tests-stable-branches-webhook-citations.mdx (entry)
  • docs.json (Changelog tab 2026 group)
  • changelog/index.mdx (April 2026 section)
  • flaky-tests/changelog.mdx (new April 2026 section)

Docs link: https://docs.trunk.io/flaky-tests/get-started

🤖 Generated with Claude Code

…webhook citations

Bundled Flaky Tests entry covering two increments:
- master and develop recognized as stable branches by default (trunk-io/trunk2#3555, #3556)
- AI investigation webhook payloads render citation links in markdown_summary and facts[].content (trunk-io/trunk2#3592)

TRUNK-18212. Date basis: latest source PR mergedAt (#3592, 2026-04-17).
Wired: entry .mdx, docs.json, changelog/index.mdx, flaky-tests/changelog.mdx.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@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:53 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-29): live

Verified: customers can use this. Ready to publish.

  • Flag state: read directly from LaunchDarkly (production: ON_100; test: ON_100)
  • Eng PR: trunk-io/trunk2#3555, trunk-io/trunk2#3556 (default stable branches, ungated), trunk-io/trunk2#3592 (webhook citations)
  • Flag: emitInvestigationResultWebhooks (project backend-services) on the #3592 webhook path; the #3555/#3556 stable-branch half is ungated.
  • Signals: LaunchDarkly get-flag (primary). The webhook flag emitInvestigationResultWebhooks reads production on=true with fallthrough serving the enabling true variation (index 0) at 100%, no rules or targets restricting it. The stable-branch half is ungated and live. All three eng PRs merged, merge commits intact on main.

Both halves of the bundled entry are live in production. Ready to publish. (Prior verdict was pending from the heuristic fallback, which used the constant name and could not confirm the flag; resolving the LD flag key to emitInvestigationResultWebhooks in backend-services and reading it directly shows prod at 100%, correcting the verdict to live.)

@samgutentag samgutentag added pending Verify docs PR: eng merged but flag off in prod. Hold off. code-verified verify-docs-against-code: all factual claims confirmed in source. and removed ready to merge Verify docs PR: customers can use this. Ready to publish. labels 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
master and develop are in the default stable branches, alongside main confirmed repo.rs:17-21
Webhook event is named test_case.investigation_completed confirmed test-case-investigation-completed.ts:11
markdown_summary carries the rendered summary confirmed webhook.ts:225
facts[].content carries rendered inline citations confirmed webhook.ts:208
Citation placeholder simplified from (CITE:FACT_TYPE:TAG) to (CITE:TAG) confirmed trunk2#3592 diff

All five factual claims in the entry are confirmed against source. No corrections needed. (The pending verdict from verify-docs-pr is about rollout state of the webhook emission flag, not content accuracy.)


Source #1 — master and develop are default stable branches (confirmed)

File: trunk-io/trunk2/rs/crates/bundle-ingestion-lib/src/controllers/repo.rs#L17-L21

static DEFAULT_STABLE_BRANCHES: LazyLock<Vec<String>> = LazyLock::new(|| {
    vec![
        String::from("main"),
        String::from("master"),
        String::from("develop"),

Reasoning: The default list literally contains all three branch names. PR trunk2#3555 changed this from vec!["main"]. get_stable_branches falls back to this default when a repo has no override (L233), so uploads from master/develop are classified as stable-branch uploads without configuration. Confirms the headline.

Source #2 — webhook event name (confirmed)

File: trunk-io/trunk2/ts/packages/tools/svix-publish-schemas/src/events/test-case-investigation-completed.ts#L11

    type: "test_case.investigation_completed",
    markdown_summary:
      ...
    facts: [
      {
        fact_type: "GIT_BLAME",
        content:

Reasoning: The event definition uses the exact string test_case.investigation_completed, and the example payload includes markdown_summary and a facts[] array whose entries have fact_type and content. Confirms the event name and field names cited in the entry.

Source #3 and #4 — markdown_summary and facts[].content render citations (confirmed)

File: trunk-io/trunk2/ts/apps/backend/flaky-tests-investigation-poller/src/webhook.ts#L208

      content: await renderFactWithCitations(fact, repoContext, params.readDb),
      ...
    markdown_summary: markdownSummary,

Reasoning: facts[].content is produced by renderFactWithCitations (L208), and markdown_summary is set to the rendered summary (L225). The schema describes content as "Detailed content describing the fact with inline citations to supporting evidence" (L42). This confirms both fields deliver rendered citations rather than raw placeholders.

Source #5 — placeholder format simplified to (CITE:TAG) (confirmed)

File: trunk2#3592 diff

-  "The test fails with a timeout in [Run #42](CITE:CI_LOGS:RUN_42). See [src/test.ts](CITE:CI_LOGS:TEST_FILE)."
+  "The test fails with a timeout in [Run #42](CITE:RUN_42). See [src/test.ts](CITE:TEST_FILE)."

Reasoning: The PR's own test fixtures change the placeholder from (CITE:FACT_TYPE:TAG) form (e.g. CITE:CI_LOGS:RUN_42) to (CITE:TAG) form (CITE:RUN_42), confirming the format simplification the entry references.

@samgutentag samgutentag added ready to merge Verify docs PR: customers can use this. Ready to publish. and removed pending Verify docs PR: eng merged but flag off in prod. Hold off. labels May 29, 2026
Copy link
Copy Markdown
Member Author

Verification status (May 31, 2026): live

Verified: customers can use this. Ready to publish.

  • Flag state: read directly from LaunchDarkly (production: ON_100; test: ON_100). emitInvestigationResultWebhooks in backend-services: prod on=true, fallthrough variation 0 (true) = ON_100. Staging also ON_100. Confirmed same state as May 29.
  • Eng PR: trunk-io/trunk2#3555, trunk-io/trunk2#3556, trunk-io/trunk2#3592 (all merged, intact on main)
  • Flag: emitInvestigationResultWebhooks (project backend-services, maintainer: Tyler) on the #3592 webhook path; the #3555/#3556 stable-branch half is ungated
  • Signals: LaunchDarkly get-flag called directly this sweep. Prod ON_100. Both halves (stable-branch + webhook citations) are live. No change since last sweep.

Ready to publish.


Generated by Claude Code

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