test: keep live release smokes tool-minimal

This commit is contained in:
Peter Steinberger
2026-05-02 12:18:09 +01:00
parent 460a5c131f
commit 335f870cd2
4 changed files with 37 additions and 1 deletions

View File

@@ -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) {

View File

@@ -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: {

View File

@@ -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: []");

View File

@@ -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);
});