Skip to content

[node-core-library] Fix LockFile API issues that caused Rush autoinstaller failures#5734

Merged
octogonz merged 4 commits intomicrosoft:mainfrom
octogonz:octogonz/issue5684
Mar 31, 2026
Merged

[node-core-library] Fix LockFile API issues that caused Rush autoinstaller failures#5734
octogonz merged 4 commits intomicrosoft:mainfrom
octogonz:octogonz/issue5684

Conversation

@octogonz
Copy link
Copy Markdown
Collaborator

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:

  • Fix incorrect "dirty" detection caused by transient/racy lockfiles (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

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

…(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
@octogonz octogonz enabled auto-merge (squash) March 31, 2026 02:28
@octogonz octogonz merged commit 0c89067 into microsoft:main Mar 31, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

[rush] When rush performs phased operations, concurrent install autoinstallers may conflict and cause errors.

3 participants