mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:00:44 +00:00
test(parallels): retry macOS staged runtime mirror race
This commit is contained in:
@@ -1503,13 +1503,15 @@ show_gateway_status_compat() {
|
||||
}
|
||||
|
||||
verify_turn() {
|
||||
local agent_log agent_done agent_runner
|
||||
local agent_log agent_done agent_runner attempt rc
|
||||
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
|
||||
run_logged_guest_current_user_sh "$(cat <<EOF
|
||||
for attempt in 1 2; do
|
||||
set +e
|
||||
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"
|
||||
@@ -1534,6 +1536,18 @@ exec /usr/bin/env $(shell_quote "$API_KEY_ENV=$API_KEY_VALUE") \
|
||||
--json
|
||||
EOF
|
||||
)" "$agent_log" "$agent_done" "$TIMEOUT_AGENT_S" "$agent_runner"
|
||||
rc=$?
|
||||
set -e
|
||||
if [[ $rc -eq 0 ]]; then
|
||||
return 0
|
||||
fi
|
||||
if (( attempt < 2 )) &&
|
||||
guest_current_user_exec /usr/bin/grep -Eq 'plugin load failed: .*ENOENT: .*plugin-runtime-deps.*/dist/' "$agent_log"; then
|
||||
warn "retrying macOS agent turn after staged runtime mirror race"
|
||||
continue
|
||||
fi
|
||||
return "$rc"
|
||||
done
|
||||
}
|
||||
|
||||
resolve_dashboard_url() {
|
||||
|
||||
@@ -62,6 +62,7 @@ describe("Parallels smoke model selection", () => {
|
||||
|
||||
expect(script).toContain('agent_log="/tmp/openclaw-parallels-agent-turn.log"');
|
||||
expect(script).toContain("run_logged_guest_current_user_sh");
|
||||
expect(script).toContain("retrying macOS agent turn after staged runtime mirror race");
|
||||
});
|
||||
|
||||
it("keeps the Windows first agent turn patient enough for cold package startup", () => {
|
||||
|
||||
Reference in New Issue
Block a user