Skip to content

fix: include "Finished" line in cargo build/check success output#763

Open
mvanhorn wants to merge 1 commit intortk-ai:developfrom
mvanhorn:osc/759-include-finished-line-in-cargo-output
Open

fix: include "Finished" line in cargo build/check success output#763
mvanhorn wants to merge 1 commit intortk-ai:developfrom
mvanhorn:osc/759-include-finished-line-in-cargo-output

Conversation

@mvanhorn
Copy link

Summary

Preserves the cargo Finished ... line in the filtered success output for rtk cargo build and rtk cargo check. Previously, success output only showed cargo build (0 crates compiled) which was ambiguous - LLMs couldn't tell if the build succeeded or if there were errors.

Why this matters

Per #759, Claude interpreted cargo build (0 crates compiled) as potentially erroneous and tried workarounds (rtk proxy cargo check, RUSTFLAGS="-D warnings" rtk proxy cargo check), consuming extra tokens. Claude expected to see the Finished dev profile ... message as a clear success signal.

Changes

  • src/cargo_cmd.rs: In filter_cargo_build(), capture the Finished line instead of skipping it, and append it to the success summary. The output now looks like:
    cargo build (5 crates compiled)
    Finished dev [unoptimized + debuginfo] target(s) in 2.53s
    

Testing

All 38 cargo_cmd tests pass (cargo test cargo_cmd). The change only affects the success path - error/warning output is unchanged.

Fixes #759

This contribution was developed with AI assistance (Claude Code).

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2026

CLA assistant check
All committers have signed the CLA.

@aeppling
Copy link
Contributor

Hello, thanks for contributing with this fix,

Please target develop branch and read CONTRIBUTING.md so you can pass all checks,

@aeppling aeppling self-assigned this Mar 21, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mvanhorn mvanhorn force-pushed the osc/759-include-finished-line-in-cargo-output branch from 3d8e6e5 to 4a06317 Compare March 22, 2026 02:16
@mvanhorn mvanhorn changed the base branch from master to develop March 22, 2026 02:16
@mvanhorn
Copy link
Author

Rebased onto develop and retargeted the PR base. Thanks for the heads up on CONTRIBUTING.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo output on success is too terse, making it ambiguous

3 participants