From 9c91d0d6ee84aa36e636b8ffef2cfede6826da83 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Sat, 6 Jun 2026 08:16:28 +0800 Subject: [PATCH] Fix OpenClaw smoke task polling contract --- .../github-actions/validate-openclaw-session.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/github-actions/validate-openclaw-session.sh b/scripts/github-actions/validate-openclaw-session.sh index c7f0cd1..6c9f100 100755 --- a/scripts/github-actions/validate-openclaw-session.sh +++ b/scripts/github-actions/validate-openclaw-session.sh @@ -159,10 +159,16 @@ if not payloads or payloads[-1].get("done") is not True: result = terminal_result(final.get("result") or final.get("payload") or {}) if result.get("status") == "running": - session_id = result.get("sessionId") - thread_id = result.get("threadId") - turn_id = result.get("turnId") run_id = result.get("runId") + app_thread_key = result.get("appThreadKey") + openclaw_session_key = result.get("openclawSessionKey") + + if not app_thread_key: + raise SystemExit(f"OpenClaw smoke running handle missing appThreadKey: {json.dumps(result, ensure_ascii=False, sort_keys=True)[:1000]}") + if not openclaw_session_key: + raise SystemExit(f"OpenClaw smoke running handle missing openclawSessionKey: {json.dumps(result, ensure_ascii=False, sort_keys=True)[:1000]}") + if not run_id: + raise SystemExit(f"OpenClaw smoke running handle missing runId: {json.dumps(result, ensure_ascii=False, sort_keys=True)[:1000]}") deadline = time.time() + poll_timeout while time.time() < deadline: @@ -171,9 +177,8 @@ if result.get("status") == "running": "id": "poll-task", "method": "xworkmate.tasks.get", "params": { - "sessionId": session_id, - "threadId": thread_id, - "turnId": turn_id, + "appThreadKey": app_thread_key, + "openclawSessionKey": openclaw_session_key, "runId": run_id, }, }).encode("utf-8")