agent-ecosystem/test/main/services/infrastructure
777genius 5d63ecfe32 perf: scope team file watching to active and engaged teams
The main process watched every team directory under ~/.claude/teams (one shallow
chokidar target per team root, per team inboxes, and per task dir). On macOS this
falls back to kqueue, which needs one fd per watched file, so a workspace with
many teams kept ~1600 descriptors open and made startup and reconcile work scale
with the number of teams on disk.

Scope the team-root and task watching to teams that are running or currently
engaged in the UI. The teams root and every team's inboxes are still watched for
all teams, so cross-team message delivery, the lead inbox->stdin relay, and
notifications are unchanged. Idle teams are static, so dropping their team-root/
task watches is safe; opening a team (getData) or launching it re-adds it via an
immediate watch-scope refresh. The provider falls back to watching every team
when unset, and the EMFILE polling fallback is intentionally left unscoped so a
scope change can never look like a deletion.

Measured on a 162-team workspace: open team fds 1600 -> 730, with team-root
watching restored the moment a team is opened or goes live.
2026-05-30 00:25:55 +03:00
..
CliInstallerService.healthCheck.test.ts chore(release): lock runtime 0.0.37 2026-05-18 22:28:24 +03:00
CliInstallerService.test.ts perf(startup): avoid provider refresh version probe 2026-05-25 23:37:12 +03:00
ConfigManager.claudeRoot.test.ts feat(team): expand opencode review and release support 2026-04-24 12:05:54 +03:00
ConfigManager.codexMigration.test.ts feat(runtime): support anthropic compatible endpoints 2026-05-22 00:16:52 +03:00
ConfigManager.notifications.test.ts feat(team): expand opencode review and release support 2026-04-24 12:05:54 +03:00
CrossPlatformFileChangeSource.test.ts perf(startup): defer heavy startup work 2026-05-25 23:14:59 +03:00
FileWatcher.test.ts perf(startup): defer heavy startup work 2026-05-25 23:14:59 +03:00
LocalFileSystemProvider.test.ts chore: commit remaining workspace updates 2026-05-21 16:43:00 +03:00
NotificationManager.migration.test.ts fix(notifications): recover corrupted history writes 2026-04-24 12:24:21 +03:00
NotificationManager.team.test.ts fix(ci): handle windows-only test behavior 2026-05-04 09:37:58 +03:00
OpenCodeRuntimeInstallerService.test.ts fix(startup): ignore stale opencode probe results 2026-05-26 10:39:50 +03:00
TeamTaskWatchRegistry.test.ts perf: scope team file watching to active and engaged teams 2026-05-30 00:25:55 +03:00
teamWatchScope.test.ts perf: scope team file watching to active and engaged teams 2026-05-30 00:25:55 +03:00
updaterReleaseMetadata.test.ts fix: harden provider management and updater flows 2026-05-16 23:23:27 +03:00