惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
博客园 - 【当耐特】
量子位
有赞技术团队
有赞技术团队
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
C
Check Point Blog
B
Blog RSS Feed
M
MIT News - Artificial intelligence
H
Help Net Security
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
腾讯CDC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(agents): extend terminal outcome projections (#88162)...
steipete · 2026-05-30 · via Recent Commits to openclaw:main

@@ -143,6 +143,79 @@ describe("OpenClaw SDK", () => {

143143

expect(result.error?.message).toBe("aborted by operator");

144144

});

145145146+

it("maps provider-started rpc timeout wait snapshots to timed_out", async () => {

147+

const transport = new FakeTransport({

148+

"agent.wait": {

149+

status: "timeout",

150+

runId: "run_hard_timeout",

151+

stopReason: "rpc",

152+

timeoutPhase: "provider",

153+

providerStarted: true,

154+

error: "provider request timed out",

155+

},

156+

});

157+

const oc = new OpenClaw({ transport });

158+159+

const result = await oc.runs.wait("run_hard_timeout");

160+161+

expect(result.runId).toBe("run_hard_timeout");

162+

expect(result.status).toBe("timed_out");

163+

expect(result.error?.message).toBe("provider request timed out");

164+

});

165+166+

it("maps provider timeout wait errors to timed_out", async () => {

167+

const transport = new FakeTransport({

168+

"agent.wait": {

169+

status: "error",

170+

runId: "run_timeout_error",

171+

timeoutPhase: "provider",

172+

providerStarted: true,

173+

error: "provider request timed out",

174+

},

175+

});

176+

const oc = new OpenClaw({ transport });

177+178+

const result = await oc.runs.wait("run_timeout_error");

179+180+

expect(result.runId).toBe("run_timeout_error");

181+

expect(result.status).toBe("timed_out");

182+

expect(result.error?.message).toBe("provider request timed out");

183+

});

184+185+

it("does not map provider-started wait errors to timed_out without timeout attribution", async () => {

186+

const transport = new FakeTransport({

187+

"agent.wait": {

188+

status: "error",

189+

runId: "run_provider_error",

190+

providerStarted: true,

191+

error: "provider authentication failed",

192+

},

193+

});

194+

const oc = new OpenClaw({ transport });

195+196+

const result = await oc.runs.wait("run_provider_error");

197+198+

expect(result.runId).toBe("run_provider_error");

199+

expect(result.status).toBe("failed");

200+

expect(result.error?.message).toBe("provider authentication failed");

201+

});

202+203+

it("does not treat successful provider-started wait snapshots as timed_out", async () => {

204+

const transport = new FakeTransport({

205+

"agent.wait": {

206+

status: "ok",

207+

runId: "run_provider_started_ok",

208+

providerStarted: true,

209+

},

210+

});

211+

const oc = new OpenClaw({ transport });

212+213+

const result = await oc.runs.wait("run_provider_started_ok");

214+215+

expect(result.runId).toBe("run_provider_started_ok");

216+

expect(result.status).toBe("completed");

217+

});

218+146219

it("maps auth-revoked wait snapshots to cancelled", async () => {

147220

const transport = new FakeTransport({

148221

"agent.wait": {

@@ -192,6 +265,26 @@ describe("OpenClaw SDK", () => {

192265

expect(result.error?.message).toBe("429 RESOURCE_EXHAUSTED");

193266

});

194267268+

it("keeps provider-attributed pending-error wait deadlines non-terminal", async () => {

269+

const transport = new FakeTransport({

270+

"agent.wait": {

271+

status: "timeout",

272+

runId: "run_pending_provider_error",

273+

error: "provider request timed out",

274+

pendingError: true,

275+

timeoutPhase: "provider",

276+

providerStarted: true,

277+

},

278+

});

279+

const oc = new OpenClaw({ transport });

280+281+

const result = await oc.runs.wait("run_pending_provider_error");

282+283+

expect(result.runId).toBe("run_pending_provider_error");

284+

expect(result.status).toBe("accepted");

285+

expect(result.error?.message).toBe("provider request timed out");

286+

});

287+195288

it("maps terminal runtime timeout snapshots to timed_out", async () => {

196289

const transport = new FakeTransport({

197290

"agent.wait": {

@@ -1025,9 +1118,123 @@ describe("OpenClaw SDK", () => {

10251118

expect(cancelled.runId).toBe("run_1");

10261119

expect(cancelled.data).toEqual({ phase: "end", aborted: true, stopReason: "rpc" });

102711201028-

const authRevoked = normalizeGatewayEvent({

1121+

const hardTimeout = normalizeGatewayEvent({

10291122

event: "agent",

10301123

seq: 6,

1124+

payload: {

1125+

runId: "run_1",

1126+

stream: "lifecycle",

1127+

ts,

1128+

data: {

1129+

phase: "end",

1130+

aborted: true,

1131+

stopReason: "rpc",

1132+

timeoutPhase: "provider",

1133+

providerStarted: true,

1134+

},

1135+

},

1136+

});

1137+

expect(hardTimeout.type).toBe("run.timed_out");

1138+

expect(hardTimeout.runId).toBe("run_1");

1139+

expect(hardTimeout.data).toEqual({

1140+

phase: "end",

1141+

aborted: true,

1142+

stopReason: "rpc",

1143+

timeoutPhase: "provider",

1144+

providerStarted: true,

1145+

});

1146+1147+

const hardTimeoutError = normalizeGatewayEvent({

1148+

event: "agent",

1149+

seq: 7,

1150+

payload: {

1151+

runId: "run_1",

1152+

stream: "lifecycle",

1153+

ts,

1154+

data: {

1155+

phase: "error",

1156+

error: "provider request timed out",

1157+

timeoutPhase: "provider",

1158+

providerStarted: true,

1159+

},

1160+

},

1161+

});

1162+

expect(hardTimeoutError.type).toBe("run.timed_out");

1163+

expect(hardTimeoutError.runId).toBe("run_1");

1164+

expect(hardTimeoutError.data).toEqual({

1165+

phase: "error",

1166+

error: "provider request timed out",

1167+

timeoutPhase: "provider",

1168+

providerStarted: true,

1169+

});

1170+1171+

const providerStartedError = normalizeGatewayEvent({

1172+

event: "agent",

1173+

seq: 8,

1174+

payload: {

1175+

runId: "run_1",

1176+

stream: "lifecycle",

1177+

ts,

1178+

data: {

1179+

phase: "error",

1180+

error: "provider authentication failed",

1181+

providerStarted: true,

1182+

},

1183+

},

1184+

});

1185+

expect(providerStartedError.type).toBe("run.failed");

1186+

expect(providerStartedError.runId).toBe("run_1");

1187+

expect(providerStartedError.data).toEqual({

1188+

phase: "error",

1189+

error: "provider authentication failed",

1190+

providerStarted: true,

1191+

});

1192+1193+

const hardTimeoutEnd = normalizeGatewayEvent({

1194+

event: "agent",

1195+

seq: 9,

1196+

payload: {

1197+

runId: "run_1",

1198+

stream: "lifecycle",

1199+

ts,

1200+

data: {

1201+

phase: "end",

1202+

timeoutPhase: "provider",

1203+

providerStarted: true,

1204+

},

1205+

},

1206+

});

1207+

expect(hardTimeoutEnd.type).toBe("run.timed_out");

1208+

expect(hardTimeoutEnd.runId).toBe("run_1");

1209+

expect(hardTimeoutEnd.data).toEqual({

1210+

phase: "end",

1211+

timeoutPhase: "provider",

1212+

providerStarted: true,

1213+

});

1214+1215+

const providerStartedEnd = normalizeGatewayEvent({

1216+

event: "agent",

1217+

seq: 10,

1218+

payload: {

1219+

runId: "run_1",

1220+

stream: "lifecycle",

1221+

ts,

1222+

data: {

1223+

phase: "end",

1224+

providerStarted: true,

1225+

},

1226+

},

1227+

});

1228+

expect(providerStartedEnd.type).toBe("run.completed");

1229+

expect(providerStartedEnd.runId).toBe("run_1");

1230+

expect(providerStartedEnd.data).toEqual({

1231+

phase: "end",

1232+

providerStarted: true,

1233+

});

1234+1235+

const authRevoked = normalizeGatewayEvent({

1236+

event: "agent",

1237+

seq: 10,

10311238

payload: {

10321239

runId: "run_1",

10331240

stream: "lifecycle",

@@ -1045,7 +1252,7 @@ describe("OpenClaw SDK", () => {

1045125210461253

const timedOut = normalizeGatewayEvent({

10471254

event: "agent",

1048-

seq: 7,

1255+

seq: 11,

10491256

payload: {

10501257

runId: "run_1",

10511258

stream: "lifecycle",