fix(server): preserve usage cache outside walked roots (#8540)
Co-authored-by: Simone <[email protected]>
This commit is contained in:
1 parent
f47e74004a
commit
6d15c5bbc3
2 files changed
+26
-1
No files matched your search
@@ -193,6 +193,20 @@ describe("pruneScanCache with an unwalked root", () => {
|
||||
expect(removed).toBe(0);
|
||||
expect(cache.size).toBe(1);
|
||||
});
|
||||
|
||||
it("keeps entries under a sibling path that only shares the walked root prefix", () => {
|
||||
const cache = cacheWith([["/claude/projects-copy/a.jsonl", 5000, [record()]]]);
|
||||
|
||||
const removed = pruneScanCache(cache, {
|
||||
livePaths: new Set(),
|
||||
walkedRoots: ["/claude/projects"],
|
||||
windowStartMs: 4000,
|
||||
retentionCutoffMs: 1000,
|
||||
});
|
||||
|
||||
expect(removed).toBe(0);
|
||||
expect(cache.size).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("dedupeWithinFile", () => {
|
||||
|
||||
Reference in new issue
Block a user