Rebuild edits made between the watcher's two snapshots
After a build, the native watcher took one snapshot of the sources to find what changed and then a second as the baseline for the next round. A file saved between the two was in the baseline but was never reported to a build, so watch mode ignored it until the file changed again. That is the flaky "watch-retained-graph" test on macOS: B.res, saved right after C.res, never got recompiled. The changes now come from the snapshot that becomes the baseline, as the polling watcher already does.
A unit test injects the watcher's source discovery, which runs between the two snapshots, to edit a file exactly there, and checks that the next build reports it. It fails with the old snapshot order.