batch3 T4 review polish: drop Stats hack, document cache race + total counting

- Drop unused Stats type import and its no-op suppression expression
- Comment getProjectFiles concurrent-miss race (benign, accepted)
- Comment findFiles deliberate post-limit counting (differs from grep)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-15 15:20:45 +00:00
parent 89f1b7e862
commit 015350b2e7
2 changed files with 5 additions and 4 deletions

View File

@@ -15,6 +15,9 @@ interface CacheEntry {
const cache = new Map<string, CacheEntry>(); // keyed by projectId
// Concurrent calls with a cold/stale cache may both spawn rg. The result is
// deterministic so they overwrite identically — no data corruption, just a
// rare extra subprocess. Acceptable for single-user mode.
export async function getProjectFiles(projectId: string, projectRoot: string): Promise<string[]> {
const current = await snapMtimes(projectRoot);
const cached = cache.get(projectId);