Skip to content

feat(make): add rtk make subcommand filtering directory chatter - #3515

Open
DeepTrial wants to merge 1 commit into
rtk-ai:developfrom
DeepTrial:feat/make-wrapper
Open

feat(make): add rtk make subcommand filtering directory chatter#3515
DeepTrial wants to merge 1 commit into
rtk-ai:developfrom
DeepTrial:feat/make-wrapper

Conversation

@DeepTrial

@DeepTrial DeepTrial commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • 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 (Correctness over savings).

Motivation

As a compiler developer I hit this constantly — every make invocation 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 makertk make, but no such subcommand existed, so rtk fell back to a raw exec make and never filtered. Now clap resolves rtk make and 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

  • Unit tests in src/cmds/system/make_cmd.rs: dir-chatter suppression, sub-tool diagnostics kept, verbose passthrough, empty collapse, flag detection.
  • Removed the now-redundant TOML [filters.make] and updated toml_filter built-in count/tests.
  • cargo fmt --all && cargo clippy --all-targets && cargo test --all all pass.

Docs

  • README.md command table + Test Runners section updated.
  • src/cmds/system/README.md lists make_cmd.rs.

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
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.

feat: add rtk make wrapper (strip recipe echo + directory chatter, keep diagnostics)

1 participant