fix(host-service): let an ignore-rule change bypass the refresh interval

BR
1d ago
+50-0

What & why

Fixes #9461.

A .gitignore edit within 5 s of the last ignored-dirs refresh hit the min-interval return. rulesChanged stayed set with nothing to retry it, so the native watcher kept skipping a folder the user had un-ignored. The min-interval check now does not apply when rulesChanged is set.

How I tested it

Failing regression test in git-watcher.test.ts with a real temp git repo. The bug was first found by checking every order of events in a small model, then reproduced against the real code.

  • packages/host-service: bun run test gives 2758 pass, 0 fail.

Checklist

  • PR title follows conventional commits (type(scope): subject)
  • bun run lint and bun run typecheck pass (CI fails on lint warnings too)
  • "Allow edits from maintainers" is checked on fork PRs
  • I have signed the CLA (the bot asks on your first PR)

Summary by cubic

Fixes #9461: a .gitignore or info/exclude edit within 5s of the last ignored-dirs refresh was dropped by the min-interval guard, leaving rulesChanged set with nothing to retry it and the native watcher still pruning a folder the user had un-ignored.

The min-interval check now skips when rulesChanged is set, so rule edits always trigger a refresh.

  • Adds a regression test that reproduces the race with consecutive rule edits against a real temp git repo.