agent-ecosystem/test
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
..
agent-graph feat: harden opencode and team runtime flows 2026-05-21 01:10:48 +03:00
features fix(codex-account): keep account snapshots fresh 2026-05-26 23:44:40 +03:00
fixtures fix(changes): project opencode upgrades in detail view 2026-04-28 23:34:17 +03:00
main perf: update team watcher incrementally instead of full rebuild 2026-05-30 12:05:23 +03:00
mocks fix(team): avoid full session scan on team open 2026-05-03 09:42:14 +03:00
preload fix(windows): harden elevated runtime detection 2026-05-22 18:43:50 +03:00
renderer perf: skip offline runtime polling 2026-05-29 16:11:16 +03:00
scripts fix(team): stabilize provider live smoke 2026-05-20 01:32:39 +03:00
shared fix(team): reconcile provisioned-but-not-alive bootstrap state 2026-05-27 12:16:41 +03:00
setup.ts feat(runtime): harden MCP launch orchestration 2026-05-21 19:03:47 +03:00