agent-ecosystem/test/main/services
777genius 8b3cec8013 perf: update team watcher incrementally instead of full rebuild
A team launch repeatedly changes the watched target set (new dirs appear), and each
change tore down the chokidar watcher and recreated it over the full target set.
On macOS chokidar uses kqueue with one fd per watched file, so every rebuild
re-opened an fd for EVERY watched file (the large always-watched inbox set plus
scoped dirs). Profiling a 6-member mixed launch showed ~54k open() syscalls dominated
by these rebuilds.

Keep one persistent watcher and apply target-set changes with add()/unwatch() on the
delta only, so a reconcile opens fds for just the newly added dirs. The initial
watcher still uses ignoreInitial for a silent startup baseline, and
emitExistingFilesForNewTargets still backfills files already present in newly added
dirs, so the emitted event surface is unchanged. Because the watcher is no longer
recreated per reconcile, the stale-old-generation and close-throws-during-rebuild
failure modes are gone; their tests are replaced with incremental add/unwatch and
persistent-watcher coverage. All 69 watcher tests pass.
2026-05-30 12:05:23 +03:00
..
analysis fix(provenance): classify synthetic user turns 2026-05-26 23:51:17 +03:00
discovery fix(provenance): classify synthetic user turns 2026-05-26 23:51:17 +03:00
editor fix: harden Windows frontend path handling 2026-05-16 17:34:50 +03:00
extensions fix(ci): restore dev validation checks 2026-05-19 02:49:45 +03:00
identity feat: add telemetry identity and runtime status 2026-05-17 20:26:34 +03:00
infrastructure perf: update team watcher incrementally instead of full rebuild 2026-05-30 12:05:23 +03:00
parsing fix(provenance): classify synthetic user turns 2026-05-26 23:51:17 +03:00
runtime fix(opencode): extend summary status timeout 2026-05-28 00:39:53 +03:00
schedule feat(runtime): add provider fast mode support 2026-04-21 22:22:47 +03:00
team perf: batch per-member task-interval resume into one locked pass 2026-05-30 10:02:01 +03:00