From edf40ab6c9440604fe6a74aeaa8d8bc81b5ee16b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 26 Apr 2026 20:50:06 +0100 Subject: [PATCH] test(gateway): retry gemini acp startup warmup timeout --- src/gateway/gateway-acp-bind.live.test.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/gateway/gateway-acp-bind.live.test.ts b/src/gateway/gateway-acp-bind.live.test.ts index 0e3ab2d0c79..a09aec5c9f4 100644 --- a/src/gateway/gateway-acp-bind.live.test.ts +++ b/src/gateway/gateway-acp-bind.live.test.ts @@ -257,10 +257,29 @@ function isRetryableAcpBindWarmupText(texts: string[]): boolean { combined.includes("acp runtime backend is currently unavailable") || combined.includes("try again in a moment") || combined.includes("acp runtime backend is not configured") || - combined.includes("acp dispatch is disabled") + combined.includes("acp dispatch is disabled") || + combined.includes("startup timed out before initialize completed") ); } +describe("isRetryableAcpBindWarmupText", () => { + it.each([ + { + texts: ["ACP runtime backend is currently unavailable; try again in a moment."], + expected: true, + }, + { + texts: [ + "ACP error (ACP_SESSION_INIT_FAILED): Gemini CLI ACP startup timed out before initialize completed.", + ], + expected: true, + }, + { texts: ["ACP error (ACP_SESSION_INIT_FAILED): ACP metadata is missing."], expected: false }, + ])("returns $expected for $texts", ({ texts, expected }) => { + expect(isRetryableAcpBindWarmupText(texts)).toBe(expected); + }); +}); + function formatAssistantTextPreview(texts: string[], maxChars = 600): string { const combined = texts.join("\n\n").trim(); if (!combined) {