Skip to content

trunk-merge/pr-1198/1e518b74-73bc-46b1-892c-2b8577e47ccd - #1199

Closed
trunk-io[bot] wants to merge 5 commits into
mainfrom
trunk-merge/pr-1198/1e518b74-73bc-46b1-892c-2b8577e47ccd
Closed

trunk-merge/pr-1198/1e518b74-73bc-46b1-892c-2b8577e47ccd#1199
trunk-io[bot] wants to merge 5 commits into
mainfrom
trunk-merge/pr-1198/1e518b74-73bc-46b1-892c-2b8577e47ccd

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Sep 10, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the main branch at SHA 8396875a330f76a7248a29df0ff7f1861cf906ac.

See more details here.

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing the changes from pull request 1198.

dfrankland and others added 5 commits September 10, 2026 18:36
`--swift-test-xunit-paths` is absent from every `required_unless_present_any`
list, so the usage its own help text documents

    trunk upload --swift-test-xunit-paths out-swift-testing.xml,out.xml

fails at argument parsing:

    error: the following required arguments were not provided:
      --junit-paths <JUNIT_PATHS>
      --bazel-bep-path <BAZEL_BEP_PATH>
      --test-reports <TEST_REPORTS>

It is a real report source -- `coalesce_junit_path_wrappers` handles it on its
own branch and produces junit path wrappers from it -- so it belongs in those
lists alongside the other three.

The workaround it forces is worse than the error. Callers have to supply a
junit glob they do not want, and the obvious value, the report they are already
uploading, silently doubles every test: the two lists are appended rather than
reconciled, so each test arrives once with the file a language server resolved
and once with none. Measured on a 3-case suite uploaded both ways, the bundle
holds 6 cases, and because `file` feeds `gen_info_id` those are two distinct
tests rather than one test twice.

`upload_bundle_using_swift_test_xunit` could not catch either problem. It
inherits `CommandBuilder`'s default `--junit-paths ./*`, which both hid the
missing requirement and matched the two xunit files it writes into the repo
root -- so the test has been exercising the double-upload path all along. Its
assertions keyed a HashMap by test name, and a duplicate carries the same name,
so the second copy overwrote the first and nothing looked wrong.

So the test now passes no paths argument at all, via a new `PathsState::NoPaths`
that is distinct from a `None` paths_state, and asserts the exact case count.
That makes it a real test of standalone usage, and gives the duplication
somewhere to show up if it comes back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`PathsState` is the report-source selector, and this change's whole claim is
that --swift-test-xunit-paths is a fourth source alongside junit, BEP, and
xcresult. A `NoPaths` variant said the opposite: that the source was something
smuggled past the selector through extra_args, with a second flag to suppress
the default. Nothing else wanted "no source at all", so the variant existed
only to work around its own framing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
It contrasted PathsState against extra_args, which the code no longer does, so
it documented the shape of an earlier edit rather than the test. The assertion
keeps its own comment, which says why the count is exact and what six would
mean -- neither readable off the code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`Limits::default()` sizes one resolution on a machine doing nothing else. A
test binary starts a `sourcekit-lsp` per test, all at once, under coverage
instrumentation and alongside the rest of the workspace's suite -- and a server
that has not answered `initialize` inside `request_timeout` is abandoned rather
than waited on, so every test in that process resolves to nothing.

That is what the x86_64 musl runner hit: three of these failed at exactly
30.016s, the default timeout, while the four that ran once the machine
quietened took 10s each. The same tests take 0.4s on aarch64 once warm.

Only the clock moves; every value the tests assert on is still resolved the way
the defaults resolve it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.85%. Comparing base (8396875) to head (9fe9f30).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1199      +/-   ##
==========================================
+ Coverage   83.63%   83.85%   +0.22%     
==========================================
  Files          74       74              
  Lines       17573    17573              
==========================================
+ Hits        14697    14736      +39     
+ Misses       2876     2837      -39     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trunk-staging-io

trunk-staging-io Bot commented Sep 10, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
pending_quarantine_test should be quarantined when run with variant A test marked as pending was expected to fail but unexpectedly passed. Logs ↗︎
variant_quarantine_test should be quarantined when run with variant A test expected the sum of 2 + 2 to be 5, but it was actually 4, indicating a failing assertion. Logs ↗︎

View Full Report ↗︎Docs

@trunk-io

trunk-io Bot commented Sep 10, 2026

Copy link
Copy Markdown
Author

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@trunk-io trunk-io Bot closed this Sep 10, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-1198/1e518b74-73bc-46b1-892c-2b8577e47ccd branch September 10, 2026 23:01
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.

2 participants