From 0d4e8f2f5ce702ceb247e9d3e155df49a02b29ab Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 26 Aug 2026 02:13:34 +0800 Subject: [PATCH] fix(test): publish runtime in CLI live harness (#129041) Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com> --- src/gateway/gateway-cli-backend.live-helpers.test.ts | 4 ++-- src/gateway/gateway-cli-backend.live-helpers.ts | 2 +- src/gateway/gateway-cli-backend.live.test.ts | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/gateway/gateway-cli-backend.live-helpers.test.ts b/src/gateway/gateway-cli-backend.live-helpers.test.ts index c3320cc3cc0e..fb15e9880e10 100644 --- a/src/gateway/gateway-cli-backend.live-helpers.test.ts +++ b/src/gateway/gateway-cli-backend.live-helpers.test.ts @@ -43,7 +43,7 @@ describe("gateway cli backend live helpers", () => { delete process.env.ANTHROPIC_API_KEY_OLD; }); - it("applies and restores live env including minimal gateway mode", async () => { + it("applies and restores live env including full gateway mode", async () => { const { applyCliBackendLiveEnv, restoreCliBackendLiveEnv, snapshotCliBackendLiveEnv } = liveHelpers; @@ -74,7 +74,7 @@ describe("gateway cli backend live helpers", () => { expect(process.env.OPENCLAW_SKIP_CANVAS_HOST).toBe("1"); expect(process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER).toBe("1"); expect(process.env.OPENCLAW_BUNDLED_PLUGINS_DIR).toBe("old-bundled"); - expect(process.env.OPENCLAW_TEST_MINIMAL_GATEWAY).toBe("1"); + expect(process.env.OPENCLAW_TEST_MINIMAL_GATEWAY).toBe("0"); expect(process.env.ANTHROPIC_API_KEY).toBeUndefined(); expect(process.env.ANTHROPIC_API_KEY_OLD).toBeUndefined(); diff --git a/src/gateway/gateway-cli-backend.live-helpers.ts b/src/gateway/gateway-cli-backend.live-helpers.ts index 68320497f86f..94c6860b3cdd 100644 --- a/src/gateway/gateway-cli-backend.live-helpers.ts +++ b/src/gateway/gateway-cli-backend.live-helpers.ts @@ -553,7 +553,7 @@ export function applyCliBackendLiveEnv(preservedEnv: ReadonlySet): void process.env.OPENCLAW_SKIP_CRON = "1"; process.env.OPENCLAW_SKIP_CANVAS_HOST = "1"; process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER = "1"; - process.env.OPENCLAW_TEST_MINIMAL_GATEWAY = "1"; + process.env.OPENCLAW_TEST_MINIMAL_GATEWAY = "0"; if (!preservedEnv.has("ANTHROPIC_API_KEY")) { delete process.env.ANTHROPIC_API_KEY; } diff --git a/src/gateway/gateway-cli-backend.live.test.ts b/src/gateway/gateway-cli-backend.live.test.ts index 3c3ac4b4624e..528746872494 100644 --- a/src/gateway/gateway-cli-backend.live.test.ts +++ b/src/gateway/gateway-cli-backend.live.test.ts @@ -284,11 +284,6 @@ describeLive("gateway live (cli backend)", () => { clearRuntimeConfigSnapshot(); applyCliBackendLiveEnv(preservedEnv); - if (CLI_CACHE_PROBE) { - // Cache proof crosses the production prepared-runtime and MCP dispatch boundary. - // Minimal Gateway mode intentionally omits that publication and cannot prove this path. - setTestEnvValue("OPENCLAW_TEST_MINIMAL_GATEWAY", "0"); - } const token = `test-${randomUUID()}`; setTestEnvValue("OPENCLAW_GATEWAY_TOKEN", token);