Files
orca/src
Jinjing a726d93491 fix(runtime): bound the worktree scan fan-out and back off dead repos
The periodic all-repo resolution mapped every registered repo through an
unbounded Promise.all on a flat 30s TTL. Steady state was ~2 git execs per
repo per minute with peak concurrency measured at 82 on a 107-repo install,
and repos whose directory had been deleted re-spawned git forever because
only successful scans were cached (crash-cluster C2, 2026-07).

- Cap the sweep at 8 concurrent scans via the shared mapWithConcurrency,
  mirroring the worktrees:list sibling path.
- Give idle repos a TTL derived from a global spawn budget (60/min, capped
  at 5min) while repos with a live pane stay on the eager 30s TTL.
- Negative-cache sweep failures: a missing repo directory backs off to 5min
  and is surfaced (log + listReposMissingOnDisk); other errors escalate
  30s→5min. Explicit user-triggered scans never read or write the backoff.
2026-07-29 17:18:05 -07:00
..