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

推荐订阅源

V
Visual Studio Blog
量子位
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Google DeepMind News
Google DeepMind News
小众软件
小众软件
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell

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(cron): omit failed webhook output summaries · opencla...
joshavant · 2026-06-25 · via Recent Commits to openclaw:main

@@ -1497,6 +1497,7 @@ describe("gateway server cron", () => {

14971497

const notifyBody = notifyCall.body;

14981498

expect(notifyBody.action).toBe("finished");

14991499

expect(notifyBody.jobId).toBe(notifyJobId);

1500+

expect(notifyBody.summary).toBe("send webhook");

1500150115011502

const legacyFinished = waitForCronEvent(

15021503

ws,

@@ -1532,6 +1533,7 @@ describe("gateway server cron", () => {

15321533

expect(completionCall.init.headers?.Authorization).toBe("Bearer cron-webhook-token");

15331534

expect(completionCall.body.action).toBe("finished");

15341535

expect(completionCall.body.jobId).toBe(completionJobId);

1536+

expect(completionCall.body.summary).toBe("ok");

1535153715361538

const silentRes = await rpcReq(ws, "cron.add", {

15371539

name: "webhook disabled",

@@ -1628,6 +1630,110 @@ describe("gateway server cron", () => {

16281630

}

16291631

}, 60_000);

163016321633+

test("omits raw summaries from failed cron webhook payloads", async () => {

1634+

const { prevSkipCron } = await setupCronTestRun({

1635+

tempPrefix: "openclaw-gw-cron-webhook-failure-summary-",

1636+

cronEnabled: false,

1637+

});

1638+1639+

await writeCronConfig({

1640+

cron: {

1641+

webhookToken: "cron-webhook-token",

1642+

},

1643+

});

1644+1645+

fetchWithSsrFGuardMock.mockClear();

1646+

const { server, ws } = await startServerWithClient();

1647+

await connectOk(ws);

1648+1649+

try {

1650+

const rawSummary = [

1651+

"stdout:",

1652+

"To sign in, use a web browser to open https://microsoft.com/devicelogin",

1653+

"and enter the code ABCD-1234 to authenticate.",

1654+

].join("\n");

1655+

cronIsolatedRun.mockResolvedValueOnce({

1656+

status: "error",

1657+

error: "command exited with code 7",

1658+

summary: rawSummary,

1659+

diagnostics: {

1660+

summary: rawSummary,

1661+

entries: [

1662+

{

1663+

ts: 123,

1664+

source: "exec",

1665+

severity: "error",

1666+

message: rawSummary,

1667+

},

1668+

],

1669+

},

1670+

});

1671+

const directJobId = await addWebhookCronJob({

1672+

ws,

1673+

name: "failed direct webhook",

1674+

sessionTarget: "isolated",

1675+

delivery: { mode: "webhook", to: "https://example.invalid/failed-direct" },

1676+

});

1677+

await runCronJobAndWaitForFinished(ws, directJobId);

1678+

const directCall = getWebhookCall(0);

1679+

expect(directCall.url).toBe("https://example.invalid/failed-direct");

1680+

expect(directCall.init.headers?.Authorization).toBe("Bearer cron-webhook-token");

1681+

expect(directCall.body).toMatchObject({

1682+

action: "finished",

1683+

jobId: directJobId,

1684+

status: "error",

1685+

error: "command exited with code 7",

1686+

});

1687+

expect(directCall.body).not.toHaveProperty("summary");

1688+

expect(directCall.body).not.toHaveProperty("diagnostics");

1689+

expect(JSON.stringify(directCall.body)).not.toContain("ABCD-1234");

1690+1691+

const completionSummary = `${rawSummary}\nstderr:\nSECRET_TOKEN=super-secret-value`;

1692+

cronIsolatedRun.mockResolvedValueOnce({

1693+

status: "error",

1694+

error: "command exited with code 9",

1695+

summary: completionSummary,

1696+

diagnostics: {

1697+

summary: completionSummary,

1698+

entries: [

1699+

{

1700+

ts: 456,

1701+

source: "exec",

1702+

severity: "error",

1703+

message: completionSummary,

1704+

},

1705+

],

1706+

},

1707+

});

1708+

const completionJobId = await addWebhookCronJob({

1709+

ws,

1710+

name: "failed completion webhook",

1711+

sessionTarget: "isolated",

1712+

delivery: {

1713+

mode: "announce",

1714+

completionDestination: {

1715+

mode: "webhook",

1716+

to: "https://example.invalid/failed-completion",

1717+

},

1718+

},

1719+

});

1720+

await runCronJobAndWaitForFinished(ws, completionJobId);

1721+

const completionCall = getWebhookCall(1);

1722+

expect(completionCall.url).toBe("https://example.invalid/failed-completion");

1723+

expect(completionCall.body).toMatchObject({

1724+

action: "finished",

1725+

jobId: completionJobId,

1726+

status: "error",

1727+

error: "command exited with code 9",

1728+

});

1729+

expect(completionCall.body).not.toHaveProperty("summary");

1730+

expect(completionCall.body).not.toHaveProperty("diagnostics");

1731+

expect(JSON.stringify(completionCall.body)).not.toContain("SECRET_TOKEN");

1732+

} finally {

1733+

await cleanupCronTestRun({ ws, server, prevSkipCron });

1734+

}

1735+

}, 45_000);

1736+16311737

test("falls back to the primary delivery channel on job failure and preserves sessionKey", async () => {

16321738

const { prevSkipCron } = await setupCronTestRun({

16331739

tempPrefix: "openclaw-gw-cron-failure-primary-fallback-",