GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fs: fix glob early return skipping sibling entries by webdevelopersrinu · Pull Request #64895 · nodejs/node

Conversation

@webdevelopersrinu

@webdevelopersrinu webdevelopersrinu commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The children loop in the glob traversal returned from the whole method when a
child path had already been seen through a different pattern context, silently
dropping the remaining sibling entries. Whether this triggered depended on
directory iteration order, which also made test-fs-glob.mjs flaky.

This removes the check — the cache.add call at the start of the traversal
already prevents reprocessing. Deno, which ports this implementation, fixed
the same bug.

The regression test pins the directory iteration order that triggers the bug,
so it fails deterministically without the fix (verified: without the fix,
a/b, a/x, a/z are missing from the results for pattern a/**/../*,
in both the sync and async implementations).

Supersedes #62901 — the author there agreed to hand over the work
(#62901 (comment)).

Fixes: #62897

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. labels Aug 1, 2026
avivkeller
avivkeller approved these changes Aug 1, 2026
View reviewed changes
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 21, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 21, 2026
@trivikr

trivikr commented Aug 21, 2026

Copy link
Copy Markdown
Member

@webdevelopersrinu Can you please sign the first commit and force push?

It's required as per updated instructions

Your commit must contain the Signed-off-by line with your name and email address as an acknowledgement that you agree to the Developer Certificate of Origin

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@webdevelopersrinu @semimikoh
fs: fix glob early return skipping sibling entries
5247704
The children loop in the glob traversal returned from the whole method
when a child path had already been seen through a different pattern
context, silently dropping the remaining sibling entries. Whether this
triggered depended on directory iteration order, which also made
test-fs-glob.mjs flaky.

Remove the check: the cache.add call at the start of the traversal
already prevents reprocessing.

Fixes: nodejs#62897
Co-authored-by: semimikoh <[email protected]>
Signed-off-by: webdevelopersrinu <[email protected]>
@webdevelopersrinu
webdevelopersrinu force-pushed the fix-glob-sibling-skip branch from 83dee11 to 5247704 Compare August 21, 2026 03:27
@webdevelopersrinu

webdevelopersrinu commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@trivikr Done, pushed with the Signed-off-by line.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

trivikr
trivikr approved these changes Aug 21, 2026
View reviewed changes
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Aug 21, 2026
@codecov

codecov Bot commented Aug 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (a6a1bd4) to head (5247704).
⚠️ Report is 397 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64895      +/-   ##
==========================================
- Coverage   90.14%   90.12%   -0.03%     
==========================================
  Files         746      752       +6     
  Lines      242846   252311    +9465     
  Branches    45771    47431    +1660     
==========================================
+ Hits       218909   227390    +8481     
- Misses      15439    16217     +778     
- Partials     8498     8704     +206     
Files with missing lines Coverage Δ
lib/internal/fs/glob.js 91.84% <ø> (+0.57%) ⬆️

... and 261 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr trivikr added author ready PRs with CI started, the required approvals, and no outstanding review comments. and removed request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Aug 21, 2026
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@trivikr trivikr mentioned this pull request Aug 22, 2026
fs: fix glob early return skipping sibling entries #62901
Closed
2 tasks
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@nodejs-github-bot

nodejs-github-bot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/76270/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr trivikr added the commit-queue PRs queued for automated landing through the Commit Queue. label Aug 23, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 0ea2c86 into nodejs:main Aug 23, 2026
85 of 86 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Landed in 0ea2c86

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Aug 23, 2026
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
@webdevelopersrinu @semimikoh @aduh95
fs: fix glob early return skipping sibling entries
772d9d4
The children loop in the glob traversal returned from the whole method
when a child path had already been seen through a different pattern
context, silently dropping the remaining sibling entries. Whether this
triggered depended on directory iteration order, which also made
test-fs-glob.mjs flaky.

Remove the check: the cache.add call at the start of the traversal
already prevents reprocessing.

Fixes: #62897
Co-authored-by: semimikoh <[email protected]>
Signed-off-by: webdevelopersrinu <[email protected]>
PR-URL: #64895
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
@webdevelopersrinu @semimikoh @aduh95
fs: fix glob early return skipping sibling entries
74dcdbb
The children loop in the glob traversal returned from the whole method
when a child path had already been seen through a different pattern
context, silently dropping the remaining sibling entries. Whether this
triggered depended on directory iteration order, which also made
test-fs-glob.mjs flaky.

Remove the check: the cache.add call at the start of the traversal
already prevents reprocessing.

Fixes: #62897
Co-authored-by: semimikoh <[email protected]>
Signed-off-by: webdevelopersrinu <[email protected]>
PR-URL: #64895
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@github-actions github-actions Bot mentioned this pull request Aug 25, 2026
2026-08-26, Version 26.8.0 (Current) #65551
Merged
aduh95 pushed a commit that referenced this pull request Aug 27, 2026
@webdevelopersrinu @semimikoh @aduh95
fs: fix glob early return skipping sibling entries
d834d65
The children loop in the glob traversal returned from the whole method
when a child path had already been seen through a different pattern
context, silently dropping the remaining sibling entries. Whether this
triggered depended on directory iteration order, which also made
test-fs-glob.mjs flaky.

Remove the check: the cache.add call at the start of the traversal
already prevents reprocessing.

Fixes: #62897
Co-authored-by: semimikoh <[email protected]>
Signed-off-by: webdevelopersrinu <[email protected]>
PR-URL: #64895
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
2026-09-08, Version 24.21.0 'Krypton' (LTS) #65873
Merged
aduh95 pushed a commit that referenced this pull request Sep 7, 2026
@webdevelopersrinu @semimikoh @aduh95
fs: fix glob early return skipping sibling entries
13b725c
The children loop in the glob traversal returned from the whole method
when a child path had already been seen through a different pattern
context, silently dropping the remaining sibling entries. Whether this
triggered depended on directory iteration order, which also made
test-fs-glob.mjs flaky.

Remove the check: the cache.add call at the start of the traversal
already prevents reprocessing.

Fixes: #62897
Co-authored-by: semimikoh <[email protected]>
Signed-off-by: webdevelopersrinu <[email protected]>
PR-URL: #64895
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 7, 2026
@webdevelopersrinu @semimikoh @aduh95
fs: fix glob early return skipping sibling entries
c9233b9
The children loop in the glob traversal returned from the whole method
when a child path had already been seen through a different pattern
context, silently dropping the remaining sibling entries. Whether this
triggered depended on directory iteration order, which also made
test-fs-glob.mjs flaky.

Remove the check: the cache.add call at the start of the traversal
already prevents reprocessing.

Fixes: #62897
Co-authored-by: semimikoh <[email protected]>
Signed-off-by: webdevelopersrinu <[email protected]>
PR-URL: #64895
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@robobun robobun mentioned this pull request Sep 16, 2026
fs.glob: do not skip sibling entries after a seen child path oven-sh/bun#42870
Open
@robobun robobun mentioned this pull request Nov 2, 2026
fs.glob: add the maxDepth option, with the match limit in the result set oven-sh/bun#47750
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@trivikr trivikr trivikr approved these changes
@avivkeller avivkeller avivkeller approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fs.glob: return in cache-seen check aborts sibling processing, makes test-fs-glob.mjs flaky

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@webdevelopersrinu @trivikr @nodejs-github-bot @avivkeller
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.