test: fix resume test assertions for compaction replay records (#681)

This commit is contained in:
_Kerman 2026-06-12 11:32:30 +08:00 committed by GitHub
parent e900854be8
commit 2f7218cba4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View file

@ -994,6 +994,7 @@ describe('KimiTUI resume message replay', () => {
const driver = await replayIntoDriver([
message('user', [{ type: 'text', text: 'prompt before compaction' }]),
{
time: REPLAY_TIME,
type: 'compaction',
result: {
summary: 'Compacted transcript summary.',
@ -1025,6 +1026,7 @@ describe('KimiTUI resume message replay', () => {
const driver = await replayIntoDriver([
message('user', [{ type: 'text', text: 'prompt before cancellation' }]),
{
time: REPLAY_TIME,
type: 'compaction',
result: 'cancelled',
instruction: 'preserve implementation notes',

View file

@ -270,7 +270,7 @@ describe('Agent resume', () => {
content: [{ type: 'text', text: 'Historical prompt before compaction' }],
}),
}),
{
expect.objectContaining({
type: 'compaction',
result: {
summary: 'Compacted implementation notes.',
@ -279,7 +279,7 @@ describe('Agent resume', () => {
tokensAfter: 24,
},
instruction: 'preserve implementation notes',
},
}),
]);
});
@ -299,11 +299,11 @@ describe('Agent resume', () => {
await ctx.agent.resume();
expect(ctx.agent.replayBuilder.buildResult()).toEqual([
{
expect.objectContaining({
type: 'compaction',
result: 'cancelled',
instruction: 'preserve implementation notes',
},
}),
]);
});