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

推荐订阅源

B
Blog RSS Feed
量子位
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
B
Blog
U
Unit 42
C
Check Point Blog
I
InfoQ
aimingoo的专栏
aimingoo的专栏
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
云风的 BLOG
云风的 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
refactor: move WhatsApp group inference out of core · ope...
steipete · 2026-04-22 · via Recent Commits to openclaw:main

@@ -107,7 +107,7 @@ describe("sessions", () => {

107107

{

108108

name: "returns normalized per-sender key",

109109

scope: "per-sender" as const,

110-

ctx: { From: "whatsapp:+1555" },

110+

ctx: { From: "chat:+1555" },

111111

expected: "+1555",

112112

},

113113

{

@@ -125,14 +125,14 @@ describe("sessions", () => {

125125

{

126126

name: "keeps group chats distinct",

127127

scope: "per-sender" as const,

128-

ctx: { From: "12345-678@g.us", ChatType: "group", Provider: "whatsapp" },

129-

expected: "whatsapp:group:12345-678@g.us",

128+

ctx: { From: "room-123", ChatType: "group", Provider: "demo-chat" },

129+

expected: "demo-chat:group:room-123",

130130

},

131131

{

132132

name: "prefixes group keys with provider when available",

133133

scope: "per-sender" as const,

134-

ctx: { From: "12345-678@g.us", ChatType: "group", Provider: "whatsapp" },

135-

expected: "whatsapp:group:12345-678@g.us",

134+

ctx: { From: "room-456", ChatType: "group", Provider: "demo-chat" },

135+

expected: "demo-chat:group:room-456",

136136

},

137137

] as const;

138138

@@ -179,7 +179,7 @@ describe("sessions", () => {

179179

{

180180

name: "maps direct chats to main key when provided",

181181

scope: "per-sender" as const,

182-

ctx: { From: "whatsapp:+1555" },

182+

ctx: { From: "chat:+1555" },

183183

mainKey: "main",

184184

expected: "agent:main:main",

185185

},

@@ -200,9 +200,9 @@ describe("sessions", () => {

200200

{

201201

name: "leaves groups untouched even with main key",

202202

scope: "per-sender" as const,

203-

ctx: { From: "12345-678@g.us", ChatType: "group", Provider: "whatsapp" },

203+

ctx: { From: "room-123", ChatType: "group", Provider: "demo-chat" },

204204

mainKey: "main",

205-

expected: "agent:main:whatsapp:group:12345-678@g.us",

205+

expected: "agent:main:demo-chat:group:room-123",

206206

},

207207

] as const;

208208

@@ -268,7 +268,7 @@ describe("sessions", () => {

268268

await updateLastRoute({

269269

storePath,

270270

sessionKey: mainSessionKey,

271-

channel: "whatsapp",

271+

channel: "demo-chat",

272272

to: "111",

273273

accountId: "legacy",

274274

deliveryContext: {

@@ -325,7 +325,7 @@ describe("sessions", () => {

325325

});

326326327327

it("updateLastRoute records origin + group metadata when ctx is provided", async () => {

328-

const sessionKey = "agent:main:whatsapp:group:123@g.us";

328+

const sessionKey = "agent:main:demo-chat:group:room-123";

329329

const { storePath } = await createSessionStoreFixture({

330330

prefix: "updateLastRoute",

331331

entries: {},

@@ -335,23 +335,23 @@ describe("sessions", () => {

335335

storePath,

336336

sessionKey,

337337

deliveryContext: {

338-

channel: "whatsapp",

339-

to: "123@g.us",

338+

channel: "demo-chat",

339+

to: "room-123",

340340

},

341341

ctx: {

342-

Provider: "whatsapp",

342+

Provider: "demo-chat",

343343

ChatType: "group",

344344

GroupSubject: "Family",

345-

From: "123@g.us",

345+

From: "room-123",

346346

},

347347

});

348348349349

const store = loadSessionStore(storePath);

350350

expect(store[sessionKey]?.subject).toBe("Family");

351-

expect(store[sessionKey]?.channel).toBe("whatsapp");

352-

expect(store[sessionKey]?.groupId).toBe("123@g.us");

353-

expect(store[sessionKey]?.origin?.label).toBe("Family id:123@g.us");

354-

expect(store[sessionKey]?.origin?.provider).toBe("whatsapp");

351+

expect(store[sessionKey]?.channel).toBe("demo-chat");

352+

expect(store[sessionKey]?.groupId).toBe("room-123");

353+

expect(store[sessionKey]?.origin?.label).toBe("Family");

354+

expect(store[sessionKey]?.origin?.provider).toBe("demo-chat");

355355

expect(store[sessionKey]?.origin?.chatType).toBe("group");

356356

});

357357

@@ -461,18 +461,18 @@ describe("sessions", () => {

461461

store["agent:main:main"] = {

462462

sessionId: "sess-normalized",

463463

updatedAt: Date.now(),

464-

lastChannel: " WhatsApp ",

464+

lastChannel: " Demo Chat ",

465465

lastTo: " +1555 ",

466466

lastAccountId: " acct-1 ",

467467

};

468468

});

469469470470

const store = loadSessionStore(storePath);

471-

expect(store["agent:main:main"]?.lastChannel).toBe("whatsapp");

471+

expect(store["agent:main:main"]?.lastChannel).toBe("demo chat");

472472

expect(store["agent:main:main"]?.lastTo).toBe("+1555");

473473

expect(store["agent:main:main"]?.lastAccountId).toBe("acct-1");

474474

expect(store["agent:main:main"]?.deliveryContext).toEqual({

475-

channel: "whatsapp",

475+

channel: "demo chat",

476476

to: "+1555",

477477

accountId: "acct-1",

478478

});