The fs calls rescanDirectoryForDelta makes — injectable so a platform-specific
readdir/stat disagreement can be reproduced deterministically. Production uses the real fs.
import * as FileWatcher from './file-watcher.ts'; import { readdir, stat } from 'node:fs/promises'; const deps: FileWatcher.RescanDeps = { readdir, stat }; // the production default; tests inject fakes