Repository navigation
Fix kqueue file watcher test failing on macOS - #65569
Merged
Jake Bailey (jakebailey) merged 1 commit intoNov 19, 2026
Merged
Conversation
One kqueue watcher test briefly pauses file change notifications so it can control the order in which they arrive. On macOS, pausing or resuming a watch also resets the list of changes it reports, so the test must pass the watcher's full list each time. Without it, macOS stops reporting changes to the directory and the test times out on every run, which breaks macOS CI. FreeBSD keeps the existing list.
Jake Bailey (jakebailey)
requested review from
Andrew Branch (andrewbranch)
and
a balanced review from Copilot
November 18, 2026 23:27
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change preserving the notification mask when pausing and resuming kqueue watches.
No open issues 🎉
What changed in this PR
Fixes the macOS timeout in the kqueue replacement-watch test by preserving the full notification mask when pausing and resuming event delivery.
Changes:
- Extracts the existing vnode notification mask into a shared constant without changing production watch registration behavior.
- Uses that mask for the test’s disable and enable operations, with a comment explaining the macOS requirement.
| File | Description |
|---|---|
tsc/internal/fswatch/kqueue.go |
Defines and uses the shared vnode notification mask. |
tsc/internal/fswatch/kqueue_test.go |
Preserves the full mask while pausing and resuming watches. |
Review effort: Balanced
Andrew Branch (andrewbranch)
approved these changes
Nov 18, 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.
One kqueue watcher test briefly pauses file change notifications so it can control the order in which they arrive. On macOS, pausing or resuming a watch also resets the list of changes it reports, so the test must pass the watcher's full list each time. Without it, macOS stops reporting changes to the directory and the test times out on every run, which breaks macOS CI.