Repository navigation
fix(cli): fail when test's command can't be started - #1250
Merged
trunk-io[bot] merged 1 commit intoOct 29, 2026
Merged
Conversation
|
😎 Merged successfully - details. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1250 +/- ##
==========================================
+ Coverage 85.42% 85.62% +0.20%
==========================================
Files 86 86
Lines 19235 19247 +12
==========================================
+ Hits 16431 16480 +49
+ Misses 2804 2767 -37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
TylerJang27
approved these changes
Oct 26, 2026
`trunk-analytics-cli test -- <command>` exited 0 when the command couldn't be started, for example because of a typo in its name. It printed "Unable to connect to trunk's server", so a CI job with a broken test command passed. The error from starting the process is an io::Error, which the error report treats as a refused connection, and those exit 0 by design. Now it's raised like the CLI's other can't-continue errors, so `test` exits 70 and prints "Couldn't run the test command `<command>`: <reason>". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dfrankland
force-pushed
the
dylan/cli-test-fails-when-command-cannot-start
branch
from
October 29, 2026 17:40
4fff580 to
ec1cb62
Compare
Member
Author
|
/trunk merge |
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.
trunk-analytics-cli test -- <command>exited 0 when the command couldn't be started, for example because of a typo in its name. It printed "Unable to connect to trunk's server", so a CI job with a broken test command passed. Found while surveying exit codes for TRUNK-22762.Why. Starting the process fails with an
io::Error. The error report treats anyio::Errorat the root of an error as a refused connection, and those exit 0 by design, so CI isn't blocked when Trunk is unreachable.What changes. The failure is now raised as an
InterruptingError, like the CLI's other can't-continue errors (for example "No test output files found to upload.").testexits 70 and prints:Release note. A
testrun whose command can't be started now fails with exit code 70 instead of passing.Testing.
test_command_fails_when_the_command_cannot_be_startedchecks for exit code 70, the new message, no "Unable to connect", and no requests to Trunk. It fails on main, where the run exits 0.cargo test -p trunk-analytics-cli --test test: all pass.cargo clippy -p trunk-analytics-cli --all-targets: no new warnings.🤖 Generated with Claude Code