Skip to content

test(cleaner): cover exclusions surviving a directory-level delete - #267

Merged
dbfx merged 1 commit into
mainfrom
test/recency-exclusion-coverage
Jul 27, 2026
Merged

test(cleaner): cover exclusions surviving a directory-level delete#267
dbfx merged 1 commit into
mainfrom
test/recency-exclusion-coverage

Conversation

@dbfx

@dbfx dbfx commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #266, which merged while I was writing these.

Reviewing the descending recency check afterwards turned up a second property it establishes, separate from the one the PR was about and worth pinning down.

The old top-level scan tested only the entries it listed, so isExcluded never saw anything below the first level. A directory could therefore be offered as a single item and then recursively deleted along with an excluded file buried inside it — the exclusion was honoured when choosing what to list, and then quietly bypassed by the rm -r that followed.

Descending closes that off as a side effect: an excluded descendant makes the subtree incomplete, so the directory is never collapsed and only its settled, non-excluded siblings are offered.

Two tests, one for a full-path exclusion and one for an *.ext glob below the top level. Both fail against the pre-#266 behaviour and pass now — this is coverage for something already fixed, not a new change.

Tests only, no production code touched. 2352 passing.

Descending the recency check closed a second gap worth pinning down. The old
top-level scan only tested the entries it listed, so a directory could be
offered as one item and then recursively deleted along with an excluded file
buried inside it. An excluded descendant now blocks the collapse, so only its
settled siblings are offered.
@dbfx
dbfx merged commit f5176e2 into main Jul 27, 2026
9 checks passed
@dbfx
dbfx deleted the test/recency-exclusion-coverage branch July 27, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant