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

推荐订阅源

D
Docker
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
博客园 - 聂微东
S
SegmentFault 最新的问题
量子位
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页

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
test: tighten cron failure notification assertions · open...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -79,21 +79,33 @@ describe("sendFailureNotificationAnnounce", () => {

7979

agentId: "main",

8080

sessionKey: "cron:job-1:failure",

8181

});

82-

expect(mocks.deliverOutboundPayloads).toHaveBeenCalledWith(

83-

expect.objectContaining({

84-

cfg,

85-

channel: "telegram",

86-

to: "123",

87-

accountId: "bot-a",

88-

threadId: 42,

89-

payloads: [{ text: "Cron failed" }],

90-

session: { kind: "session" },

91-

identity: { kind: "identity" },

92-

bestEffort: false,

93-

deps: { kind: "deps" },

94-

abortSignal: expect.any(AbortSignal),

95-

}),

96-

);

82+

expect(mocks.deliverOutboundPayloads).toHaveBeenCalledTimes(1);

83+

const [deliveryRequest] = mocks.deliverOutboundPayloads.mock.calls[0] as [

84+

{

85+

abortSignal?: unknown;

86+

accountId?: string;

87+

bestEffort?: boolean;

88+

cfg?: unknown;

89+

channel?: string;

90+

deps?: unknown;

91+

identity?: unknown;

92+

payloads?: unknown;

93+

session?: unknown;

94+

threadId?: number;

95+

to?: string;

96+

},

97+

];

98+

expect(deliveryRequest.cfg).toBe(cfg);

99+

expect(deliveryRequest.channel).toBe("telegram");

100+

expect(deliveryRequest.to).toBe("123");

101+

expect(deliveryRequest.accountId).toBe("bot-a");

102+

expect(deliveryRequest.threadId).toBe(42);

103+

expect(deliveryRequest.payloads).toEqual([{ text: "Cron failed" }]);

104+

expect(deliveryRequest.session).toEqual({ kind: "session" });

105+

expect(deliveryRequest.identity).toEqual({ kind: "identity" });

106+

expect(deliveryRequest.bestEffort).toBe(false);

107+

expect(deliveryRequest.deps).toEqual({ kind: "deps" });

108+

expect(deliveryRequest.abortSignal).toBeInstanceOf(AbortSignal);

97109

});

9811099111

it("uses sessionKey for delivery-target resolution and outbound context", async () => {

@@ -158,13 +170,14 @@ describe("sendFailureNotificationAnnounce", () => {

158170

),

159171

).resolves.toBeUndefined();

160172161-

expect(mocks.warn).toHaveBeenCalledWith(

162-

expect.objectContaining({

163-

err: "send failed",

164-

channel: "telegram",

165-

to: "123",

166-

}),

167-

"cron: failure destination announce failed",

168-

);

173+

expect(mocks.warn).toHaveBeenCalledTimes(1);

174+

const [warnMeta, warnMessage] = mocks.warn.mock.calls[0] as [

175+

{ channel?: string; err?: string; to?: string },

176+

string,

177+

];

178+

expect(warnMeta.err).toBe("send failed");

179+

expect(warnMeta.channel).toBe("telegram");

180+

expect(warnMeta.to).toBe("123");

181+

expect(warnMessage).toBe("cron: failure destination announce failed");

169182

});

170183

});