[node-core-library] Fix LockFile API issues that caused Rush autoinstaller failures#5734
Merged
octogonz merged 4 commits intomicrosoft:mainfrom Mar 31, 2026
Merged
Conversation
…(e.g., files disappearing mid-acquire or partially written files) - Change approach to defer cleanup: first determine lock ownership, then clean up truly stale files only after successfully acquiring - Tighten stale vs valid lock distinction (including PID reuse cases) so we don’t misclassify active or benign states as dirty
[node-core-library]: update test case of LockFile#acquireAsync
iclanton
approved these changes
Mar 31, 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 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 #5684
When rush performs phased operations, concurrent install autoinstallers may conflict and cause errors.
Details
The investigation with @LPegasus is summarized in issue #5684
What was changed:
Regression risk: This narrows when a lock is considered "dirty". Although the previous behavior was incorrect, the fix could break consumers that implicitly relied on those false positives.
Therefore this will be a MINOR version bump.
How it was tested
@LPegasus confirmed that this fixes his repro:
https://github.com/LPegasus/rush-issue-5684