From 72b42f0ed751ee8d2e4e5625a6477e27a0af972b Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 13 Jul 2026 19:03:20 +0100 Subject: [PATCH] fix: preserve ClickClack nonce lookup causes (#105775) --- CHANGELOG.md | 3 +-- extensions/clickclack/src/http-client.test.ts | 10 ++++++++-- extensions/clickclack/src/http-client.ts | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f7795679723..68c3fd8769a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,8 +34,7 @@ Docs: https://docs.openclaw.ai ### Fixes - **Gateway in-process restarts:** clear stale SIGUSR1 restart state and resume prepared host suspensions before rebuilding runtime admission, preventing restart cooldowns or paused scheduling from leaking into the next lifecycle. -- **ClickClack durable media delivery:** route media replies through required delivery, reuse owner-scoped upload and message nonces across retries, repair persisted attachment state without rereading source media, and fail closed when an older ClickClack server cannot prove an unknown send. Thanks @shakkernerd. -- **ClickClack model reply budgets:** remove the channel-level token cap and use the selected provider and model's runtime output budget so short compatibility limits no longer suppress valid replies. Thanks @shakkernerd. +- **ClickClack durable media delivery:** route media replies through required delivery, reuse owner-scoped upload and message nonces across retries, repair persisted attachment state without rereading source media, fail closed when an older ClickClack server cannot prove an unknown send, and use the selected provider and model's runtime output budget instead of a channel-level token cap. Thanks @jjjhenriksen and @shakkernerd. - **Deepgram realtime custom endpoints:** validate Voice Call streaming base URLs with secret-safe errors, preserve explicit `ws://` and `wss://` endpoints, and map HTTP schemes to their matching WebSocket transport for dedicated and self-hosted deployments. (#105334) Thanks @dwc1997. - **macOS remote node readiness:** take the main-session key from the node hello snapshot instead of opening an operator connection during node admission, preventing remote tunnel recovery from leaving Computer Use and node exec stuck in lifecycle transition. - **Claude CLI context budgets:** honor Anthropic model and per-agent `contextTokens` limits by passing the effective limit to Claude Code's native auto-compactor and persisting the same prepared budget in OpenClaw session state. Fixes #80933. (#93198) Thanks @mushuiyu886. diff --git a/extensions/clickclack/src/http-client.test.ts b/extensions/clickclack/src/http-client.test.ts index 0b8e166e11f2..8c1acc7fada0 100644 --- a/extensions/clickclack/src/http-client.test.ts +++ b/extensions/clickclack/src/http-client.test.ts @@ -410,7 +410,10 @@ describe("ClickClack HTTP client", () => { ).resolves.toBeUndefined(); await expect( client.findUploadByNonce({ workspaceId: "wsp_1", nonce: "unsupported" }), - ).rejects.toThrow("does not support durable upload nonce lookup"); + ).rejects.toMatchObject({ + message: expect.stringContaining("does not support durable upload nonce lookup"), + cause: expect.objectContaining({ status: 404 }), + }); await expect( client.findUploadByNonce({ workspaceId: "wsp_1", nonce: "broken" }), ).rejects.toThrow("ClickClack 503"); @@ -466,7 +469,10 @@ describe("ClickClack HTTP client", () => { ).resolves.toBeUndefined(); await expect( client.findMessageByNonce({ workspaceId: "wsp_1", nonce: "unsupported" }), - ).rejects.toThrow("does not support durable message nonce lookup"); + ).rejects.toMatchObject({ + message: expect.stringContaining("does not support durable message nonce lookup"), + cause: expect.objectContaining({ status: 404 }), + }); await expect( client.findMessageByNonce({ workspaceId: "wsp_1", nonce: "broken" }), ).rejects.toThrow("ClickClack 503"); diff --git a/extensions/clickclack/src/http-client.ts b/extensions/clickclack/src/http-client.ts index 3ed5a32f8de9..2b3af9e4fa86 100644 --- a/extensions/clickclack/src/http-client.ts +++ b/extensions/clickclack/src/http-client.ts @@ -218,7 +218,9 @@ export function createClickClackClient(options: ClientOptions) { if (error.headers.get("X-ClickClack-Message-Nonce") === "supported") { return undefined; } - throw new Error("ClickClack server does not support durable message nonce lookup"); + throw new Error("ClickClack server does not support durable message nonce lookup", { + cause: error, + }); } throw error; } @@ -312,7 +314,9 @@ export function createClickClackClient(options: ClientOptions) { if (error.headers.get("X-ClickClack-Upload-Nonce") === "supported") { return undefined; } - throw new Error("ClickClack server does not support durable upload nonce lookup"); + throw new Error("ClickClack server does not support durable upload nonce lookup", { + cause: error, + }); } throw error; }