Repository navigation
linux: try a directory that cannot be listed once, and give each path once - #645
Merged
Merged
Conversation
… once The patterns of one configuration share their listings, but only the ones that succeeded, so every pattern tried an unlistable directory again. And every `**` pattern over one base returns those directories to be denied whole, so the list the Linux wrapper looks at, entry by entry, held each of them once per pattern. A failed listing is now kept for as long as a successful one, and the resolved list holds each path once. The wrapped command is the same.
The commit before this one kept every failed listing for the patterns that follow. An absence is the one failure that denies nothing, so a pattern handed another's absence missed what it matches in a directory that is there when it would have asked. Only the failures that have a directory denied whole are kept.
`resolveReadPathEntries` collects into this branch's set what main's `withOtherReadings` returns for each of `spelledOf(paths)`.
ronleizrowice-ant
added a commit
that referenced
this pull request
Oct 4, 2026
#645 keeps a failed listing for the patterns that follow. #575 lets a second name for a directory have its try after a listing that failed. Here a failure is kept only in a map the caller handed in, where the deny patterns of one configuration meet; a walk's own map keeps none. Between deny patterns nothing is lost: the first failure has the directory denied whole. One join case says so.
ronleizrowice-ant
enabled auto-merge
October 5, 2026 09:15
This was referenced Oct 6, 2026
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With many
**read rules over a tree that holds directories the user cannot list, a wrap's cost grew with rules × such directories. On a slow mount that is most of the time.What was slow
**pattern over one base returns those directories, to be denied whole. The resolved list was a plain concatenation, and the Linux wrapper resolves and stats every entry it is given. The duplicates were dropped only afterwards.What changes
ENOENT) is not kept. It is the one failure that denies nothing, so each pattern asks for itself. The first commit here kept it; the second takes that back.RangeErrorfrom about 125,000 matches of one pattern on Node.Who sees a difference
getFsReadConfig().denyOnlyandallowWithinDenyhave no duplicates. The wrapped command is the same.Measured
471 directories, 50 of them mode 000; every filesystem call the library makes under the tree delayed by 1 ms; one wrap:
**rulesmainAt 100 rules: 5,020 paths, 70 of them distinct, become 70. Six rules over 400,150 files with nothing unlistable: 1.0 s on both. (Measured again on
mainwith #620 to #622, which add anlstator two per rule.)Testing
mainand here, with the build's path, random names and the proxy port taken out: one and the same. Run under real bubblewrap: the matching file is refused, a plain one is read.mainfails here.