Repository navigation
[node-core-library] Make Windows folder deletion retries consistent - #6232
Merged
Ian Clanton-Thuon (iclanton) merged 5 commits intoNov 27, 2026
Conversation
Record the spec approved independently by Claude Opus 5.5 and GPT-5.3 Codex, including the user's changelog and error-priority decisions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply the independently approved spec: own the retry budget, preserve compatible folder enumeration, drain started async removals, and consolidate unreleased user-facing change notes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the upstream specification technical-only, removing session-specific review and PR-management text as requested. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
Independent review consensusClaude Opus 5.5 and GPT-5.3 Codex both explicitly APPROVE final commit
Validation: 152 tests passed on Node.js 24.22.1 and again on Node.js 22.23.4 (102 filesystem tests, 50 async tests). TypeScript, ESLint, API Extractor, formatting, whitespace checks, and Rush changelog coverage passed. The final commit is documentation-only and did not change those tested sources. CI remains separate from these model-review approvals. |
Pete Gonzalez (octogonz)
approved these changes
Nov 27, 2026
Pete Gonzalez (octogonz)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for making the PR!
Remove the specification from the upstream PR as requested in review; preserve the requested design deliverable outside the repository. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fixup! [node-core-library] Implement reviewed Windows deletion retries Trim redundant folder deletion retry tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ian Clanton-Thuon (iclanton)
enabled auto-merge (squash)
November 27, 2026 01:34
Ian Clanton-Thuon (iclanton)
merged commit Nov 27, 2026
d4f2799
into
microsoft:main
8 of 9 checks passed
Ian Clanton-Thuon (iclanton)
deleted the
fix/windows-folder-deletion-retries-v2
branch
November 27, 2026 02:32
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.
Summary
Fixes #6230. Replaces #6231 with a spec-first implementation independently reviewed by Claude Opus 5.5 and GPT-5.3 Codex before coding.
Improve reliability for Windows callers of
FileSystem.deleteFolder,deleteFolderAsync,ensureEmptyFolder, andensureEmptyFolderAsyncwhen another process temporarily holds a file open. Preserve the public signatures and avoid overlapping top-level async removals between retries.The specification was reviewed before implementation and has been removed from the upstream changes at the reviewer’s request.
Details
EBUSY,ENOTEMPTY, orEPERM, with waits of 100, 200, and 300 ms and no final wait. Disable Node's native retries and delays.Dirent.parentPathor a boundthis; create the folder only forENOENTand preserve other read errors and files occupying the path.main, not a published version.No new public options, dependencies, engine requirements, or changes to
move/moveAsync.Historical clarification
fs-extra7 used its own vendored rimraf, not arimraf@2dependency. Its three-retry policy applied to async removal on all platforms, with a separate budget at each recursion level. Sync removal instead had a Windows-only spin of up to 500 ms on a folder's finalrmdir, which could silently leave the folder behind.fs-extra10 switched to nativefs.rm/rmSyncwithout retry options.How it was tested
FileSystemtests and 50Asynctests, using the combined Heft selection on Linux / Node.js 24.22.1.rush prettier,git diff --cached --check, andrush change --verify --target-branch microsoft/mainpassed.Review process
Both models approved the same spec SHA-256 (
6a6e8803fa426b8f6ae6800581a35f15db31fe2a03229ef68b49a28b64ff04dc) after incorporating reviewer feedback and user decisions. Independent PR-branch reviews will follow, with iterations until both approve the same final commit.