Repository navigation
feat(upload): link failing tests by GUID when only the quarantine lookup named the collection - #1295
Merged
trunk-io[bot] merged 3 commits intoNov 12, 2026
Conversation
|
😎 Merged successfully - details. |
acatxnamedvirtue
requested review from
TylerJang27,
dfrankland and
max-trunk
November 11, 2026 15:43
TylerJang27
approved these changes
Nov 12, 2026
| .assert() | ||
| .failure() | ||
| .stdout(predicate::str::contains( | ||
| "/test-org/flaky-tests/collections/tc_123/tests/", |
Collaborator
There was a problem hiding this comment.
I would think we could get a stronger assertion on the actual guid here
Contributor
Author
There was a problem hiding this comment.
Agreed. Fixed in 859cd87: the test now pins the exact link, …/test-org/flaky-tests/collections/tc_123/tests/ae979ba6-6f93-8657-9f84-0265e5ac404c.
- Fixture:
generate_mock_valid_junit_xmlsuses a random seed, so its test ids and GUIDs changed on every run. The test now uses the checked-injunit0_fail.xml, which has one failing test,HelloTest.Hello. - Where the GUID comes from: the quarantine lookup's
testCollectionUuid(MOCK_TEST_COLLECTION_ID), itsrepositoryId(MOCK_REPO_ID), and the test case id the CLI sent. I checked it independently againstgen_test_case_guid's hash rule. - Also asserted: exactly one
/tests/link, and both existing negative checks are kept. - Mutation check: making the code hash the short id
tc_123or a nil repo id now fails the test. The old prefix-only assertion passed with a nil repo id.
…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>
…ce (TRUNK-21084) The test only checked the `/collections/tc_123/tests/` prefix, so a link built from the short id, a nil repo id or the wrong test still passed. It now uploads the checked-in junit0_fail.xml instead of the randomly seeded mock, so the one failing test's id is stable, and asserts the full URL and that it is the only test link printed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1084) #1298 made test_case_url's short_id required, so the no-repo GUID test no longer compiled once rebased onto main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acatxnamedvirtue
force-pushed
the
tylerbeebe/trunk-21084-analytics-cli-render-guid-test-case
branch
from
November 12, 2026 19:52
859cd87 to
d7a2383
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1295 +/- ##
==========================================
+ Coverage 85.68% 85.90% +0.21%
==========================================
Files 85 85
Lines 19440 19461 +21
==========================================
+ Hits 16658 16717 +59
+ Misses 2782 2744 -38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withgen_test_case_guidfrom 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 sametestCollectionUuidandrepositoryId.Most of TRUNK-21084 already landed in #1196 (GUID collection links) and #1256 (v2 upload and quarantine). This closes the remaining gap.
What changes
QuarantineContextkeeps the quarantine lookup's ids.What does not change
/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.--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.Tests
--no-repogolden vector (943a80af-66b0-84bb-ad01-56b3b72fe363) next to the existing with-repo vector. Both matchcontext/src/meta/id.rs, the bindings and trunk2's ingest contract test.Part of TRUNK-21084
🤖 Generated with Claude Code