fix(test): publish runtime in CLI live harness (#129041)

Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
This commit is contained in:
Vincent Koc
2026-08-26 02:13:34 +08:00
committed by GitHub
parent 03edb00a1c
commit 0d4e8f2f5c
3 changed files with 3 additions and 8 deletions
@@ -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();
@@ -553,7 +553,7 @@ export function applyCliBackendLiveEnv(preservedEnv: ReadonlySet<string>): 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;
}
@@ -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);