Repository navigation
Conversation
📊 Automated PR Analysis
SummaryFixes cargo test's passthrough runner to correctly detect Review Checklist
Linked issues: #4453 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
yeahjack
marked this pull request as ready for review
October 5, 2026 16:03
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
cargo test -- --listthrough the existing passthrough runner, including both output streams and Cargo's exit code--listonly in libtest's option region, after Cargo's restored--boundary; do not mistake a flag value or an unclaimed libtest separator's positional argument for a listing requestCloses #4453. This is separate from #4348's help handling.
Spec-driven re-review
Acceptance was derived from #4453, CONTRIBUTING.md's flag-aware transparency requirement, and libtest's listing contract before inspecting this implementation.
single_target_listing_preserves_both_streams,multiple_targets_and_benchmarks_are_not_swallowed,empty_and_terse_listings_preserve_requested_format,compilation_failure_keeps_diagnostics_and_exit_status, and the addedlisting_preserves_whitespace_and_unterminated_streams(CRLF, no trailing newline, empty output, manifest path containing spaces).list_detection_respects_cargo_and_libtest_boundariesand exact spawned-argv assertions.ordinary_runs_and_literal_list_arguments_still_use_test_filter; source review confirms the listing branch callsrunner::run_passthrough, which preserves signal/exit handling and uses zero-input/zero-output passthrough tracking rather than claiming savings.The independent pass found one real boundary bug: libtest consumes
--as the value of--skip, socargo test -- --skip -- --liststill requests a listing. The first implementation stopped classifying flags at that value. Native libtest confirms the behavior; the fix uses the existing tokenizer’sclaiming_dash_dash()option, with a positive case and a separate unclaimed-boundary negative.libtest_option_can_consume_a_separator_before_listfailed on the first implementation (6 pass/1 fail) and passes after the change (7/7). Real Cargo reproductions also pass, including the consumed-value case; six tracking records use the shared zero-savings passthrough accounting. Non-goals remain listing parsing, help/no-capture changes, and unrelated Cargo commands. Cargo shell fixtures execute on Unix only; the recognizer unit test is portable.Verification
cargo fmt --all --check,cargo clippy --offline --all-targets, andcargo test --offline --allpassed: 4,121 tests passed; 8 pre-existing ignored tests were not runCI run 37336694478 passed for
81e42531e5200ebd621372a213d3da86d04a3e1b, including Windows/macOS/Linux tests, formatting, clippy, benchmark and security jobs. CLA status passed. The target-branch job is intentionally skipped for the develop base. The optional AI documentation review was skipped because its repository API key is not configured; the job reports success.The spec-driven self-review has no remaining known in-scope finding. Ready for maintainer review.