Skip to content

Commit edf40ab

Browse files
committed
test(gateway): retry gemini acp startup warmup timeout
1 parent 406ae72 commit edf40ab

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

src/gateway/gateway-acp-bind.live.test.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,29 @@ function isRetryableAcpBindWarmupText(texts: string[]): boolean {
257257
combined.includes("acp runtime backend is currently unavailable") ||
258258
combined.includes("try again in a moment") ||
259259
combined.includes("acp runtime backend is not configured") ||
260-
combined.includes("acp dispatch is disabled")
260+
combined.includes("acp dispatch is disabled") ||
261+
combined.includes("startup timed out before initialize completed")
261262
);
262263
}
263264

265+
describe("isRetryableAcpBindWarmupText", () => {
266+
it.each([
267+
{
268+
texts: ["ACP runtime backend is currently unavailable; try again in a moment."],
269+
expected: true,
270+
},
271+
{
272+
texts: [
273+
"ACP error (ACP_SESSION_INIT_FAILED): Gemini CLI ACP startup timed out before initialize completed.",
274+
],
275+
expected: true,
276+
},
277+
{ texts: ["ACP error (ACP_SESSION_INIT_FAILED): ACP metadata is missing."], expected: false },
278+
])("returns $expected for $texts", ({ texts, expected }) => {
279+
expect(isRetryableAcpBindWarmupText(texts)).toBe(expected);
280+
});
281+
});
282+
264283
function formatAssistantTextPreview(texts: string[], maxChars = 600): string {
265284
const combined = texts.join("\n\n").trim();
266285
if (!combined) {

0 commit comments

Comments
 (0)