Repository navigation
Watchers ignore attribute-only events unless the mtime moved - #149
Merged
Merged
Conversation
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.
Both dev watchers treated attribute-only file events as changes. On Linux (relatime) the first read of a file after it was written updates its access time, inotify reports IN_ATTRIB, notify maps it to
Modify(Metadata), and oj rebuilt: the TanStack Start client rebundle reads every source file, so one edit looked like an edit of every source file and rebuilt again until the access times settled, then re-armed on the next write. macOS never emits these events, which is why it was invisible locally; CI on PR #148 showed the HMR gate holding all 29 fixture files after a single edit.Fix:
oj_server::ContentChanges, chokidar's rule applied to notify events: a change is a data change or a moved mtime since the watcher last saw the file; an attribute-only event with an unchanged (or never recorded) mtime is not a change, atouchstill is. Used by the plain watcher (which previously only skippedAccess) and the Start watcher (which skipped nothing by kind).Tests: unit test over synthetic notify events on a temp file (first attribute event ignored, data change recorded, moved mtime counted, access ignored, removal counted); the HMR, gate, watch and Start e2e suites pass locally; the Linux CI run is the decisive check.
🤖 Generated with Claude Code