agent-ecosystem/test
777genius 776298b0e3 perf: reuse caller stat in fileBelongsToTeam, drop duplicate fs.stat
On the live resolution path collectRootJsonlSessionIds already stat()s each root
jsonl for its mtime-window filter, then fileBelongsToTeam stat()ed the very same
file again for its cache validation -- two fs.stat syscalls (plus two Stats
allocations) per file, every poll. fileBelongsToTeam now takes an optional
precomputed stat and the mtime-filter caller passes the stat it already has, so the
file is statted once. Measured 20 files -> 20 stat calls on the mtime path (was ~40).

Using a single stat snapshot is also slightly more consistent than two reads that
could straddle a concurrent write. The other call site (subagent scan) passes no
stat and is unchanged (fileBelongsToTeam stats it itself). Adds a regression test
that a caller-supplied stat is the one recorded in the affinity cache.
2026-05-30 14:11:58 +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: reuse caller stat in fileBelongsToTeam, drop duplicate fs.stat 2026-05-30 14:11:58 +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 wip: team messages panel updates and runtime usage cache refinements 2026-05-30 12:54:11 +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