Skip to content

Fix kqueue file watcher test failing on macOS - #65569

Merged
Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
jakebailey:fix-kqueue-watch
Nov 19, 2026
Merged

Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
jakebailey:fix-kqueue-watch

Conversation

@jakebailey

Copy link
Copy Markdown
Member

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 18, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 18, 2026
Merged via the queue into microsoft:main with commit 6e2fde4 Nov 19, 2026
34 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the fix-kqueue-watch branch November 19, 2026 00:11
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants