You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: watcher tests push pre-commit past its cap on a slow fseventsd #945
On a Mac whose fseventsd daemon is degraded, the simlin-serve file-watcher tests still pass but take minutes, which pushes cargo test past the pre-commit hook's 180 s cap and blocks every commit on that machine.
The hook's timeout message then says "this is genuine test runtime", which sends the developer looking for a slow test instead of at the OS.
Example
On one Mac with fseventsd pinned at 100% CPU (events arriving after about 1 s instead of under 50 ms), the watcher tests took 155 s at near-zero CPU, and the workspace run took over 235 s.
On a healthy machine the suite fits easily.
Why it matters
Seen on one developer machine.
The tests wait on real OS file events, so their runtime is a multiple of the daemon's latency; the probe-based readiness check in the tests (one or more file writes per wait) makes that multiple larger, not smaller.
Restarting fseventsd (or rebooting) fixes it.
Fix
Cheapest: make the hook's timeout message mention this case ("if the simlin-serve watcher tests dominate, check fseventsd") so the developer can tell it apart from a slow test.
Alternative, larger: let the watcher actor take its events from an injectable stream, so the merge and registry tests feed it synthetic events with no OS dependency, and keep one small test against the real watcher.
That also removes the macOS event-loss workarounds noted in docs/tech-debt.md, but it is a refactor of src/simlin-serve/src/watcher.rs.
Pointers
scripts/pre-commit (the 180 s cap and its message)
changed the title [-]test: simlin-serve watcher test runtime scales with fseventsd health, can bust the pre-commit cap on passing tests[/-][+]test: watcher tests push pre-commit past its cap on a slow fseventsd[/+]on Oct 12, 2026
Activity
[-]test: simlin-serve watcher test runtime scales with fseventsd health, can bust the pre-commit cap on passing tests[/-][+]test: watcher tests push pre-commit past its cap on a slow fseventsd[/+]