Skip to content

fs: support pruning hidden directories during walks#31570

Merged
jif-oai merged 1 commit into
mainfrom
jif/fs-walk-hidden-pruning
Jul 8, 2026
Merged

fs: support pruning hidden directories during walks#31570
jif-oai merged 1 commit into
mainfrom
jif/fs-walk-hidden-pruning

Conversation

@jif-oai

@jif-oai jif-oai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Why

Filtering hidden directories after a walk is too late: their descendants consume traversal limits, and canonical directory deduplication can let a hidden path claim a target before a visible symlink reaches it.

What this changes

  • Add an optional pruneHiddenDirectories walk option. It defaults to false and is omitted from the wire when disabled.
  • Return hidden directory entries, but do not traverse them or add their canonical identities to the visited set.
  • Cover the visible-symlink-to-hidden-directory case through both local and remote filesystem implementations.

This is the small filesystem prerequisite for #31566. Skill-specific behavior remains in that PR.

@jif-oai jif-oai marked this pull request as ready for review July 8, 2026 12:46
@jif-oai jif-oai merged commit a52b35f into main Jul 8, 2026
35 checks passed
@jif-oai jif-oai deleted the jif/fs-walk-hidden-pruning branch July 8, 2026 12:49
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant