Repository navigation
fix(lanes): a dev server on Linux sees edits in directories the copy made - #508
Merged
Merged
Conversation
…made A lane runs from a copy of its worktree. A new directory with another new one inside (`a/b/`) was made in one go; Angular's dev server watches with `@parcel/watcher`, which on Linux takes a new directory in only when it sees it made in a watched one, and so never watched `b`. Edits to a file created there reached the copy but no rebuild followed (#507, a lane on a pool node). The copy now makes new directories one depth at a time and waits 50 ms after each, except on its first sync. Closes #507 Bug-Class: unwatched-new-dir Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 10, 2026
Merged
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.
What and why
A lane on a Linux pool node kept serving an old build of a native Angular dev server after an edit (#507). Reproduced in a throwaway lane of the same stack on the node:
a/b/x.ts, as in the issue)The edit reached the lane's copy (
catin the lane's container showed the new content). Angular 22 watches with@parcel/watcher, which on Linux puts an inotify watch on each directory and takes a new one in only when it sees it made in a watched one. The copy madea/b/in one go (create_dir_all), sobexisted beforeawas watched:ng serveheld watches on the inodes ofabut not ofb(read from/proc/<pid>/fdinfo). Windows watches a tree recursively, which is why a lane there never showed it.In the node's container, against the running dev server:
mkdir -p a/b/cleftcunwatched; one level at a time with 10 ms or 50 ms between, every level was watched.Fix:
Snapshot::syncmakes the directories a sync needs one depth at a time and waits 50 ms after each depth (not per directory: a branch switch costs at most its depth times 50 ms), except on a copy's first sync, when nothing runs from it yet.unwatched-new-dira_watcher_that_follows_new_directories_sees_every_one_the_copy_makes(Linux): a watcher that follows new directories as@parcel/watcherdoes, with 5 ms to react. Red onmain(3 of 3:app/lib/new/innerunseen), green with the fix (5 of 5). A second wrong version, one depth at a time without the wait, is red again (3 of 3).apply_files) is watched by devstack's own watcher (notify), which reads a new directory when it sees it: not affected. A local lane on Linux runs from the same copy and is fixed with it.Not seen with the patched binary on the node (a node runs released builds); the mechanism was checked in the node's container against the running dev server, as above. Not in this PR:
devstack statusnoticing a copy no rebuild follows (suggested in the issue).Closes #507
🤖 Generated with Claude Code