Skip to content

cli: META_PASSTHROUGH_BINS missing pytest/ruff/mypy/rake/rubocop/rspec/pip #96

Closed

Description

@thehoff

Symptom

pytest --version recorded −75% savings over 90 calls in the production tracking DB. rake --version similar (13 calls, 0%). These wrappers fall through to a filter that bloats --version/--help output instead of passing it through cleanly.

Root cause

#90 added a META_PASSTHROUGH_BINS pre-clap intercept so cargo --version, npm --version etc. route straight to raw passthrough. The list landed as:

cargo, pnpm, npm, npx, go, docker, kubectl, gh, glab, aws, psql, prisma, gt

It misses the Python/Ruby subcommand-style wrappers that have the same shape — a clap subcommand structure that rejects bare --version/--help:

  • pytest
  • ruff
  • mypy
  • rake
  • rubocop
  • rspec
  • pip

Fix

Add the seven names to META_PASSTHROUGH_BINS and extend the test_meta_passthrough_covers_all_subcommand_only_wrappers regression list to match.

Better (Codex suggested this in the #90 review): derive the list from the clap subcommand registry so it can't drift again. If that's too invasive, the hand-maintained list + the regression test is acceptable.

Acceptance

  • contextcrawler pytest --version, ruff --version, mypy --version, rake --version, rubocop --version, rspec --version, pip --version produce no parse_failures row and no negative-savings commands row.
  • Same for --help/-h/-V where the tool supports them.
  • Regression test updated.

Note

This is distinct from pytest --verbose (−75%, 26 calls) — that's a real pytest run with verbose output the pytest filter mishandles, not a meta flag. Covered by the no-bloat guard issue, not this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions