Skip to content

test: watcher tests push pre-commit past its cap on a slow fseventsd #945

Done

Description

@bpowers

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)
  • src/simlin-serve/src/test_support.rs: wait_for_watcher_ready, OS_EVENT_TIMEOUT
  • src/simlin-serve/tests/integration/watcher_merge.rs, watcher_smoke.rs, watcher_git.rs, diagnostics_events.rs

Activity

  1. 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
  2. added
    ci
    hygiene
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cihygiene

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions