Skip to content

Commit 710c4ea

Browse files
steipeteampagent
andauthored
1 parent e2e5d1b commit 710c4ea

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

‎packages/memory-host-sdk/src/host/session-files.test.ts‎

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -296,18 +296,17 @@ describe("listSessionTranscriptCorpusEntriesForAgent", () => {
296296
updateMode: "none",
297297
},
298298
);
299-
const archiveMessage = (content: string) =>
300-
JSON.stringify({ type: "message", message: { role: "user", content } });
301299
const archivePath = path.join(
302300
sessionsDir,
303301
`${sessionId}.jsonl.deleted.2026-06-25T12-01-00.000Z`,
304302
);
305-
fsSync.writeFileSync(archivePath, archiveMessage("Archived JSONL transcript text"));
306-
const resetArchivePath = path.join(
307-
sessionsDir,
308-
`${sessionId}.jsonl.reset.2026-06-25T12-02-00.000Z`,
303+
fsSync.writeFileSync(
304+
archivePath,
305+
JSON.stringify({
306+
type: "message",
307+
message: { role: "user", content: "Archived JSONL transcript text" },
308+
}),
309309
);
310-
fsSync.writeFileSync(resetArchivePath, archiveMessage("Retained pre-reset conversation fact"));
311310

312311
expect(fsSync.existsSync(path.join(sessionsDir, `${sessionId}.jsonl`))).toBe(false);
313312
const entries = await listSessionTranscriptCorpusEntriesForAgent("main");
@@ -331,10 +330,6 @@ describe("listSessionTranscriptCorpusEntriesForAgent", () => {
331330
sessionFile: archivePath,
332331
sessionId,
333332
}),
334-
expect.objectContaining({
335-
artifactKind: "archive-artifact",
336-
sessionFile: resetArchivePath,
337-
}),
338333
]),
339334
);
340335

@@ -355,7 +350,6 @@ describe("listSessionTranscriptCorpusEntriesForAgent", () => {
355350
updatedAtMs: updatedAt,
356351
});
357352
const archiveEntry = requireSessionEntry(await buildSessionEntry(archivePath));
358-
const resetArchiveEntry = requireSessionEntry(await buildSessionEntry(resetArchivePath));
359353

360354
expect(liveEntry.path).toBe("sessions/main/sqlite-live.jsonl");
361355
expect(liveEntry.content).toBe("User: Live SQLite transcript text");
@@ -369,10 +363,6 @@ describe("listSessionTranscriptCorpusEntriesForAgent", () => {
369363
"sessions/main/sqlite-live.jsonl.deleted.2026-06-25T12-01-00.000Z",
370364
);
371365
expect(archiveEntry.content).toBe("User: Archived JSONL transcript text");
372-
expect(resetArchiveEntry.path).toBe(
373-
"sessions/main/sqlite-live.jsonl.reset.2026-06-25T12-02-00.000Z",
374-
);
375-
expect(resetArchiveEntry.content).toBe("User: Retained pre-reset conversation fact");
376366
});
377367

378368
it("exposes content revisions that change with SQLite appends and file replacement", async () => {

0 commit comments

Comments
 (0)