fix: ls tracking baseline should compare against `ls` not `ls -la`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
Problem
rtk ls internally runs ls -la to get file metadata for grouping/filtering, then compresses the output. The savings % is tracked against the ls -la output, not plain ls (which is what the agent would have run without RTK).
This inflates the reported savings. Example from user report:
ls= 332 tokensls -la= 4173 tokensrtk ls= 993 tokens- Reported: 76.2% savings (vs
ls -la) - Actual: -199% vs plain
ls
Fix
Track against the baseline command the agent would have run (ls), not the internal enriched command (ls -la).
In src/ls.rs line 113-118, change the tracking input from the ls -la raw output to a plain ls capture (or estimate).
Reference
https://www.reddit.com/r/ClaudeAI/comments/1rjkf9r/comment/oa3trnn/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/ls.rs around lines 113-118, where tracking uses the raw output from the internal ls -la command. Change the tracking baseline to represent plain ls, either through a capture or an estimate. Done means the reported savings compares rtk ls with the command an agent would normally run, rather than ls -la.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100