From 9e10ec901de811b8aad52fa4a6d9eb3fe57ee7d7 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 15 Sep 2026 11:52:14 +0800 Subject: [PATCH] fix(ci): align Gateway E2E expectations (#148653) --- .../gateway-repeated-request-recovery.e2e.test.ts | 10 +++++++--- test/system-agent-managed-auth.e2e.test.ts | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/test/e2e/qa-lab/runtime/gateway-repeated-request-recovery.e2e.test.ts b/test/e2e/qa-lab/runtime/gateway-repeated-request-recovery.e2e.test.ts index 09f7fde5fc28..8de5c1819313 100644 --- a/test/e2e/qa-lab/runtime/gateway-repeated-request-recovery.e2e.test.ts +++ b/test/e2e/qa-lab/runtime/gateway-repeated-request-recovery.e2e.test.ts @@ -395,9 +395,13 @@ describe("Gateway repeated-request provider timeout", () => { ); const completed = events.filter((event) => event.type === "session.recovery.completed"); - expect(stalled).toHaveLength(1); - expect(stalled[0]?.ageMs).toEqual(expect.any(Number)); - expect(stalled[0]?.ageMs as number).toBeGreaterThanOrEqual(PRODUCTION_RECOVERY_BOUND_MS); + // The heartbeat can report the same stall again while the provider owns its + // request deadline. Every report must still respect the no-progress bound. + expect(stalled.length).toBeGreaterThan(0); + for (const event of stalled) { + expect(event.ageMs).toEqual(expect.any(Number)); + expect(event.ageMs as number).toBeGreaterThanOrEqual(PRODUCTION_RECOVERY_BOUND_MS); + } expect(requested).toEqual([]); expect(completed).toEqual([]); expect( diff --git a/test/system-agent-managed-auth.e2e.test.ts b/test/system-agent-managed-auth.e2e.test.ts index ed26844f3143..e527ca2befb4 100644 --- a/test/system-agent-managed-auth.e2e.test.ts +++ b/test/system-agent-managed-auth.e2e.test.ts @@ -130,7 +130,7 @@ it("opens New Agent through the real Gateway and runner using a protected provid expect(result).toMatchObject({ sessionId, action: "none", - reply: expect.stringContaining("Let's hatch a new agent"), + reply: expect.stringContaining("Let's create an agent"), }); expect(requests).toEqual([ { @@ -170,7 +170,7 @@ it("opens New Agent through the real Gateway and runner using a protected provid expect(fresh).toMatchObject({ sessionId: freshSessionId, action: "none", - reply: expect.stringContaining("Let's hatch a new agent"), + reply: expect.stringContaining("Let's create an agent"), }); expect(requests).toHaveLength(3); expect(requests[2]?.authorization).toBe(`Bearer ${rotatedKey}`);