Skip to content

fix: npm routing, discover cat redirect, proxy quoted args#480

Open
pszymkowiak wants to merge 1 commit intodevelopfrom
fix/batch-bugs-470-289-315
Open

fix: npm routing, discover cat redirect, proxy quoted args#480
pszymkowiak wants to merge 1 commit intodevelopfrom
fix/batch-bugs-470-289-315

Conversation

@pszymkowiak
Copy link
Collaborator

@pszymkowiak pszymkowiak commented Mar 10, 2026

Closes #470, Closes #315, Closes #388

Summary

#470 — npm run is broken

  • rtk npm install was executing npm run install instead of npm install
  • Added npm subcommand detection: known subcommands (install, list, audit, test, etc.) pass directly
  • Unknown args (script names like "build") still get run injected

#315 — discover: cat > inflates savings

  • cat > file.txt, cat >> file.txt, cat | grep are write/pipe operations with no terminal output
  • Added early-return in classify_command() to exclude redirects

#388 — rtk proxy fails with quoted command (P2)

  • Claude sends rtk proxy 'head -50 file.php' (one quoted arg) instead of separate args
  • Auto-split single arg containing spaces into command + args

Test plan

  • cargo test — 770 passed
  • Manual: rtk npm run build → works ✅
  • Manual: rtk npm install → no longer runs npm run install
  • Manual: rtk proxy 'head -5 Cargo.toml' → works ✅
  • Unit: cat > file classified as Unsupported ✅

#388)

#470: rtk npm now correctly routes npm subcommands (install, list,
audit, etc.) without injecting "run". Previously, `rtk npm install`
was executed as `npm run install`.

#315: discover no longer counts `cat >`, `cat >>`, `cat |` as missed
savings. These are write/pipe operations with no terminal output to
compress.

#388: rtk proxy now auto-splits a single quoted argument containing
spaces. `rtk proxy 'head -50 file.php'` now works like
`rtk proxy head -50 file.php`.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
@pszymkowiak pszymkowiak force-pushed the fix/batch-bugs-470-289-315 branch from ae631da to 46dded7 Compare March 10, 2026 21:38
@pszymkowiak pszymkowiak changed the title fix: npm subcommand routing + discover cat redirect false positive fix: npm routing, discover cat redirect, proxy quoted args Mar 10, 2026
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.

1 participant