























@@ -164,24 +164,24 @@ describe("buildSessionEntry", () => {
164164fsSync.writeFileSync(bakPath, content);
165165fsSync.writeFileSync(checkpointPath, content);
166166167-const resetEntry = await buildSessionEntry(resetPath);
168-const deletedEntry = await buildSessionEntry(deletedPath);
169-const bakEntry = await buildSessionEntry(bakPath);
170-const checkpointEntry = await buildSessionEntry(checkpointPath);
167+const resetEntry = requireSessionEntry(await buildSessionEntry(resetPath));
168+const deletedEntry = requireSessionEntry(await buildSessionEntry(deletedPath));
169+const bakEntry = requireSessionEntry(await buildSessionEntry(bakPath));
170+const checkpointEntry = requireSessionEntry(await buildSessionEntry(checkpointPath));
171171172172// Usage-counted archives (reset, deleted) must surface real content so
173173// post-reset memory_search can recover prior session history.
174-expect(resetEntry?.content).toContain("User: Archived hello");
175-expect(resetEntry?.lineMap).toEqual([1]);
176-expect(deletedEntry?.content).toContain("User: Archived hello");
177-expect(deletedEntry?.lineMap).toEqual([1]);
174+expect(resetEntry.content).toContain("User: Archived hello");
175+expect(resetEntry.lineMap).toEqual([1]);
176+expect(deletedEntry.content).toContain("User: Archived hello");
177+expect(deletedEntry.lineMap).toEqual([1]);
178178179179// .bak and compaction checkpoints remain opaque pre-archive / snapshot
180180// artifacts and stay empty so they do not get double-indexed.
181-expect(bakEntry?.content).toBe("");
182-expect(bakEntry?.lineMap).toEqual([]);
183-expect(checkpointEntry?.content).toBe("");
184-expect(checkpointEntry?.lineMap).toEqual([]);
181+expect(bakEntry.content).toBe("");
182+expect(bakEntry.lineMap).toEqual([]);
183+expect(checkpointEntry.content).toBe("");
184+expect(checkpointEntry.lineMap).toEqual([]);
185185});
186186187187it("keeps cron-run deleted archives opaque when the live session store entry is gone", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。