Skip to content

fix(core): retain empty-match ancestors (port of tobi/disktree#62) - #34

Merged
Harold Hunt (huntharo) merged 1 commit into
mainfrom
port/62-empty-matches
Oct 31, 2026
Merged

Harold Hunt (huntharo) merged 1 commit into
mainfrom
port/62-empty-matches

Conversation

@huntharo

@huntharo Harold Hunt (huntharo) commented Oct 31, 2026 •

Copy link
Copy Markdown

A search match on an empty directory contributes zero bytes and files. Filtering used those totals to decide whether to retain its nonmatching ancestors, so the match could become unreachable.

Extract only the core portion of upstream commit bad1769fd95d15829eebf5d3be256737c4375678 from tobi/disktree#62. Retain ancestors when the descendant match count increases. The regression checks the ancestor, empty match, zero totals and unrelated sibling. No TUI code or other commits from #62 are included.

The scanner resource-limit test repair is now on main through #37. This PR changes only crates/disktree-core/src/filter.rs and preserves Jeremy Dixon’s authorship and the upstream commit reference.

At head 70c0da3c4aae5aa43d4e999ffec1be4e448e1124, macOS 27.0.1 arm64 cargo xtask lint and the full cargo xtask test pass. Linux Sandboxer sb_qowjafwv7n (Ubuntu 24.04.5 x86_64) lint and full tests also pass, with exit codes 0 and 0. The empty-directory regression passes on both systems. The watched CI checks at this head passed on 2026-10-31 at 17:41:01 UTC, and GitHub reports the PR as mergeable.

Screenshot disposition: the changed filter entries have zero bytes and files, hence zero treemap area. The core regression verifies ancestry and reachability; a screenshot of the treemap does not expose that map. No screenshot is attached. The operator explicitly approved regression evidence instead of screenshots on 2026-10-31.

Tracks PWR-28.

@huntharo
Harold Hunt (huntharo) marked this pull request as ready for review October 31, 2026 17:41
@huntharo
Harold Hunt (huntharo) merged commit ece53ca into main Oct 31, 2026
14 checks passed
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.

2 participants