loadConfig called detectSubRepos(cwd) at up to 3 sites per invocation (root-config requiresFilesystem migration, workstream-config requiresFilesystem migration, and the planning.sub_repos filesystem re-sync) — all with the same cwd, yielding identical results. Introduce a per-call lazy memo (getDetectedSubRepos) so the directory scan runs at most once per loadConfig call while preserving all conditional logic. Fixes #315. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
191 B
191 B
type, pr
| type | pr |
|---|---|
| Fixed | 315 |
loadConfig now memoizes detectSubRepos(cwd) per call, collapsing up to 3 redundant directory scans into 1 when migrations and filesystem re-sync both trigger.