Skip to content

fix: keep TrackPath watches after atomic replacement - #112

Open
Boulea7 wants to merge 1 commit into
rolldown:mainfrom
Boulea7:fix/inotify-trackpath-atomic-replace
Open

fix: keep TrackPath watches after atomic replacement#112
Boulea7 wants to merge 1 commit into
rolldown:mainfrom
Boulea7:fix/inotify-trackpath-atomic-replace

Conversation

@Boulea7

@Boulea7 Boulea7 commented Aug 13, 2026

Copy link
Copy Markdown

On Linux, TrackPath could lose a nested file after an atomic replacement when an ancestor already had an inotify handle. The parent was registered with the file-only optimization flag, so its handle could be skipped. The same path also left the stored mode as NoTrack when upgrading an existing watch.

This registers the parent as a directory and persists watch-mode upgrades. The regression tests cover both a direct TrackPath watch and a NoTrackTrackPath upgrade, then verify that a normal write after replacement is still reported. This was isolated from vitejs/vite#23227.

Validation:

  • new regression tests repeated 20 times
  • Rust 1.90 MSRV test
  • related TrackPath, NoTrack, recursive-upgrade, and unwatch tests
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • workspace tests excluding six inotify exact-order failures reproduced on the base revision; two poll rename tests also failed intermittently only during concurrent workspace runs

AI-assisted tooling was used while implementing and testing this change; I reviewed the code and verification results.

By contributing, I agree to the repository license and Code of Conduct terms described in the pull request template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant