Commit Graph

1 Commits

Author SHA1 Message Date
Frank Stellmacher ec112922a2 refactor(hot-cache): extract pure helpers + analysis-prune cluster from hotCachePrefetch.ts (#687)
The prefetch worker / replan orchestration and its shared module state
(pendingQueue, workerRunning, debounceTimer, graceEvictTimer) stay
entirely untouched in hotCachePrefetch.ts. Extracted only what does not
touch that state:

- hotCachePrefetch/helpers.ts       pure helpers — entryKey, byte
                                    estimators, debounceMs, frontend
                                    debug log, PREFETCH_AHEAD, PrefetchJob
- hotCachePrefetch/analysisPrune.ts  self-contained analysis-queue prune
                                    cluster (its own analysisPruneTimer +
                                    lastAnalysisPruneSig state, fully
                                    encapsulated behind a
                                    resetAnalysisPruneState wrapper)

Verbatim moves. The orchestration core diff is import-block + the three
analysis-cleanup lines collapsing to resetAnalysisPruneState() — nothing
else. The MainApp call site imports initHotCachePrefetch unchanged.
2026-05-14 13:40:21 +02:00