From b99cd37a8f62d3f49ac2040740d85526f34404e2 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Thu, 16 Jul 2026 19:18:00 -0700 Subject: [PATCH] test(native-chat): clarify that lifecycle field is optional Add type assertion and comment documenting that lifecycle field is optional and can be omitted in truncation-gating test fixtures. --- src/main/runtime/rpc/methods/native-chat.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/runtime/rpc/methods/native-chat.test.ts b/src/main/runtime/rpc/methods/native-chat.test.ts index 1086a473b15..aa9662668e3 100644 --- a/src/main/runtime/rpc/methods/native-chat.test.ts +++ b/src/main/runtime/rpc/methods/native-chat.test.ts @@ -8,9 +8,17 @@ const OVERSIZED = 'x'.repeat(5000) const cachedResult = vi.hoisted(() => ({ value: { messages: [] as NativeChatMessage[], + // Optional so truncation-gating fixtures can omit it; lifecycle tests set it explicitly. lifecycle: undefined as | { state: 'working' | 'completed' | 'interrupted'; turnId: string; timestamp: number | null } | undefined + } as { + messages: NativeChatMessage[] + lifecycle?: { + state: 'working' | 'completed' | 'interrupted' + turnId: string + timestamp: number | null + } } })) const watcher = vi.hoisted(() => ({