From 17ce47987e673b6618454d033885b17b2a01912e Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Thu, 25 Jun 2026 10:52:13 +0900 Subject: feat(core): chunks retry-banner, wire conformance, ws logic, history adapter - core/chunks: add retry-banner view-model (+test), update reducer/selectors/types - core/wire: update conformance checks (+test) - adapters/ws: update reconnect logic (+tests) - adapters/history: new client-side routing adapter (history + popstate wrapper) --- src/core/wire/conformance.test.ts | 17 ++++++++++++++--- src/core/wire/conformance.ts | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/core/wire') diff --git a/src/core/wire/conformance.test.ts b/src/core/wire/conformance.test.ts index c50cbf4..b5dd8e1 100644 --- a/src/core/wire/conformance.test.ts +++ b/src/core/wire/conformance.test.ts @@ -76,6 +76,15 @@ describe("classifies every AgentEvent type", () => { { type: "done", conversationId: "c1", turnId: "t1", reason: "complete" }, { type: "turn-sealed", conversationId: "c1", turnId: "t1" }, { type: "steering", conversationId: "c1", turnId: "t1", text: "steer mid-turn" }, + { + type: "provider-retry", + conversationId: "c1", + turnId: "t1", + attempt: 0, + delayMs: 5000, + message: "HTTP 429: overloaded", + code: "429", + }, ]; it("returns a stable label for every AgentEvent.type variant", () => { @@ -95,11 +104,12 @@ describe("classifies every AgentEvent type", () => { "done", "turn-sealed", "steering", + "provider-retry", ]); }); - it("covers all 14 AgentEvent variants", () => { - expect(samples).toHaveLength(14); + it("covers all 15 AgentEvent variants", () => { + expect(samples).toHaveLength(15); }); }); @@ -139,11 +149,12 @@ describe("classifies every WsServerMessage type", () => { event: { type: "done" as const, conversationId: "c", turnId: "t", reason: "r" }, }, { type: "chat.error" as const, message: "e" }, - { type: "conversation.open" as const, conversationId: "c1" }, + { type: "conversation.open" as const, conversationId: "c1", workspaceId: "w1" }, { type: "conversation.statusChanged" as const, conversationId: "c1", status: "active" as const, + workspaceId: "w1", }, { type: "conversation.compacted" as const, diff --git a/src/core/wire/conformance.ts b/src/core/wire/conformance.ts index 07808fc..7da4794 100644 --- a/src/core/wire/conformance.ts +++ b/src/core/wire/conformance.ts @@ -36,6 +36,8 @@ export function assertAgentEventExhaustive(event: AgentEvent): string { return "step-complete"; case "steering": return "steering"; + case "provider-retry": + return "provider-retry"; default: return event satisfies never; } -- cgit v1.2.3