Skip to content

fix(ls): filter quality wrong truncation - #990

Merged
aeppling merged 12 commits into
rtk-ai:developfrom
TropicalDog17:fix/issue-948
Apr 6, 2026
Merged

aeppling merged 12 commits into
rtk-ai:developfrom
TropicalDog17:fix/issue-948

Conversation

@TropicalDog17

@TropicalDog17 TropicalDog17 commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Might fixes #948

Problem: The old code split ls -la lines on whitespace and used fixed column indices (parts[4] for size, parts[8..] for filename). This broke when owner/group names contained spaces, causing the columns to shift — sizes became 0 and date/time fragments leaked into filenames.

Fix: The new parse_ls_line() function uses a regex (LS_DATE_RE) to find the date field as a stable anchor, which allow correctly parsing.

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test passed for old and newly added tests

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md for details.

aeppling and others added 8 commits March 30, 2026 15:13
@CLAassistant

CLAassistant commented Apr 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@TropicalDog17

Copy link
Copy Markdown
Contributor Author

Hi @aeppling can you check this out, this is my first pr to the repo, thank you for your help

@aeppling aeppling changed the title Fix/issue 948 fix(ls): filter quality wrong truncation Apr 3, 2026
@aeppling

aeppling commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor

hello @TropicalDog17 , valid for me, could you remove the cargo lockfile, toml version bump and .release-please-manifest.json from this please ?

This should just aim ls.rs

@aeppling aeppling added the filter-quality Filter produces incorrect/truncated signal label Apr 3, 2026
@TropicalDog17

Copy link
Copy Markdown
Contributor Author

Yeah I've adjusted, my bad @aeppling

@TropicalDog17

Copy link
Copy Markdown
Contributor Author

Is it ready to merge @aeppling?

@aeppling

aeppling commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

was waiting for previous release, merged

@aeppling
aeppling merged commit aa6317f into rtk-ai:develop Apr 6, 2026
9 of 10 checks passed
@aeppling

aeppling commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution :)

@aeppling aeppling mentioned this pull request Apr 6, 2026
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
fix(ls): filter quality wrong truncation
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
fix(ls): filter quality wrong truncation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filter-quality Filter produces incorrect/truncated signal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 'rtk ls' parsing issue

3 participants