mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:40:43 +00:00
test: extend parallels gpt-5.5 smoke budgets
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
parseProvider,
|
||||
modelProviderConfigBatchJson,
|
||||
repoRoot,
|
||||
resolveParallelsModelTimeoutSeconds,
|
||||
resolveHostIp,
|
||||
resolveHostPort,
|
||||
resolveLatestVersion,
|
||||
@@ -343,7 +344,7 @@ class LinuxSmoke {
|
||||
this.status.freshGateway = "pass";
|
||||
await this.phase(
|
||||
"fresh.first-local-agent-turn",
|
||||
Number(process.env.OPENCLAW_PARALLELS_LINUX_AGENT_TIMEOUT_S || 900),
|
||||
Number(process.env.OPENCLAW_PARALLELS_LINUX_AGENT_TIMEOUT_S || 1500),
|
||||
() => this.verifyLocalTurn(),
|
||||
);
|
||||
this.status.freshAgent = "pass";
|
||||
@@ -372,7 +373,7 @@ class LinuxSmoke {
|
||||
this.status.upgradeGateway = "pass";
|
||||
await this.phase(
|
||||
"upgrade.first-local-agent-turn",
|
||||
Number(process.env.OPENCLAW_PARALLELS_LINUX_AGENT_TIMEOUT_S || 900),
|
||||
Number(process.env.OPENCLAW_PARALLELS_LINUX_AGENT_TIMEOUT_S || 1500),
|
||||
() => this.verifyLocalTurn(),
|
||||
);
|
||||
this.status.upgradeAgent = "pass";
|
||||
@@ -717,7 +718,7 @@ for attempt in 1 2; do
|
||||
set +e
|
||||
/usr/bin/env ${shellQuote(`${this.auth.apiKeyEnv}=${this.auth.apiKeyValue}`)} openclaw agent --local --agent main --session-id "$session_id" --message ${shellQuote(
|
||||
"Reply with exact ASCII text OK only.",
|
||||
)} --thinking minimal --json >"$output_file" 2>&1
|
||||
)} --thinking minimal --timeout ${resolveParallelsModelTimeoutSeconds("linux")} --json >"$output_file" 2>&1
|
||||
rc=$?
|
||||
set -e
|
||||
cat "$output_file"
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
parseMode,
|
||||
parseProvider,
|
||||
modelProviderConfigBatchJson,
|
||||
resolveParallelsModelTimeoutSeconds,
|
||||
resolveHostIp,
|
||||
resolveHostPort,
|
||||
resolveLatestVersion,
|
||||
@@ -473,7 +474,7 @@ class MacosSmoke {
|
||||
this.status.freshDashboard = "pass";
|
||||
await this.phase(
|
||||
"fresh.first-agent-turn",
|
||||
Number(process.env.OPENCLAW_PARALLELS_MACOS_AGENT_TIMEOUT_S || 900),
|
||||
Number(process.env.OPENCLAW_PARALLELS_MACOS_AGENT_TIMEOUT_S || 2100),
|
||||
() => this.verifyTurn(),
|
||||
);
|
||||
this.status.freshAgent = "pass";
|
||||
@@ -530,7 +531,7 @@ class MacosSmoke {
|
||||
this.status.upgradeDashboard = "pass";
|
||||
await this.phase(
|
||||
"upgrade.first-agent-turn",
|
||||
Number(process.env.OPENCLAW_PARALLELS_MACOS_AGENT_TIMEOUT_S || 900),
|
||||
Number(process.env.OPENCLAW_PARALLELS_MACOS_AGENT_TIMEOUT_S || 2100),
|
||||
() => this.verifyTurn(),
|
||||
);
|
||||
this.status.upgradeAgent = "pass";
|
||||
@@ -1003,7 +1004,7 @@ for attempt in 1 2; do
|
||||
set +e
|
||||
/usr/bin/env ${shellQuote(`${this.auth.apiKeyEnv}=${this.auth.apiKeyValue}`)} ${guestNode} ${guestOpenClawEntry} agent --local --agent main --session-id "$session_id" --message ${shellQuote(
|
||||
"Reply with exact ASCII text OK only.",
|
||||
)} --thinking minimal --json >"$output_file" 2>&1
|
||||
)} --thinking minimal --timeout ${resolveParallelsModelTimeoutSeconds("macos")} --json >"$output_file" 2>&1
|
||||
rc=$?
|
||||
set -e
|
||||
cat "$output_file"
|
||||
|
||||
@@ -82,8 +82,11 @@ export function resolveParallelsModelTimeoutSeconds(platform?: Platform): number
|
||||
platform === undefined
|
||||
? undefined
|
||||
: process.env[`OPENCLAW_PARALLELS_${platform.toUpperCase()}_MODEL_TIMEOUT_S`];
|
||||
const raw = Number(platformEnv || process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || 600);
|
||||
return Number.isFinite(raw) && raw > 0 ? Math.floor(raw) : 600;
|
||||
const defaultSeconds = platform === "macos" || platform === "windows" ? 900 : 600;
|
||||
const raw = Number(
|
||||
platformEnv || process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || defaultSeconds,
|
||||
);
|
||||
return Number.isFinite(raw) && raw > 0 ? Math.floor(raw) : defaultSeconds;
|
||||
}
|
||||
|
||||
export function providerTimeoutConfigJson(modelId: string, platform: Platform): string {
|
||||
|
||||
@@ -398,7 +398,7 @@ class WindowsSmoke {
|
||||
this.status.freshGateway = "pass";
|
||||
await this.phase(
|
||||
"fresh.first-agent-turn",
|
||||
Number(process.env.OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 1500),
|
||||
Number(process.env.OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 2100),
|
||||
() => this.verifyTurn(),
|
||||
);
|
||||
this.status.freshAgent = "pass";
|
||||
@@ -455,7 +455,7 @@ class WindowsSmoke {
|
||||
this.status.upgradeGateway = "pass";
|
||||
await this.phase(
|
||||
"upgrade.first-agent-turn",
|
||||
Number(process.env.OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 1500),
|
||||
Number(process.env.OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 2100),
|
||||
() => this.verifyTurn(),
|
||||
);
|
||||
this.status.upgradeAgent = "pass";
|
||||
@@ -936,7 +936,7 @@ for ($attempt = 1; $attempt -le 2; $attempt++) {
|
||||
}
|
||||
}
|
||||
if (-not $agentOk) { throw 'openclaw agent finished without OK response' }`,
|
||||
Number(process.env.OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 1500) * 1000,
|
||||
Number(process.env.OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 2100) * 1000,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@ console.log(JSON.stringify(result));
|
||||
|
||||
expect(script).toContain('guestPowerShellBackground(\n "agent-turn"');
|
||||
expect(script).toContain("OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S");
|
||||
expect(script).toContain("OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 1500");
|
||||
expect(script).toContain("OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S || 2100");
|
||||
expect(script).toContain("windowsAgentTurnConfigPatchScript(this.auth.modelId)");
|
||||
expect(script).toContain("--model");
|
||||
expect(script).toContain('resolveParallelsModelTimeoutSeconds("windows")');
|
||||
@@ -493,6 +493,28 @@ console.log(JSON.stringify(result));
|
||||
expect(script).toContain('"$sessionId.jsonl"');
|
||||
});
|
||||
|
||||
it("gives GPT-5.5 enough Parallels model time on slower desktop guests", () => {
|
||||
const source = `
|
||||
import { resolveParallelsModelTimeoutSeconds } from "./${TS_PATHS.common}";
|
||||
console.log(JSON.stringify({
|
||||
macos: resolveParallelsModelTimeoutSeconds("macos"),
|
||||
windows: resolveParallelsModelTimeoutSeconds("windows"),
|
||||
linux: resolveParallelsModelTimeoutSeconds("linux"),
|
||||
}));
|
||||
`;
|
||||
expect(JSON.parse(runTsEval(source))).toEqual({
|
||||
linux: 600,
|
||||
macos: 900,
|
||||
windows: 900,
|
||||
});
|
||||
expect(readFileSync(TS_PATHS.macos, "utf8")).toContain(
|
||||
'--timeout ${resolveParallelsModelTimeoutSeconds("macos")}',
|
||||
);
|
||||
expect(readFileSync(TS_PATHS.linux, "utf8")).toContain(
|
||||
'--timeout ${resolveParallelsModelTimeoutSeconds("linux")}',
|
||||
);
|
||||
});
|
||||
|
||||
it("waits through transient Windows restoring state before VM operations", () => {
|
||||
const script = readFileSync(TS_PATHS.windows, "utf8");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user