From 41628770f5cee78e6247f23ce90d8c19f8127b14 Mon Sep 17 00:00:00 2001 From: Harold Hunt Date: Thu, 19 Mar 2026 19:53:02 -0400 Subject: [PATCH] Tests: trim command secret gateway imports (#50663) Merged via squash. Prepared head SHA: 7f64fd3ee17c3a7e5b7f26e618816497e94c5243 Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com> Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com> Reviewed-by: @huntharo --- CHANGELOG.md | 1 + src/cli/command-secret-gateway.test.ts | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8de5d606931..0cf9b671096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -167,6 +167,7 @@ Docs: https://docs.openclaw.ai - Plugins/WhatsApp: share split-load singleton state for plugin command registration and active WhatsApp listeners so duplicate module graphs no longer lose native plugin commands or outbound listener state. (#50418) Thanks @huntharo. - Onboarding/custom providers: keep Azure AI Foundry `*.services.ai.azure.com` custom endpoints on the selected compatibility path instead of forcing Responses, so chat-completions Foundry models still work after setup. Fixes #50528. (#50535) Thanks @obviyus. - Plugins/update: let `openclaw plugins update ` target tracked npm installs by dist-tag or exact version, and preserve the recorded npm spec for later id-based updates. (#49998) Thanks @huntharo. +- Tests/CLI: reduce command-secret gateway test import pressure while keeping the real protocol payload validator in place, so the isolated lane no longer carries the heavier runtime-web and message-channel graphs. (#50663) Thanks @huntharo. ### Breaking diff --git a/src/cli/command-secret-gateway.test.ts b/src/cli/command-secret-gateway.test.ts index a322b1853cd..38cedb54204 100644 --- a/src/cli/command-secret-gateway.test.ts +++ b/src/cli/command-secret-gateway.test.ts @@ -7,6 +7,15 @@ vi.mock("../gateway/call.js", () => ({ callGateway, })); +vi.mock("../secrets/runtime-web-tools.js", () => ({ + resolveRuntimeWebTools: vi.fn(async () => ({})), +})); + +vi.mock("../utils/message-channel.js", () => ({ + GATEWAY_CLIENT_MODES: { CLI: "cli" }, + GATEWAY_CLIENT_NAMES: { CLI: "cli" }, +})); + let resolveCommandSecretRefsViaGateway: typeof import("./command-secret-gateway.js").resolveCommandSecretRefsViaGateway; beforeAll(async () => {