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

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
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 whatsapp ack reaction assertions · openclaw...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -73,16 +73,17 @@ const runAckReaction = (overrides: Partial<AckReactionParams> = {}) =>

7373

...overrides,

7474

});

757576-

const expectAckReactionSent = (accountId: string) => {

76+

const expectAckReactionSent = (accountId: string, cfg: OpenClawConfig = createConfig("ack")) => {

7777

expect(hoisted.sendReactionWhatsApp).toHaveBeenCalledWith(

7878

"15551234567@s.whatsapp.net",

7979

"msg-1",

8080

"👀",

81-

expect.objectContaining({

81+

{

8282

verbose: false,

8383

fromMe: false,

8484

accountId,

85-

}),

85+

cfg,

86+

},

8687

);

8788

};

8889

@@ -94,13 +95,14 @@ describe("maybeSendAckReaction", () => {

9495

it.each(["ack", "minimal", "extensive"] as const)(

9596

"sends ack reactions when reactionLevel is %s",

9697

async (reactionLevel) => {

98+

const cfg = createConfig(reactionLevel);

9799

const ackReaction = await runAckReaction({

98-

cfg: createConfig(reactionLevel),

100+

cfg,

99101

});

100102101103

expect(ackReaction?.ackReactionValue).toBe("👀");

102104

await expect(ackReaction?.ackReactionPromise).resolves.toBe(true);

103-

expectAckReactionSent("default");

105+

expectAckReactionSent("default", cfg);

104106

},

105107

);

106108

@@ -114,14 +116,15 @@ describe("maybeSendAckReaction", () => {

114116

});

115117116118

it("uses the active account reactionLevel override for ack gating", async () => {

117-

const ackReaction = await runAckReaction({

118-

cfg: createConfig("off", {

119-

accounts: {

120-

work: {

121-

reactionLevel: "ack",

122-

},

119+

const cfg = createConfig("off", {

120+

accounts: {

121+

work: {

122+

reactionLevel: "ack",

123123

},

124-

}),

124+

},

125+

});

126+

const ackReaction = await runAckReaction({

127+

cfg,

125128

msg: createMessage({

126129

accountId: "work",

127130

}),

@@ -130,39 +133,42 @@ describe("maybeSendAckReaction", () => {

130133

});

131134132135

expect(ackReaction?.ackReactionValue).toBe("👀");

133-

expectAckReactionSent("work");

136+

expectAckReactionSent("work", cfg);

134137

});

135138136139

it("returns a handle that removes the ack with an empty reaction", async () => {

137-

const ackReaction = await runAckReaction();

140+

const cfg = createConfig("ack");

141+

const ackReaction = await runAckReaction({ cfg });

138142139143

await ackReaction?.remove();

140144141145

expect(hoisted.sendReactionWhatsApp).toHaveBeenLastCalledWith(

142146

"15551234567@s.whatsapp.net",

143147

"msg-1",

144148

"",

145-

expect.objectContaining({

149+

{

146150

verbose: false,

147151

fromMe: false,

148152

accountId: "default",

149-

}),

153+

cfg,

154+

},

150155

);

151156

});

152157153158

it("records ack send failures on the handle", async () => {

159+

const cfg = createConfig("ack");

154160

const warn = vi.fn();

155161

hoisted.sendReactionWhatsApp.mockRejectedValueOnce(new Error("session down"));

156162157-

const ackReaction = await runAckReaction({ warn });

163+

const ackReaction = await runAckReaction({ cfg, warn });

158164159165

await expect(ackReaction?.ackReactionPromise).resolves.toBe(false);

160166

expect(warn).toHaveBeenCalledWith(

161-

expect.objectContaining({

167+

{

162168

error: "session down",

163169

chatId: "15551234567@s.whatsapp.net",

164170

messageId: "msg-1",

165-

}),

171+

},

166172

"failed to send ack reaction",

167173

);

168174

});