Repository navigation
ci: fix cargo-affected invocations (drop --verbose, use -- for nextest args) - #2546
Merged
Merged
Conversation
cargo-affected's `run` subcommand uses `trailing_var_arg = true`, so any unknown flag causes everything after it to be swept into the trailing args sink and forwarded verbatim to `cargo nextest run`. With `--features shell-integration-tests --verbose`, the `--verbose` was forwarded to nextest, which bumped the status level to `all` (per-test START lines) and printed the spawned command for each test. The result was two extra lines per test across ~3400 tests, making CI logs unreadable. cargo-affected already prints its own pipeline progress, so we don't need nextest's verbose mode on top of it. Reference run with the noise: https://github.com/max-sixty/worktrunk/actions/runs/25270305877/job/74091452305?pr=2541 Co-Authored-By: Claude <noreply@anthropic.com>
cargo-affected PR #11 (max-sixty/cargo-affected#11) makes the `run`/`collect` arg parsers strict — both subcommands switch from `trailing_var_arg = true` to `last = true`, so unknown flags now error unless preceded by `--`. The workflow installs cargo-affected at the latest default-branch sha (no rev pin), so once that PR merges, both `cargo affected collect --features shell-integration-tests` and `cargo affected run --features shell-integration-tests` would fail with `UnknownArgument`. Move `--features shell-integration-tests` after `--` in both call sites. This is the new documented form and it works against the current (loose) parser too, so the change is safe to merge before PR #11 lands. Co-Authored-By: Claude <noreply@anthropic.com>
-- for nextest args)
worktrunk-bot
approved these changes
May 3, 2026
This was referenced May 3, 2026
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.
Summary
Two fixes to the
cargo affectedinvocations in.github/workflows/ci.yaml.1. Drop
--verbosefromaffected tests(commit 1)The
affected tests (linux, advisory)job was running:cargo-affected's
runsubcommand currently usestrailing_var_arg = true, so once clap sees an unknown flag (--features), it sweeps everything after it — including--verbose— into the trailing args sink and forwards it verbatim tocargo nextest run. nextest's--verbose:all(per-testSTART [progress]lines), andcommand: /path/to/binary --exact <test> --nocapture).With ~3400 tests, that's two extra lines per test — the CI log becomes unreadable. See the reference run around test 2684/3429 (e.g.,
test_switch_remote_prefix_stripped):https://github.com/max-sixty/worktrunk/actions/runs/25270305877/job/74091452305?pr=2541
cargo-affected already prints its own pipeline progress, so we don't want nextest's verbose mode layered on top.
2. Use
--before--featuresin both call sites (commit 2)cargo-affected PR max-sixty/cargo-affected#11 makes both
runandcollectparsers strict (last = true), so unknown flags will error unless preceded by--. The workflow pulls cargo-affected from the latest default-branch sha (no rev pin), so once that PR merges:cargo affected collect --features shell-integration-tests→UnknownArgumentcargo affected run --features shell-integration-tests→UnknownArgumentBoth call sites move to
cargo affected {run,collect} -- --features shell-integration-tests. The new form is also accepted by the current (loose) parser, so this is safe to merge before PR #11 lands.Test plan
cargo affected runwithout the verbose nextest output (noSTART/command:lines per test).collectandrunsteps continue to work withoutUnknownArgument.🤖 Generated with Claude Code