feat(make): add rtk make subcommand filtering directory chatter - #3515
Open
DeepTrial wants to merge 1 commit into
Open
feat(make): add rtk make subcommand filtering directory chatter#3515DeepTrial wants to merge 1 commit into
DeepTrial wants to merge 1 commit into
Conversation
Add `rtk make` as a first-class Rust subcommand (mirroring the rtk lit pattern) that wraps make/gmake and suppresses `make[N]: Entering/Leaving directory` chatter lines while preserving all sub-tool output (gcc/clang/ pytest diagnostics) so failures stay actionable. Collapses fully-stripped runs to `make: ok`. Verbose flags (-v/--verbose/--trace/--debug/-d) pass raw output through unchanged. This fixes the rewrite round-trip in rtk-ai#3487: the hook rewrote `make` to `rtk make`, but no such subcommand existed, so rtk fell back to a raw exec and never filtered. Now clap resolves `rtk make` and routes to the new module. - Add src/cmds/system/make_cmd.rs with pure filter_make() + run() - Register Make subcommand in main.rs, add to PASSTHROUGH, keep rewrite rule - Remove redundant TOML [filters.make]; update toml_filter built-in count/tests - Add unit tests: dir-chatter suppression, sub-tool diagnostics kept, verbose passthrough, empty collapse - Update README + src/cmds/system/README.md Fixes rtk-ai#3487
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
rtk makeas a first-class Rust subcommand (mirroring thertk litpattern) that wrapsmake/gmakeand suppressesmake[N]: Entering/Leaving directorychatter lines while preserving all sub-tool output (gcc/clang/pytest diagnostics) so failures stay actionable.make: ok.-v,--verbose,--trace,--debug,-d) pass raw output through unchanged (Correctness over savings).Motivation
As a compiler developer I hit this constantly — every
makeinvocation in my agent loops went through a wasted rewrite round-trip and fell back to raw passthrough, so the directory chatter and recipe echo noise ended up in context. This resolves #3487.Root cause (reproduced)
The hook rewrote
make→rtk make, but no such subcommand existed, so rtk fell back to a rawexec makeand never filtered. Now clap resolvesrtk makeand routes to the new module.Scope
Single feature, focused PR per CONTRIBUTING.md. Conservative filter (directory chatter only; recipe echo left intact for future iteration).
Test plan
src/cmds/system/make_cmd.rs: dir-chatter suppression, sub-tool diagnostics kept, verbose passthrough, empty collapse, flag detection.[filters.make]and updatedtoml_filterbuilt-in count/tests.cargo fmt --all && cargo clippy --all-targets && cargo test --allall pass.Docs