Repository navigation
Description
Summary
Add an rtk make subcommand that wraps make, following the same pattern as rtk cargo / rtk mvn / rtk gradlew / rtk go. Currently make has no first-class filter, and (per #1714) the hook rewrites make <target> to rtk make <target>, which clap rejects since no such subcommand exists — every make invocation goes through a parse-and-fallback round trip before running raw. Related but distinct: #2236 (cmake filter), #1035 (composite-command tail loss), #1714 (rewrite false positive).
Why
make remains the default entry point for a lot of repo-local task runners (make test, make build, make check, make lint). Its output is dominated by two low-signal noise sources:
- Recipe echo: every non-
@-prefixed recipe line is printed before execution. - Directory chatter:
make[1]: Entering directory .../Leaving directory ...on every recursive invocation.
Local frequency data from one heavy user (rtk history.db, ~30 day window): 102 make ... invocations, 0 parsed successfully, 100% fell back to raw passthrough after a failed rtk make rewrite. Every one is currently a guaranteed wasted rewrite attempt with zero filter benefit.
Suggested behavior
Match the shape of rtk cmake (#2236):
- On success: drop
make[N]: Entering/Leaving directorylines and recipe-echo lines; leave sub-tool output alone so it can route through existing filters where applicable (a recipe runningpyteststill benefits from pytest-style filtering downstream). - On failure (non-zero exit or
*** Error N): preserve the failing recipe line, the tool it invoked, and its diagnostics verbatim. Always keep the tail so the failure summary survives (see Output lost on composite commands (make ci-local / vitest) - summary lines removed #1035). - Pass
-n/--dry-run/-p/--print-data-basethrough unfiltered (their whole point is verbose introspection).
Example
Input:
$ make test
make[1]: Entering directory '/proj/sub'
gcc -c foo.c -o foo.o
gcc -c bar.c -o bar.o
./run_tests
tests: 42 passed, 0 failed
make[1]: Leaving directory '/proj/sub'
Filtered:
tests: 42 passed, 0 failed
On failure, the failing recipe line + diagnostics stay verbatim.
Notes
Recipe output is heterogeneous by design (unlike cargo test/pytest, which have a fixed output contract), so the filter should be conservative: strip make's own framing, leave the recipe's own stdout/stderr alone (or delegate to an existing filter if the recipe is a known tool). Resolves the #1714 false-positive by making the rewrite target actually valid. If the surface area above is too broad for a first pass, a narrower v1 that just stops the wasted rewrite attempt (either by not rewriting make at all, or by stripping only the directory-chatter lines) would already fix the 0%-success problem.
Activity
pszymkowiak commentedon Aug 9, 2026
🔍 Automated Triage
featuremediumSummary
Add an
rtk makesubcommand filter (mirroring cmake/cargo/mvn/gradlew) to strip recipe echo and directory-chatter noise while preserving failure diagnostics; currently 100% of make invocations fail the rewrite and fall back to raw passthrough.📁 Relevant files
src/filters/cmake.rssrc/filters/make.rssrc/cli.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
DeepTrial commentedon Aug 10, 2026
I'd like to take this. As a compiler developer I hit this constantly — every
makeinvocation in my agent loops goes through a wasted rewrite round-trip and falls back to raw passthrough, so the directory chatter and recipe echo noise ends up in context. I'll implementrtk makeas a first-class Rust subcommand (mirroring the existingrtk litpattern) that suppressesmake[N]: Entering/Leaving directorylines and preserves all sub-tool output, with the fallback-on-nonzero-exit guarantee. Plan to remove the now-redundant TOML[filters.make]rule and add unit tests + docs.DeepTrial commentedon Aug 10, 2026
Implemented in PR #3515 (branch
feat/make-wrapper, basertk-ai/rtk:develop).What changed:
rtk makeas a first-class Rust subcommand (src/cmds/system/make_cmd.rs) that suppressesmake[N]: Entering/Leaving directorychatter and preserves all sub-tool output (gcc/clang/pytest diagnostics), collapsing fully-stripped runs tomake: ok. Verbose flags pass raw output through.make→rtk make, but no such subcommand existed, so rtk fell back to a raw exec and never filtered. Now clap resolvesrtk makeand routes to the new module.[filters.make]and updatedtoml_filterbuilt-in count/tests.cargo fmt --all && cargo clippy --all-targets && cargo test --allall pass.Note: followed the conservative filter variant (directory chatter only; recipe echo left intact) per earlier discussion — recipe-echo suppression can be a follow-up if wanted.
Fixes #3487.