Repository navigation
fix(tracking): count rtk uv rows as python in ecosystem mix - #4328
Conversation
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
📊 Automated PR Analysis
SummaryAdds Review Checklist
Linked issues: #4316 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
KuSh
left a comment
There was a problem hiding this comment.
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_commandsends 21 filtering commands toother(jest, glab, aws, psql, the php and jvm families, rg…) and nothing ties its match toCommands: outside this PR's hunks; filed rtk uv syncis a passthrough, souv-sync.tomland theuv syncrewrite's savings never apply: pre-existing; already tracked in #3402
Checked and correct — no need to re-verify
ecosystem_mix()is the only reader ofcategorize_command;rtk gainis unaffected.- Only
rtk uv run …rows move:rtk uv sync/rtk uv pipare recorded as passthrough (input_tokens0), whichecosystem_mix()excludes, and the hook already rewritesuv pip …tortk pip …. cargo fmt --check,cargo clippy --all-targetsandcargo test --allare green on the head and on the head merged onto currentdevelop(a4f444e). It also merges cleanly next to #4033 (psql/mysql in thecloudarm) and #4403 (tracked-command quoting).
Next
Nothing — approving.
Rounds: 1/3. Threads: 0 open.
Summary
uvto thepythonarm ofcategorize_commandsortk uv …telemetry rows are not bucketed asother.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