Skip to content

test(file-watcher): check unique typed events per operation - #287

Draft
anmonteiro wants to merge 1 commit into
draft/fsevents-watcher-shutdownfrom
draft/fsevents-watcher-expectations
Draft

anmonteiro wants to merge 1 commit into
draft/fsevents-watcher-shutdownfrom
draft/fsevents-watcher-expectations

Conversation

@anmonteiro

@anmonteiro anmonteiro commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Collect unique serialized path/kind pairs for each operation, split directory creation from child-file creation, and create empty files instead of creating and writing them. Both rename paths and their kinds remain required; unexpected paths/kinds remain visible in the snapshot.

This preserves more than the expected-path-only matching introduced by ocaml#13316 and reverted by ocaml#13380. It still makes substantive policy changes:

  • All root-path events are discarded, not only the setup event mentioned in the code comment. This could hide a later root/subtree invalidation.
  • Deduplication removes multiplicity checks, and splitting operations removes combined-operation coverage.
  • Waiting up to 10 seconds for a count does not establish an event-delivery boundary. The inherited 20ms final collection delay cannot prevent later events leaking into another operation.

With this draft and #290, the latest local CI=true run still missed the initial x Created event: expected 1, saw 0 after 10 seconds. Diagnose that loss through raw FSEvents delivery, watcher conversion, and collection before changing expectations again.

Experimental extraction from ocaml#17301, based on #286. The historical review calls for reproductions and meaningful event-type coverage; this draft is not yet sufficient to enable CI.

@check @fmt pass. The CI=true full check still skips the macOS watcher suite on this draft and has the baseline failures recorded in ocaml#17301.

01a20619-183b-76f3-b8a7-18c1b28eb1c0

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