Skip to content

feat(upload): link failing tests by GUID when only the quarantine lookup named the collection - #1295

Open
acatxnamedvirtue wants to merge 1 commit into
mainfrom
tylerbeebe/trunk-21084-analytics-cli-render-guid-test-case
Open

acatxnamedvirtue wants to merge 1 commit into
mainfrom
tylerbeebe/trunk-21084-analytics-cli-render-guid-test-case

Conversation

@acatxnamedvirtue

Copy link
Copy Markdown
Contributor

The failing-tests table in the upload summary (text, JSON and GitHub output) links each test to {app}/{org}/flaky-tests/collections/{shortId}/tests/{guid}. The guid is the ADR-0019 test-case GUID, computed in-process with gen_test_case_guid from the collection uuid, the repository id and the test's id. Until now the table took that pair only from the upload response. A failed upload, or a dry run on v2, has no upload ids, so the table fell back to the /t/<id>?repo= short link, even when the v2 quarantine lookup had already returned the same testCollectionUuid and repositoryId.

Most of TRUNK-21084 already landed in #1196 (GUID collection links) and #1256 (v2 upload and quarantine). This closes the remaining gap.

What changes

  • QuarantineContext keeps the quarantine lookup's ids.
  • The upload summary uses the upload's ids, or the lookup's when the upload gives none.
  • The "Learn more" lines already used the lookup's ids on v2, so they are unchanged.

What does not change

  • Runs with no collection keep the repo-scoped /flaky-tests/test/<id>?repo= link, and a run with a collection but no ids from either response keeps the short link. TRUNK-23150 removes the repo-only paths separately.
  • v1 "Learn more" lines, and a plain --dry-run (which never asks for the API version), keep the short link. Changing that means moving the version call, which feat(cli): upload fork PRs on v2 by swapping the job's GITHUB_TOKEN #1293 is reworking.
  • No API client or response changes.

Tests

  • New CLI test: a v2 run whose upload is refused still prints GUID links, using the quarantine lookup's ids. It fails without this change.
  • New URL test: pins ADR-0019's --no-repo golden vector (943a80af-66b0-84bb-ad01-56b3b72fe363) next to the existing with-repo vector. Both match context/src/meta/id.rs, the bindings and trunk2's ingest contract test.
  • Locally 372 of 375 pass; the 3 failures are Swift xunit tests that need a Swift language server.

Part of TRUNK-21084

🤖 Generated with Claude Code

…kup named the collection

The failing-tests table built its GUID links only from the upload's ids. A dry run
or a failed upload has none, so it fell back to the `/t/<id>?repo=` short link even
when the v2 quarantine lookup had already returned the collection uuid and
repository id. The run now uses the lookup's pair when the upload gives none.

Also pins ADR-0019's `--no-repo` golden vector at the URL layer.

Part of TRUNK-21084

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Nov 9, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

This branch has not been deployed

No deployments
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.

1 participant