diff --git a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts index 02827ee4d14..af531c34560 100644 --- a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts +++ b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts @@ -333,6 +333,7 @@ describe("telegram live qa runtime", () => { "telegram-context-command", "telegram-current-session-status-tool", "telegram-mentioned-message-reply", + "telegram-stream-final-single-message", "telegram-long-final-reuses-preview", "telegram-long-final-three-chunks", "telegram-mention-gating", @@ -345,6 +346,7 @@ describe("telegram live qa runtime", () => { "telegram-context-command", "telegram-current-session-status-tool", "telegram-mentioned-message-reply", + "telegram-stream-final-single-message", "telegram-long-final-reuses-preview", "telegram-long-final-three-chunks", "telegram-mention-gating", @@ -359,6 +361,15 @@ describe("telegram live qa runtime", () => { .find((scenario) => scenario.id === "telegram-mentioned-message-reply") ?.buildRun("sut_bot").replyToLatestSutMessage, ).toBe(true); + expect( + scenarios + .find((scenario) => scenario.id === "telegram-stream-final-single-message") + ?.buildRun("sut_bot"), + ).toMatchObject({ + expectedJoinedSutTextIncludes: ["QA-TELEGRAM-STREAM-SINGLE-OK"], + expectedSutMessageCount: 1, + replyToLatestSutMessage: true, + }); expect( scenarios .find((scenario) => scenario.id === "telegram-long-final-reuses-preview") diff --git a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts index 50681b54a5b..5706088ddab 100644 --- a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts +++ b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts @@ -48,6 +48,7 @@ type TelegramQaScenarioId = | "telegram-whoami-command" | "telegram-context-command" | "telegram-current-session-status-tool" + | "telegram-stream-final-single-message" | "telegram-long-final-three-chunks" | "telegram-long-final-reuses-preview" | "telegram-mentioned-message-reply" @@ -300,6 +301,22 @@ const TELEGRAM_QA_SCENARIOS: TelegramQaScenarioDefinition[] = [ replyToLatestSutMessage: true, }), }, + { + id: "telegram-stream-final-single-message", + title: "Telegram streamed final stays one message", + defaultEnabled: false, + timeoutMs: 45_000, + buildRun: (sutUsername) => ({ + allowAnySutReply: true, + expectReply: true, + input: `@${sutUsername} Quiet streaming QA check. Reply exactly: QA-TELEGRAM-STREAM-SINGLE-OK`, + expectedTextIncludes: ["QA-TELEGRAM-STREAM-SINGLE-OK"], + expectedJoinedSutTextIncludes: ["QA-TELEGRAM-STREAM-SINGLE-OK"], + expectedSutMessageCount: 1, + replyToLatestSutMessage: true, + settleMs: 4_000, + }), + }, { id: "telegram-long-final-reuses-preview", title: "Telegram long final reuses the preview message",