Skip to content

Commit f29b523

Browse files
committed
test(compaction): assert assistant boundary without summary text match
1 parent 07e23e0 commit f29b523

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/agents/embedded-agent-runner/compaction-successor-transcript.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,12 @@ describe("rotateTranscriptAfterCompaction", () => {
250250
);
251251
expect(successorCompaction.firstKeptEntryId).toBe(firstKeptId);
252252
const contextMessages = successor.buildSessionContext().messages;
253-
expect(JSON.stringify(contextMessages)).not.toContain("old assistant");
253+
expect(
254+
contextMessages.some(
255+
(message) =>
256+
message.role === "assistant" && JSON.stringify(message.content).includes("old assistant"),
257+
),
258+
).toBe(false);
254259
expect(JSON.stringify(contextMessages)).toContain("kept user");
255260
});
256261

0 commit comments

Comments
 (0)