agent-ecosystem/test
777genius c8d40be460 perf: cache negative team-affinity verdicts from a full head window
fileBelongsToTeam only cached POSITIVE affinity durably; a negative verdict was
re-decided on any change, so during a launch every non-matching transcript in the
project dir that grew (mtime+size change from an active session) was re-streamed
(createReadStream+readline) and re-parsed (up to 40 head lines) on every bootstrap
poll. A live atlas-hq-5 launch profile put this whole subsystem (readline streaming
+ fileBelongsToTeam + line/team matching) at ~31% of main-thread JS, the single
largest launch cost.

A team's first 40 head lines are immutable for an append-only transcript, so a
`false` decided from a FULL inspected window (>= TEAM_AFFINITY_SCAN_LINES) stays
valid while the file only grows. Track headWindowFull on the cache entry and short-
circuit such negatives the same way positives are short-circuited (size >= cached).
Short files (partial window) are still re-scanned on growth, so a team mention that
later lands inside the head window is still detected. A shrink/rewrite (size <
cached) forces a re-scan, identical to the positive path.

Behavior-preserving for affinity correctness (no new false negatives); only removes
redundant re-streams. Adds regression tests for both the durable-negative and the
short-file-flips-to-true cases.
2026-05-30 13:17:49 +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: cache negative team-affinity verdicts from a full head window 2026-05-30 13:17:49 +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