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

推荐订阅源

博客园 - 叶小钗
MyScale Blog
MyScale Blog
博客园 - 【当耐特】
I
InfoQ
腾讯CDC
aimingoo的专栏
aimingoo的专栏
L
LangChain Blog
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Vercel News
Vercel News
C
Check Point Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
D
Docker
MongoDB | Blog
MongoDB | 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
feat(cron): surface run diagnostics in status (#75928) · ...
kevinslin · 2026-05-04 · via Recent Commits to openclaw:main

@@ -10,6 +10,11 @@ import { stringifyRouteThreadId } from "../../plugin-sdk/channel-route.js";

1010

import { createLazyImportLoader } from "../../shared/lazy-promise.js";

1111

import { normalizeOptionalString } from "../../shared/string-coerce.js";

1212

import { resolveCronDeliveryPlan, type CronDeliveryPlan } from "../delivery-plan.js";

13+

import {

14+

createCronRunDiagnosticsFromAgentResult,

15+

createCronRunDiagnosticsFromError,

16+

mergeCronRunDiagnostics,

17+

} from "../run-diagnostics.js";

1318

import type {

1419

CronAgentExecutionStarted,

1520

CronDeliveryTrace,

@@ -566,7 +571,14 @@ async function prepareCronRunContext(params: {

566571

if (!resolvedModelSelection.ok) {

567572

return {

568573

ok: false,

569-

result: withRunSession({ status: "error", error: resolvedModelSelection.error }),

574+

result: withRunSession({

575+

status: "error",

576+

error: resolvedModelSelection.error,

577+

diagnostics: createCronRunDiagnosticsFromError(

578+

"cron-preflight",

579+

resolvedModelSelection.error,

580+

),

581+

}),

570582

};

571583

}

572584

let provider = resolvedModelSelection.provider;

@@ -586,6 +598,9 @@ async function prepareCronRunContext(params: {

586598

result: withRunSession({

587599

status: "skipped",

588600

error: preflight.reason,

601+

diagnostics: createCronRunDiagnosticsFromError("model-preflight", preflight.reason, {

602+

severity: "warn",

603+

}),

589604

provider,

590605

model,

591606

}),

@@ -862,7 +877,15 @@ async function finalizeCronRun(params: {

862877

await prepared.persistSessionEntry();

863878864879

if (params.isAborted()) {

865-

return prepared.withRunSession({ status: "error", error: params.abortReason(), ...telemetry });

880+

return prepared.withRunSession({

881+

status: "error",

882+

error: params.abortReason(),

883+

diagnostics: mergeCronRunDiagnostics(

884+

createCronRunDiagnosticsFromAgentResult(finalRunResult, { finalStatus: "error" }),

885+

createCronRunDiagnosticsFromError("cron-setup", params.abortReason()),

886+

),

887+

...telemetry,

888+

});

866889

}

867890

let {

868891

summary,

@@ -882,6 +905,9 @@ async function finalizeCronRun(params: {

882905

await resolveCronChannelOutputPolicy(prepared.resolvedDelivery.channel)

883906

).preferFinalAssistantVisibleText,

884907

});

908+

const agentDiagnostics = createCronRunDiagnosticsFromAgentResult(finalRunResult, {

909+

finalStatus: hasFatalErrorPayload ? "error" : "ok",

910+

});

885911

const resolveRunOutcome = (result?: {

886912

delivered?: boolean;

887913

deliveryAttempted?: boolean;

@@ -897,6 +923,15 @@ async function finalizeCronRun(params: {

897923

delivered: result?.delivered,

898924

deliveryAttempted: result?.deliveryAttempted,

899925

delivery: result?.delivery,

926+

diagnostics: hasFatalErrorPayload

927+

? mergeCronRunDiagnostics(

928+

agentDiagnostics,

929+

createCronRunDiagnosticsFromError(

930+

"agent-run",

931+

embeddedRunError ?? "cron isolated run returned an error payload",

932+

),

933+

)

934+

: agentDiagnostics,

900935

...telemetry,

901936

});

902937

const failPendingPresentationWarningUnlessDelivered = (delivered?: boolean) => {

@@ -975,6 +1010,13 @@ async function finalizeCronRun(params: {

9751010

deliveryAttempted:

9761011

deliveryResult.result.deliveryAttempted ?? deliveryResult.deliveryAttempted,

9771012

delivery: deliveryTrace,

1013+

diagnostics: mergeCronRunDiagnostics(

1014+

agentDiagnostics,

1015+

deliveryResult.result.diagnostics,

1016+

deliveryResult.result.status === "error" && deliveryResult.result.error

1017+

? createCronRunDiagnosticsFromError("delivery", deliveryResult.result.error)

1018+

: undefined,

1019+

),

9781020

};

9791021

failPendingPresentationWarningUnlessDelivered(

9801022

resultWithDeliveryMeta.delivered ?? deliveryResult.delivered,

@@ -1066,7 +1108,11 @@ export async function runCronIsolatedAgentTurn(params: {

10661108

suppressExecNotifyOnExit: prepared.context.suppressExecNotifyOnExit,

10671109

});

10681110

if (isAborted()) {

1069-

return prepared.context.withRunSession({ status: "error", error: abortReason() });

1111+

return prepared.context.withRunSession({

1112+

status: "error",

1113+

error: abortReason(),

1114+

diagnostics: createCronRunDiagnosticsFromError("cron-setup", abortReason()),

1115+

});

10701116

}

10711117

return await finalizeCronRun({

10721118

prepared: prepared.context,

@@ -1075,6 +1121,10 @@ export async function runCronIsolatedAgentTurn(params: {

10751121

isAborted,

10761122

});

10771123

} catch (err) {

1078-

return prepared.context.withRunSession({ status: "error", error: String(err) });

1124+

return prepared.context.withRunSession({

1125+

status: "error",

1126+

error: String(err),

1127+

diagnostics: createCronRunDiagnosticsFromError("agent-run", err),

1128+

});

10791129

}

10801130

}