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

推荐订阅源

Last Week in AI
Last Week in AI
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
V
Visual Studio Blog
小众软件
小众软件
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
IT之家
IT之家
Vercel News
Vercel News
C
Check Point Blog
Google DeepMind News
Google DeepMind News
月光博客
月光博客
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog

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
chore(deadcode): remove unused task flow retry path · ope...
vincentkoc · 2026-06-21 · via Recent Commits to openclaw:main

@@ -10,7 +10,6 @@ import { getRegisteredDetachedTaskLifecycleRuntime } from "./detached-task-runti

1010

import {

1111

cancelTaskById,

1212

createTaskRecord,

13-

findLatestTaskForFlowId,

1413

getTaskById,

1514

isParentFlowLinkError,

1615

linkTaskToFlowById,

@@ -216,141 +215,6 @@ export function setDetachedTaskDeliveryStatusByRunId(params: {

216215

return setTaskRunDeliveryStatusByRunId(params);

217216

}

218217219-

type RetryBlockedFlowResult = {

220-

found: boolean;

221-

retried: boolean;

222-

reason?: string;

223-

previousTask?: TaskRecord;

224-

task?: TaskRecord;

225-

};

226-227-

type RetryBlockedFlowParams = {

228-

flowId: string;

229-

sourceId?: string;

230-

requesterOrigin?: TaskDeliveryState["requesterOrigin"];

231-

childSessionKey?: string;

232-

agentId?: string;

233-

runId?: string;

234-

label?: string;

235-

task?: string;

236-

preferMetadata?: boolean;

237-

notifyPolicy?: TaskNotifyPolicy;

238-

deliveryStatus?: TaskDeliveryStatus;

239-

status: "queued" | "running";

240-

startedAt?: number;

241-

lastEventAt?: number;

242-

progressSummary?: string | null;

243-

};

244-245-

function resolveRetryableBlockedFlowTask(flowId: string): {

246-

flowFound: boolean;

247-

retryable: boolean;

248-

latestTask?: TaskRecord;

249-

reason?: string;

250-

} {

251-

const flow = getTaskFlowById(flowId);

252-

if (!flow) {

253-

return {

254-

flowFound: false,

255-

retryable: false,

256-

reason: "Flow not found.",

257-

};

258-

}

259-

const latestTask = findLatestTaskForFlowId(flowId);

260-

if (!latestTask) {

261-

return {

262-

flowFound: true,

263-

retryable: false,

264-

reason: "Flow has no retryable task.",

265-

};

266-

}

267-

if (flow.status !== "blocked") {

268-

return {

269-

flowFound: true,

270-

retryable: false,

271-

latestTask,

272-

reason: "Flow is not blocked.",

273-

};

274-

}

275-

if (latestTask.status !== "succeeded" || latestTask.terminalOutcome !== "blocked") {

276-

return {

277-

flowFound: true,

278-

retryable: false,

279-

latestTask,

280-

reason: "Latest TaskFlow task is not blocked.",

281-

};

282-

}

283-

return {

284-

flowFound: true,

285-

retryable: true,

286-

latestTask,

287-

};

288-

}

289-290-

function retryBlockedFlowTask(params: RetryBlockedFlowParams): RetryBlockedFlowResult {

291-

const resolved = resolveRetryableBlockedFlowTask(params.flowId);

292-

if (!resolved.retryable || !resolved.latestTask) {

293-

return {

294-

found: resolved.flowFound,

295-

retried: false,

296-

reason: resolved.reason,

297-

};

298-

}

299-

const flow = getTaskFlowById(params.flowId);

300-

if (!flow) {

301-

return {

302-

found: false,

303-

retried: false,

304-

reason: "Flow not found.",

305-

previousTask: resolved.latestTask,

306-

};

307-

}

308-

const task = createTaskRecord({

309-

runtime: resolved.latestTask.runtime,

310-

sourceId: params.sourceId ?? resolved.latestTask.sourceId,

311-

ownerKey: flow.ownerKey,

312-

scopeKind: "session",

313-

requesterOrigin: params.requesterOrigin ?? flow.requesterOrigin,

314-

parentFlowId: flow.flowId,

315-

childSessionKey: params.childSessionKey,

316-

parentTaskId: resolved.latestTask.taskId,

317-

agentId: params.agentId ?? resolved.latestTask.agentId,

318-

runId: params.runId,

319-

label: params.label ?? resolved.latestTask.label,

320-

task: params.task ?? resolved.latestTask.task,

321-

preferMetadata: params.preferMetadata,

322-

notifyPolicy: params.notifyPolicy ?? resolved.latestTask.notifyPolicy,

323-

deliveryStatus: params.deliveryStatus ?? "pending",

324-

status: params.status,

325-

startedAt: params.startedAt,

326-

lastEventAt: params.lastEventAt,

327-

progressSummary: params.progressSummary,

328-

});

329-

if (!task) {

330-

return {

331-

found: true,

332-

retried: false,

333-

reason: "Task persistence failed.",

334-

previousTask: resolved.latestTask,

335-

};

336-

}

337-

return {

338-

found: true,

339-

retried: true,

340-

previousTask: resolved.latestTask,

341-

task,

342-

};

343-

}

344-345-

export function retryBlockedFlowAsQueuedTaskRun(

346-

params: Omit<RetryBlockedFlowParams, "status" | "startedAt" | "lastEventAt" | "progressSummary">,

347-

): RetryBlockedFlowResult {

348-

return retryBlockedFlowTask({

349-

...params,

350-

status: "queued",

351-

});

352-

}

353-354218

type CancelFlowResult = {

355219

found: boolean;

356220

cancelled: boolean;