From 5a028489b14b43e4b7dfdeca93d258330603b10f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 3 May 2026 19:02:21 +0100 Subject: [PATCH] fix(voice-call): fallback on gateway 1006 closes (#76858) --- CHANGELOG.md | 1 + extensions/voice-call/src/cli.test.ts | 12 ++++++++++++ extensions/voice-call/src/cli.ts | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 extensions/voice-call/src/cli.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c6ce16e646..cb20d465ec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Docs: https://docs.openclaw.ai - Plugins/OpenRouter: advertise DeepSeek V4 thinking levels, including `xhigh` and `max`, through the runtime and lightweight provider policy surfaces so `/think` validation no longer rejects OpenRouter-routed DeepSeek V4 models. Fixes #74788. Thanks @vincentkoc. - Status/sessions: ignore malformed non-string persisted session provider/model metadata instead of throwing while rendering status summaries. Thanks @vincentkoc. - CLI/config: remove only the targeted array element for `openclaw config unset array[index]` instead of replaying the unset during config write and deleting the shifted next element. Fixes #76290. Thanks @SymbolStar and @vincentkoc. +- Plugins/voice-call: treat abnormal local Gateway close code 1006 as a standalone CLI fallback case, so `voicecall smoke` and related commands can still run the provider check path when the Gateway socket closes before returning a response. - Agents/tools: stop treating `tools.deny: ["write"]` as an implicit `apply_patch` deny; operators who want to block patch writes should deny `apply_patch` or `group:fs` explicitly. Fixes #76749. (#76795) Thanks @Nek-12 and @hclsys. - Plugins/release: verify published plugin npm tarballs expose compiled runtime entries after publish, catching TS-only package artifacts before release closeout. Thanks @vincentkoc. - CLI/message: exit cleanly with a nonzero status when message-command plugin registry loading fails before dispatch, preventing `openclaw-message` children from staying alive after plugin load errors. Fixes #76168. diff --git a/extensions/voice-call/src/cli.test.ts b/extensions/voice-call/src/cli.test.ts new file mode 100644 index 00000000000..1b9080264ae --- /dev/null +++ b/extensions/voice-call/src/cli.test.ts @@ -0,0 +1,12 @@ +import { describe, expect, it } from "vitest"; +import { __testing } from "./cli.js"; + +describe("voice-call CLI gateway fallback", () => { + it("treats abnormal local gateway closes as standalone-runtime fallback candidates", () => { + expect( + __testing.isGatewayUnavailableForLocalFallback( + new Error("gateway closed (1006 abnormal closure (no close frame)): no close reason"), + ), + ).toBe(true); + }); +}); diff --git a/extensions/voice-call/src/cli.ts b/extensions/voice-call/src/cli.ts index a555f728eaf..29a50d47405 100644 --- a/extensions/voice-call/src/cli.ts +++ b/extensions/voice-call/src/cli.ts @@ -60,6 +60,7 @@ export const __testing = { setCallGatewayFromCliForTests(next?: typeof callGatewayFromCli): void { voiceCallCliDeps.callGatewayFromCli = next ?? callGatewayFromCli; }, + isGatewayUnavailableForLocalFallback, }; function writeStdoutLine(...values: unknown[]): void { @@ -81,6 +82,7 @@ function isGatewayUnavailableForLocalFallback(err: unknown): boolean { message.includes("ECONNRESET") || message.includes("EHOSTUNREACH") || message.includes("ENOTFOUND") || + message.includes("gateway closed (1006") || message.includes("gateway not connected") ); }