-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Description
Summary
Add token-optimized filtering for cargo nextest output. cargo-nextest is a popular next-generation Rust test runner used as an alternative to cargo test.
Motivation
cargo nextest run produces verbose output with compilation lines, PASS lines for every test, and post-summary recaps. For LLM consumption, only failures and a compact summary are needed.
Proposed Behavior
rtk cargo nextest [args...]routes through a dedicated filter- Strip compilation noise (Compiling, Finished, Starting lines)
- Strip all PASS lines
- Show only failure details (FAIL lines, stdout/stderr, backtraces)
- Show a compact summary line (e.g., "301 passed, 0 failed")
- Strip post-summary recap sections
- Verbose mode (
-v) shows full output
Expected Token Savings
90%+ reduction on typical test runs (similar to rtk cargo test).
Implementation Notes
- New
CargoCommand::Nextestvariant incargo_cmd.rs - New
Nextestsubcommand inCargoCommandsenum inmain.rs - Reuses the existing
run_cargo_filteredinfrastructure - Extracts
flush_failure_blockhelper to DRY up failure block collection
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels