Skip to content

categorize_command sends 21 filtering commands to other in the ecosystem mix; nothing ties its match to Commands #4428

Open

Description

@KuSh

Summary

categorize_command (src/core/tracking.rs) buckets each telemetry row by its second word through a hand-kept match. #4316 (uv) and #4023 (psql, mysql) are two instances of the same gap: a command gets a filter and a Commands variant, nobody adds it to the match, and its rows land in other.

On develop a4f444e with #4328 merged, comparing rtk --help against the match arms, these filtering commands still reach _ => "other":

  • js: jest
  • git: glab
  • cloud: aws, oc, curl, wget, psql
  • php: php, phpunit, phpstan, pest, paratest, ecs, pint, phpt
  • jvm: gradlew, mvn, mvnd, sbt
  • search: rg, ast-grep

(Meta commands such as gain, init and config are left out of the list.)

RUST_HANDLED_COMMANDS in src/core/toml_filter.rs has the same shape and has drifted from the clap enum too (#3402).

Fix

Add the missing arms (new php and jvm buckets where none fits), and add a test that walks the Commands subcommand names from clap (Cli::command().get_subcommands()) and fails when a filtering command is uncategorized, with an explicit allow-list for meta commands. Then the next new command fails the test instead of silently reporting as other.

Activity

  1. added
    bug
    help wanted
    on Oct 3, 2026
  2. rtk-wshm-sync-bot commented on Oct 3, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟡 Priority medium
    🎯 Confidence 90%

    Summary

    categorize_command in src/core/tracking.rs miscategorizes 21 filtering commands as 'other'; add missing match arms plus a clap-driven test to prevent recurrence.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • src/core/tracking.rs
    • src/core/toml_filter.rs

    Suggested Actions

    1. Add missing match arms in src/core/tracking.rs for js/git/cloud/php/jvm/search commands
    2. Add a test walking Cli::command().get_subcommands() with an allow-list for meta commands
    3. Sync RUST_HANDLED_COMMANDS in src/core/toml_filter.rs, also flagged in gradle, dotnet-build and uv-sync filters can never activate — and rtk verify reports them green because the test harness never exercises match_command #3402
    4. Cross-reference categorize_command has no uv arm, so every rtk uv … row counts as other in the ecosystem mix #4316 and categorize_command buckets psql (and mysql) as "other" instead of "cloud" in rtk gain #4023, which reported the same categorize_command gap

    Triaged automatically by wshm · This is an automated analysis, not a human review.

  3. nightcityblade commented on Oct 3, 2026

    @nightcityblade

    Hi, I'd like to work on this. I'll submit a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bughelp wantedpriority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions