mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 21:10:43 +00:00
test(release): retry staged runtime mirror races
This commit is contained in:
@@ -1485,9 +1485,13 @@ show_gateway_status_compat() {
|
||||
}
|
||||
|
||||
verify_turn() {
|
||||
local agent_log agent_done agent_runner
|
||||
agent_log="/tmp/openclaw-parallels-agent-turn.log"
|
||||
agent_done="/tmp/openclaw-parallels-agent-turn.done"
|
||||
agent_runner="/tmp/openclaw-parallels-agent-turn.sh"
|
||||
guest_current_user_exec "$GUEST_NODE_BIN" "$GUEST_OPENCLAW_ENTRY" models set "$MODEL_ID"
|
||||
guest_current_user_exec "$GUEST_NODE_BIN" "$GUEST_OPENCLAW_ENTRY" config set agents.defaults.skipBootstrap true --strict-json
|
||||
guest_current_user_sh "$(cat <<EOF
|
||||
run_logged_guest_current_user_sh "$(cat <<EOF
|
||||
export PATH=$(shell_quote "$GUEST_EXEC_PATH")
|
||||
workspace="\${OPENCLAW_WORKSPACE_DIR:-\$HOME/.openclaw/workspace}"
|
||||
mkdir -p "\$workspace/.openclaw"
|
||||
@@ -1511,7 +1515,7 @@ exec /usr/bin/env $(shell_quote "$API_KEY_ENV=$API_KEY_VALUE") \
|
||||
--message $(shell_quote "Reply with exact ASCII text OK only.") \
|
||||
--json
|
||||
EOF
|
||||
)"
|
||||
)" "$agent_log" "$agent_done" "$TIMEOUT_AGENT_S" "$agent_runner"
|
||||
}
|
||||
|
||||
resolve_dashboard_url() {
|
||||
|
||||
@@ -2661,8 +2661,10 @@ async function runAgentTurn(params) {
|
||||
|
||||
export function shouldRetryCrossOsAgentTurnError(error) {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
return /failed to (?:install|stage) bundled runtime deps|failed to stage bundled runtime deps after/u.test(
|
||||
message,
|
||||
return (
|
||||
/failed to (?:install|stage) bundled runtime deps|failed to stage bundled runtime deps after/u.test(
|
||||
message,
|
||||
) || /plugin load failed: .*ENOENT: .*plugin-runtime-deps.*\/dist\//su.test(message)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,13 @@ describe("scripts/openclaw-cross-os-release-checks", () => {
|
||||
new Error("document-extract failed to stage bundled runtime deps after 463ms"),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
shouldRetryCrossOsAgentTurnError(
|
||||
new Error(
|
||||
"PluginLoadFailureError: plugin load failed: qqbot: Error: ENOENT: no such file or directory, open '/tmp/home/.openclaw/plugin-runtime-deps/openclaw-2026.4.27-beta.1/dist/console-DnTGmMkY.js'",
|
||||
),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(shouldRetryCrossOsAgentTurnError(new Error("Agent output did not contain OK."))).toBe(
|
||||
false,
|
||||
);
|
||||
|
||||
@@ -54,4 +54,11 @@ describe("Parallels smoke model selection", () => {
|
||||
expect(script).toContain("deadline=$((SECONDS + TIMEOUT_GATEWAY_S))");
|
||||
expect(script).toContain("gateway status --deep --require-rpc --timeout 30000");
|
||||
});
|
||||
|
||||
it("runs the macOS agent turn through the logged guest runner", () => {
|
||||
const script = readFileSync("scripts/e2e/parallels-macos-smoke.sh", "utf8");
|
||||
|
||||
expect(script).toContain('agent_log="/tmp/openclaw-parallels-agent-turn.log"');
|
||||
expect(script).toContain("run_logged_guest_current_user_sh");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user