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

推荐订阅源

V
V2EX
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
量子位
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow 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
test: assert matrix group history messages · openclaw/ope...
shakkernerd · 2026-05-08 · via Recent Commits to openclaw:main

@@ -199,8 +199,12 @@ describe("matrix group chat history — scenario 1: basic accumulation", () => {

199199

const ctx = finalizeInboundContext.mock.calls[1]?.[0] as Record<string, unknown>;

200200

const history = ctx["InboundHistory"] as Array<{ body: string }>;

201201

expect(history).toHaveLength(2);

202-

expect(history.map((h) => h.body).some((b) => b.includes("msg A"))).toBe(true);

203-

expect(history.map((h) => h.body).some((b) => b.includes("msg B"))).toBe(true);

202+

expect(history.map((h) => h.body)).toEqual(

203+

expect.arrayContaining([expect.stringContaining("msg A")]),

204+

);

205+

expect(history.map((h) => h.body)).toEqual(

206+

expect.arrayContaining([expect.stringContaining("msg B")]),

207+

);

204208

}

205209206210

// @agent_b trigger D — A/B/C consumed; history is empty

@@ -393,7 +397,9 @@ describe("matrix group chat history — scenario 1: basic accumulation", () => {

393397

expect(finalizeInboundContext).toHaveBeenCalledOnce();

394398

const ctx = finalizeInboundContext.mock.calls[0]?.[0] as Record<string, unknown>;

395399

const history = ctx["InboundHistory"] as Array<{ body: string }> | undefined;

396-

expect(history?.some((entry) => entry.body.includes("[matrix image attachment]"))).toBe(true);

400+

expect(history?.map((entry) => entry.body)).toEqual(

401+

expect.arrayContaining([expect.stringContaining("[matrix image attachment]")]),

402+

);

397403

});

398404399405

it("includes skipped poll updates in next trigger history", async () => {

@@ -458,7 +464,9 @@ describe("matrix group chat history — scenario 1: basic accumulation", () => {

458464

expect(getRelations).toHaveBeenCalledOnce();

459465

const ctx = finalizeInboundContext.mock.calls[0]?.[0] as Record<string, unknown>;

460466

const history = ctx["InboundHistory"] as Array<{ body: string }> | undefined;

461-

expect(history?.some((entry) => entry.body.includes("Lunch?"))).toBe(true);

467+

expect(history?.map((entry) => entry.body)).toEqual(

468+

expect.arrayContaining([expect.stringContaining("Lunch?")]),

469+

);

462470

});

463471

});

464472

@@ -511,8 +519,12 @@ describe("matrix group chat history — scenario 2: race condition safety", () =

511519

expect(finalizeInboundContext).toHaveBeenCalledTimes(2);

512520

const ctxForC = finalizeInboundContext.mock.calls[1]?.[0] as Record<string, unknown>;

513521

const history = ctxForC["InboundHistory"] as Array<{ body: string }>;

514-

expect(history.some((h) => h.body.includes("msg B"))).toBe(true);

515-

expect(history.every((h) => !h.body.includes("msg A"))).toBe(true);

522+

expect(history.map((h) => h.body)).toEqual(

523+

expect.arrayContaining([expect.stringContaining("msg B")]),

524+

);

525+

expect(history.map((h) => h.body)).not.toEqual(

526+

expect.arrayContaining([expect.stringContaining("msg A")]),

527+

);

516528

});

517529518530

it("watermark does not advance when final reply delivery fails (retry sees same history)", async () => {

@@ -546,7 +558,9 @@ describe("matrix group chat history — scenario 2: race condition safety", () =

546558

{

547559

const ctx = finalizeInboundContext.mock.calls[1]?.[0] as Record<string, unknown>;

548560

const history = ctx["InboundHistory"] as Array<{ body: string }> | undefined;

549-

expect(history?.some((h) => h.body.includes("pending msg"))).toBe(true);

561+

expect(history?.map((h) => h.body)).toEqual(

562+

expect.arrayContaining([expect.stringContaining("pending msg")]),

563+

);

550564

}

551565

});

552566

@@ -624,7 +638,9 @@ describe("matrix group chat history — scenario 2: race condition safety", () =

624638625639

const ctx = finalizeInboundContext.mock.calls[0]?.[0] as Record<string, unknown>;

626640

const history = ctx["InboundHistory"] as Array<{ body: string }> | undefined;

627-

expect(history?.some((entry) => entry.body.includes("plain before trigger"))).toBe(true);

641+

expect(history?.map((entry) => entry.body)).toEqual(

642+

expect.arrayContaining([expect.stringContaining("plain before trigger")]),

643+

);

628644

});

629645630646

it("preserves arrival order when a plain message starts before a later trigger", async () => {