Skip to content

fix(telemetry): avoid low savings arg leakage - #2578

Closed
YOMXXX wants to merge 1 commit into
rtk-ai:developfrom
YOMXXX:fix/issue-1785-telemetry-low-savings
Closed

YOMXXX wants to merge 1 commit into
rtk-ai:developfrom
YOMXXX:fix/issue-1785-telemetry-low-savings

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • report only coarse command labels for telemetry command stats
  • stop low_savings_commands from sending URL/path/token-like command arguments
  • cover rtk proxy and rtk:toml command forms with an in-memory tracking regression test

Fixes #1785

Verification

  • cargo +1.93.0 fmt --check
  • git diff --check
  • cargo +1.93.0 test tracking::tests -- --nocapture
  • cargo +1.93.0 test telemetry -- --nocapture
  • cargo +1.93.0 clippy --all-targets
  • cargo +1.93.0 test --all -- --skip small_grep_not_worse_than_plain

@KuSh

KuSh commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

#4123 (merged 2026-09-23) fixed the low_savings_commands leak by mapping it through command_label, which keeps only RTK-chosen words and basenames the tool, so that hunk and telemetry_command_label are covered. What develop still lacks is the top_commands change: Tracker::top_commands in src/core/tracking.rs still reports the second word, so an rtk:toml /path/to/tool --flag record sends the tool path. Could you rebase onto current develop and narrow the PR to top_commands? It conflicts with develop in src/core/tracking.rs. Reusing develop's command_label there would also cover rtk ./gradlew build, which currently sends ./gradlew and which the label in this PR does not basename. Thanks for spotting the leak.

@KuSh

KuSh commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Thank you for this fix. #4123 (merged 2026-09-23) replaced the low_savings_commands label with command_label, which keeps only the tool basename and a routed subcommand and has tests for argument-carrying and routed commands, so that half of this PR is already on develop. One case remains: top_commands in src/core/tracking.rs still labels rows with the second word, so a TOML-filtered tool invoked by an absolute path sends that path in telemetry; an issue or a narrow PR that reuses command_label there would be welcome. If I missed something else this PR covers, please comment and it can be reopened.

@KuSh KuSh closed this Oct 3, 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.

Prevent telemetry low_savings_commands from including arguments

2 participants