fix(voice-call): fallback on gateway 1006 closes (#76858) · openclaw/openclaw@5a02848
steipete
·
2026-05-04
·
via Recent Commits to openclaw:main
File tree
extensions/voice-call/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -33,6 +33,7 @@ Docs: https://docs.openclaw.ai
|
33 | 33 | - 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. |
34 | 34 | - Status/sessions: ignore malformed non-string persisted session provider/model metadata instead of throwing while rendering status summaries. Thanks @vincentkoc. |
35 | 35 | - 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. |
| 36 | +- 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. |
36 | 37 | - 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. |
37 | 38 | - Plugins/release: verify published plugin npm tarballs expose compiled runtime entries after publish, catching TS-only package artifacts before release closeout. Thanks @vincentkoc. |
38 | 39 | - 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. |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { describe, expect, it } from "vitest"; |
| 2 | +import { __testing } from "./cli.js"; |
| 3 | + |
| 4 | +describe("voice-call CLI gateway fallback", () => { |
| 5 | +it("treats abnormal local gateway closes as standalone-runtime fallback candidates", () => { |
| 6 | +expect( |
| 7 | +__testing.isGatewayUnavailableForLocalFallback( |
| 8 | +new Error("gateway closed (1006 abnormal closure (no close frame)): no close reason"), |
| 9 | +), |
| 10 | +).toBe(true); |
| 11 | +}); |
| 12 | +}); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -60,6 +60,7 @@ export const __testing = {
|
60 | 60 | setCallGatewayFromCliForTests(next?: typeof callGatewayFromCli): void { |
61 | 61 | voiceCallCliDeps.callGatewayFromCli = next ?? callGatewayFromCli; |
62 | 62 | }, |
| 63 | + isGatewayUnavailableForLocalFallback, |
63 | 64 | }; |
64 | 65 | |
65 | 66 | function writeStdoutLine(...values: unknown[]): void { |
@@ -81,6 +82,7 @@ function isGatewayUnavailableForLocalFallback(err: unknown): boolean {
|
81 | 82 | message.includes("ECONNRESET") || |
82 | 83 | message.includes("EHOSTUNREACH") || |
83 | 84 | message.includes("ENOTFOUND") || |
| 85 | +message.includes("gateway closed (1006") || |
84 | 86 | message.includes("gateway not connected") |
85 | 87 | ); |
86 | 88 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。