From 335f870cd294a7208510de75c4bfc3037763f4e3 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 2 May 2026 12:18:09 +0100 Subject: [PATCH] test: keep live release smokes tool-minimal --- scripts/openclaw-cross-os-release-checks.ts | 16 ++++++++++++++++ src/gateway/gateway-cli-backend.live.test.ts | 9 +++++++++ .../openclaw-cross-os-release-checks.test.ts | 5 ++++- test/scripts/test-live-shard.test.ts | 8 ++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/scripts/openclaw-cross-os-release-checks.ts b/scripts/openclaw-cross-os-release-checks.ts index 40d28f0d0bf..704a4221702 100644 --- a/scripts/openclaw-cross-os-release-checks.ts +++ b/scripts/openclaw-cross-os-release-checks.ts @@ -113,6 +113,7 @@ export const CROSS_OS_GATEWAY_STATUS_COMMAND_TIMEOUT_MS = export const CROSS_OS_GATEWAY_READY_TIMEOUT_MS = 3 * 60_000; export const CROSS_OS_WINDOWS_GATEWAY_READY_TIMEOUT_MS = 5 * 60_000; export const CROSS_OS_AGENT_TURN_TIMEOUT_SECONDS = 600; +export const CROSS_OS_RELEASE_SMOKE_TOOLS_PROFILE = "minimal"; if (isMainModule()) { try { @@ -1901,6 +1902,14 @@ async function runInstalledModelsSet(params) { logPath: params.logPath, timeoutMs: 2 * 60 * 1000, }); + await runInstalledCli({ + cliPath: params.cliPath, + args: ["config", "set", "tools.profile", CROSS_OS_RELEASE_SMOKE_TOOLS_PROFILE], + cwd: params.cwd, + env: params.env, + logPath: params.logPath, + timeoutMs: 2 * 60 * 1000, + }); } async function runInstalledAgentTurn(params) { @@ -2692,6 +2701,13 @@ async function runModelsSet(params) { logPath: params.logPath, timeoutMs: 2 * 60 * 1000, }); + await runOpenClaw({ + lane: params.lane, + env: params.env, + args: ["config", "set", "tools.profile", CROSS_OS_RELEASE_SMOKE_TOOLS_PROFILE], + logPath: params.logPath, + timeoutMs: 2 * 60 * 1000, + }); } async function runAgentTurn(params) { diff --git a/src/gateway/gateway-cli-backend.live.test.ts b/src/gateway/gateway-cli-backend.live.test.ts index 1e9e4d3c839..d76fd267e35 100644 --- a/src/gateway/gateway-cli-backend.live.test.ts +++ b/src/gateway/gateway-cli-backend.live.test.ts @@ -258,6 +258,7 @@ describeLive("gateway live (cli backend)", () => { const schemaProbePluginPath = CLI_MCP_SCHEMA_PROBE ? await createMcpSchemaProbePlugin(tempDir) : undefined; + const useMinimalToolsProfile = providerId === "codex-cli" && !schemaProbePluginPath; process.env.OPENCLAW_STATE_DIR = stateDir; const bundleMcp = backendResolved?.bundleMcp === true; const bootstrapWorkspace = await createBootstrapWorkspace(tempDir); @@ -318,6 +319,14 @@ describeLive("gateway live (cli backend)", () => { }, } : cfg.models, + ...(useMinimalToolsProfile + ? { + tools: { + ...cfg.tools, + profile: "minimal" as const, + }, + } + : {}), agents: { ...cfg.agents, defaults: { diff --git a/test/scripts/openclaw-cross-os-release-checks.test.ts b/test/scripts/openclaw-cross-os-release-checks.test.ts index 14546f39644..7cdf7a2a229 100644 --- a/test/scripts/openclaw-cross-os-release-checks.test.ts +++ b/test/scripts/openclaw-cross-os-release-checks.test.ts @@ -27,6 +27,7 @@ import { CROSS_OS_GATEWAY_READY_TIMEOUT_MS, CROSS_OS_GATEWAY_STATUS_COMMAND_TIMEOUT_MS, CROSS_OS_GATEWAY_STATUS_RPC_TIMEOUT_MS, + CROSS_OS_RELEASE_SMOKE_TOOLS_PROFILE, CROSS_OS_WINDOWS_GATEWAY_READY_TIMEOUT_MS, CROSS_OS_DASHBOARD_FETCH_TIMEOUT_MS, CROSS_OS_DASHBOARD_SMOKE_TIMEOUT_MS, @@ -160,11 +161,13 @@ describe("scripts/openclaw-cross-os-release-checks", () => { expect(allowlist).not.toContain("web-readability"); }); - it("keeps cross-OS live smoke agent turns on GPT-5.5-safe timeouts and minimal thinking", () => { + it("keeps cross-OS live smoke agent turns on GPT-5.5-safe timeouts and minimal context", () => { const source = readFileSync("scripts/openclaw-cross-os-release-checks.ts", "utf8"); const providerOverride = "models.providers.${params.providerConfig.extensionId}"; + expect(CROSS_OS_RELEASE_SMOKE_TOOLS_PROFILE).toBe("minimal"); expect(source).toContain('"--thinking",\n "minimal"'); + expect(source.match(/"tools\.profile", CROSS_OS_RELEASE_SMOKE_TOOLS_PROFILE/g)).toHaveLength(2); expect(CROSS_OS_AGENT_TURN_TIMEOUT_SECONDS).toBeGreaterThanOrEqual(600); expect(source).toContain("buildReleaseProviderConfigOverride"); expect(source).toContain("models: []"); diff --git a/test/scripts/test-live-shard.test.ts b/test/scripts/test-live-shard.test.ts index 751e8b2e52b..e3fcaeb445d 100644 --- a/test/scripts/test-live-shard.test.ts +++ b/test/scripts/test-live-shard.test.ts @@ -1,3 +1,4 @@ +import { readFileSync } from "node:fs"; import { describe, expect, it } from "vitest"; import { LIVE_TEST_SHARDS, @@ -100,6 +101,13 @@ describe("scripts/test-live-shard", () => { ]); }); + it("keeps the Codex CLI backend live smoke on a minimal tool profile", () => { + const source = readFileSync("src/gateway/gateway-cli-backend.live.test.ts", "utf8"); + + expect(source).toContain('providerId === "codex-cli" && !schemaProbePluginPath'); + expect(source).toContain('profile: "minimal" as const'); + }); + it("rejects unknown shard names", () => { expect(() => selectLiveShardFiles("native-live-missing")).toThrow(/Unknown live test shard/u); });