Skip to content

fix(tracking): count rtk uv rows as python in ecosystem mix - #4328

Merged
KuSh merged 1 commit into
rtk-ai:developfrom
amandeavor:fix/categorize-uv-python
Oct 3, 2026
Merged

KuSh merged 1 commit into
rtk-ai:developfrom
amandeavor:fix/categorize-uv-python

Conversation

@amandeavor

Copy link
Copy Markdown
Contributor

Summary

  • Add uv to the python arm of categorize_command so rtk uv … telemetry rows are not bucketed as other.
  • Cover the mapping with a unit test (rtk uv sync / run / pip).

Fixes #4316

Test plan

  • cargo test --bin rtk categorize_ (Rust 1.91)
  • cargo fmt --all && cargo clippy --all-targets && cargo test

categorize_command mapped pip/pytest/ruff/mypy/sqlfluff to python but
missed uv, so every rtk uv … telemetry row fell through to other.
After the pip uv-fallback labelled those rows rtk pip …, the same
invocation was bucketed differently depending on entry path.

Adds uv to the python arm and pins the mapping in a unit test.

Fixes rtk-ai#4316
Copilot AI lite review requested due to automatic review settings September 28, 2026 03:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added analytics bug Something isn't working tracking labels Sep 28, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Adds uv to the python arm of categorize_command so rtk uv sync/run/pip telemetry rows are correctly bucketed as python instead of falling into other. Includes a unit test covering rtk uv sync, rtk uv run pytest, and rtk uv pip install.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4316


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

@KuSh KuSh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1 of 3 — APPROVED

Claim: rtk uv … telemetry rows are bucketed as python instead of other in the ecosystem mix.
Scope: accept (round 1, frozen)
Ran: telemetry builds (RTK_TELEMETRY_URL pointed at a local server) of merge-base 7efbaef and head 4ad08d9, real uv in ghcr.io/astral-sh/uv:python3.12-trixie-slim, no network, isolated HOME/DB, every command through rtk rewrite first (uv sync, uv run python -c 'print(1)', uv pip list, ls -la); the ping's ecosystem_mix goes from {"other":33,"python":33,"system":33} to {"python":67,"system":33}, all exits 0 on both sides. invariants: under the hook, every decision. No output-filtering change, so no savings figure applies.
Pins: 1 decision, 2 mutated, 0 survived (dropping "uv" and moving it to the js arm both turn test_categorize_uv_as_python red)
Matrix: executed this round; pin check: executed this round
CI @4ad08d903: all green (11 pass)

Filed as follow-ups

  • #4428 categorize_command sends 21 filtering commands to other (jest, glab, aws, psql, the php and jvm families, rg…) and nothing ties its match to Commands: outside this PR's hunks; filed
  • rtk uv sync is a passthrough, so uv-sync.toml and the uv sync rewrite's savings never apply: pre-existing; already tracked in #3402

Checked and correct — no need to re-verify

  • ecosystem_mix() is the only reader of categorize_command; rtk gain is unaffected.
  • Only rtk uv run … rows move: rtk uv sync/rtk uv pip are recorded as passthrough (input_tokens 0), which ecosystem_mix() excludes, and the hook already rewrites uv pip … to rtk pip ….
  • cargo fmt --check, cargo clippy --all-targets and cargo test --all are green on the head and on the head merged onto current develop (a4f444e). It also merges cleanly next to #4033 (psql/mysql in the cloud arm) and #4403 (tracked-command quoting).

Next

Nothing — approving.
Rounds: 1/3. Threads: 0 open.

@KuSh
KuSh merged commit aaa2fba into rtk-ai:develop Oct 3, 2026
12 checks passed
@rtk-release-bot rtk-release-bot Bot mentioned this pull request Oct 3, 2026
@amandeavor
amandeavor deleted the fix/categorize-uv-python branch October 10, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

analytics bug Something isn't working tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

categorize_command has no uv arm, so every rtk uv … row counts as other in the ecosystem mix

3 participants