You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**Infinite Retry Loop**|`scheduleRetry` called `clearRetryState` which deleted the retry count that was just set, so retry count never accumulated | Created `clearRetryTimeout()` that only clears the timeout (not count). `scheduleRetry` now uses this. |
606
+
|**Memory Leak in deleteCacheEntry**|`deleteCacheEntry` didn't clear in-flight promises or retry state when GC runs | Created `fullDeleteCacheEntry()` in query-invalidation.ts that clears all state. GC effect now uses this. |
607
+
|**Incomplete useEffect deps**| Initial fetch effect missing deps (refetchOnMount, staleTime, doFetch) - hidden by eslint-disable | Added `refetchOnMountRef` and `staleTimeRef` refs. Deps are now `[enabled, serializedKey, doFetch]`. |
608
+
609
+
**Review Findings (from 4 CLI agents):**
610
+
- ✅ All 3 critical issues correctly fixed
611
+
- ✅ Extraction boundaries well-chosen with clear responsibilities
612
+
- ✅ Backwards compatibility maintained via re-exports
613
+
- ⚠️ Suggestion: Double bumpGeneration call in fullDeleteCacheEntry (harmless but redundant)
- ⚠️ Suggestion: Dead exports (getInFlightPromise, setInFlightPromise) - future API surface
616
+
617
+
**Multi-Agent Review (Codex, Codebuff, Claude Code, Gemini):**
618
+
619
+
| Issue | Problem | Fix Applied |
620
+
|-------|---------|-------------|
621
+
|**Redundant setRetryCount**|`refetch()` called `setRetryCount(0)` then `clearRetryState()` which already deletes count | Removed redundant `setRetryCount` call |
622
+
|**Two delete functions**|`deleteCacheEntry` incomplete vs `fullDeleteCacheEntry` complete - footgun | Renamed to `deleteCacheEntryCore` (internal), kept `fullDeleteCacheEntry` as public API |
623
+
|**Memory leak in generations**|`generations` map never cleaned up during normal deletion | Added `clearGeneration(key)` call in `fullDeleteCacheEntry`|
624
+
|**gcTimeouts exported mutable**| Map exported directly allowing any module to mutate | Replaced with accessor functions (`setGcTimeout`, `clearGcTimeout`) |
625
+
|**GC effect deps issue**|`gcTime` in deps caused spurious cleanup runs on option change | Stored `gcTime` in ref, removed from deps |
626
+
|**AI slop comments**| Verbose JSDoc that just repeated function names | Removed ~60 lines of obvious comments |
0 commit comments