perf(skills): reuse walk inventory for host loading#31566
Merged
Conversation
c84e3ab to
c429509
Compare
jif-oai
added a commit
that referenced
this pull request
Jul 8, 2026
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.
c429509 to
04aa595
Compare
anp-oai
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Thread startup loads repository skills through the primary remote environment. This still used the older host skill loader, which recursively issued directory and metadata requests over the exec-server connection. On a high-latency connection, one skill scan could turn into hundreds of round trips.
Executor-selected skill roots already avoid this pattern: they use one bounded filesystem walk, reuse the returned inventory, and overlap independent reads.
What changed
Dependency
#31570 is now merged. It provides the optional
pruneHiddenDirectorieswalk flag used here. That flag defaults to false and is omitted when disabled.No other exec-server API changes are introduced.