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

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Register - Security
The Register - Security
The Cloudflare Blog
Last Week in AI
Last Week in AI
月光博客
月光博客
Security Latest
Security Latest
Project Zero
Project Zero
博客园 - 司徒正美
AWS News Blog
AWS News Blog
雷峰网
雷峰网
博客园 - 聂微东
C
Cybersecurity and Infrastructure Security Agency CISA
P
Palo Alto Networks Blog
人人都是产品经理
人人都是产品经理
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
A
About on SuperTechFans
V
V2EX
P
Proofpoint News Feed
腾讯CDC
S
Schneier on Security
K
Kaspersky official blog
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
H
Hacker News: Front Page
Application and Cybersecurity Blog
Application and Cybersecurity Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CERT Recently Published Vulnerability Notes
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
美团技术团队
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
C
Cisco Blogs
PCI Perspectives
PCI Perspectives
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
P
Privacy International News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
W
WeLiveSecurity
Spread Privacy
Spread Privacy
S
Securelist

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: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
test: clear matrix events broad matchers · openclaw/openclaw@c58cf5b
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -25,6 +25,40 @@ function getSentNoticeBodies(sendMessage: ReturnType<typeof vi.fn>): string[] {

2525

return (sendMessage.mock.calls as unknown[][]).map(getSentNoticeBodyFromCall);

2626

}

272728+

function expectBodiesContain(bodies: string[], text: string) {

29+

expect(bodies.some((body) => body.includes(text))).toBe(true);

30+

}

31+32+

function expectBodiesExclude(bodies: string[], text: string) {

33+

expect(bodies.some((body) => body.includes(text))).toBe(false);

34+

}

35+36+

function requireRecord(value: unknown, label: string): Record<string, unknown> {

37+

expect(typeof value).toBe("object");

38+

expect(value).not.toBeNull();

39+

if (typeof value !== "object" || value === null) {

40+

throw new Error(`${label} was not an object`);

41+

}

42+

return value as Record<string, unknown>;

43+

}

44+45+

function expectRecordFields(record: Record<string, unknown>, fields: Record<string, unknown>) {

46+

for (const [key, value] of Object.entries(fields)) {

47+

expect(record[key]).toEqual(value);

48+

}

49+

}

50+51+

function expectWarnContextFields(

52+

logger: { warn: ReturnType<typeof vi.fn> },

53+

callIndex: number,

54+

message: string,

55+

fields: Record<string, unknown>,

56+

) {

57+

const call = logger.warn.mock.calls[callIndex - 1] as unknown[];

58+

expect(call?.[0]).toBe(message);

59+

expectRecordFields(requireRecord(call?.[1], "logger warning context"), fields);

60+

}

61+2862

function createHarness(params?: {

2963

cfg?: CoreConfig;

3064

accountId?: string;

@@ -275,10 +309,12 @@ describe("registerMatrixMonitorEvents verification routing", () => {

275309

});

276310277311

await flushTasks();

278-

expect(onRoomMessage).toHaveBeenCalledWith(

279-

"!room:example.org",

280-

expect.objectContaining({ event_id: "$reaction1", type: EventType.Reaction }),

281-

);

312+

const roomMessageCalls = onRoomMessage.mock.calls as unknown[][];

313+

expect(roomMessageCalls[0]?.[0]).toBe("!room:example.org");

314+

expectRecordFields(requireRecord(roomMessageCalls[0]?.[1], "reaction event"), {

315+

event_id: "$reaction1",

316+

type: EventType.Reaction,

317+

});

282318

expect(sendMessage).not.toHaveBeenCalled();

283319

});

284320

@@ -593,10 +629,8 @@ describe("registerMatrixMonitorEvents verification routing", () => {

593629594630

await flushTasks();

595631

const bodies = getSentNoticeBodies(sendMessage);

596-

expect(bodies).toEqual(expect.arrayContaining([expect.stringContaining("SAS emoji:")]));

597-

expect(bodies).toEqual(

598-

expect.arrayContaining([expect.stringContaining("SAS decimal: 6158 1986 3513")]),

599-

);

632+

expectBodiesContain(bodies, "SAS emoji:");

633+

expectBodiesContain(bodies, "SAS decimal: 6158 1986 3513");

600634

});

601635602636

it("rehydrates an in-progress DM verification before resolving SAS notices", async () => {

@@ -963,7 +997,7 @@ describe("registerMatrixMonitorEvents verification routing", () => {

963997964998

await vi.waitFor(() => {

965999

const bodies = getSentNoticeBodies(sendMessage);

966-

expect(bodies).toEqual(expect.arrayContaining([expect.stringContaining("SAS emoji:")]));

1000+

expectBodiesContain(bodies, "SAS emoji:");

9671001

});

9681002

} finally {

9691003

vi.useRealTimers();

@@ -1217,13 +1251,9 @@ describe("registerMatrixMonitorEvents verification routing", () => {

12171251

});

1218125212191253

await flushTasks();

1220-

expect(getSentNoticeBodies(sendMessage)).toEqual(

1221-

expect.arrayContaining([expect.stringContaining("SAS decimal: 6158 1986 3513")]),

1222-

);

12231254

const bodies = getSentNoticeBodies(sendMessage);

1224-

expect(bodies).not.toEqual(

1225-

expect.arrayContaining([expect.stringContaining("SAS decimal: 1111 2222 3333")]),

1226-

);

1255+

expectBodiesContain(bodies, "SAS decimal: 6158 1986 3513");

1256+

expectBodiesExclude(bodies, "SAS decimal: 1111 2222 3333");

12271257

});

1228125812291259

it("preserves strict-room SAS fallback when active DM inspection cannot resolve a room", async () => {

@@ -1325,13 +1355,9 @@ describe("registerMatrixMonitorEvents verification routing", () => {

13251355

});

1326135613271357

await flushTasks();

1328-

expect(getSentNoticeBodies(sendMessage)).toEqual(

1329-

expect.arrayContaining([expect.stringContaining("SAS decimal: 6158 1986 3513")]),

1330-

);

13311358

const bodies = getSentNoticeBodies(sendMessage);

1332-

expect(bodies).not.toEqual(

1333-

expect.arrayContaining([expect.stringContaining("SAS decimal: 1111 2222 3333")]),

1334-

);

1359+

expectBodiesContain(bodies, "SAS decimal: 6158 1986 3513");

1360+

expectBodiesExclude(bodies, "SAS decimal: 1111 2222 3333");

13351361

});

1336136213371363

it("does not emit SAS notices for cancelled verification events", async () => {

@@ -1485,16 +1511,12 @@ describe("registerMatrixMonitorEvents verification routing", () => {

14851511

new Error("The sender's device has not sent us the keys for this message."),

14861512

);

148715131488-

expect(logger.warn).toHaveBeenNthCalledWith(

1489-

1,

1490-

"Failed to decrypt message",

1491-

expect.objectContaining({

1492-

roomId: "!room:example.org",

1493-

eventId: "$enc-self",

1494-

sender: "@gumadeiras:matrix.example.org",

1495-

senderMatchesOwnUser: true,

1496-

}),

1497-

);

1514+

expectWarnContextFields(logger, 1, "Failed to decrypt message", {

1515+

roomId: "!room:example.org",

1516+

eventId: "$enc-self",

1517+

sender: "@gumadeiras:matrix.example.org",

1518+

senderMatchesOwnUser: true,

1519+

});

14981520

expect(logger.warn).toHaveBeenNthCalledWith(

14991521

2,

15001522

"matrix: failed to decrypt a message from this same Matrix user. This usually means another Matrix device did not share the room key, or another OpenClaw runtime is using the same account. Check 'openclaw matrix verify status --verbose --account ops' and 'openclaw matrix devices list --account ops'.",

@@ -1528,15 +1550,12 @@ describe("registerMatrixMonitorEvents verification routing", () => {

15281550

);

1529155115301552

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

1531-

expect(logger.warn).toHaveBeenCalledWith(

1532-

"Failed to decrypt message",

1533-

expect.objectContaining({

1534-

roomId: "!room:example.org",

1535-

eventId: "$enc-other",

1536-

sender: "@alice:matrix.example.org",

1537-

senderMatchesOwnUser: false,

1538-

}),

1539-

);

1553+

expectWarnContextFields(logger, 1, "Failed to decrypt message", {

1554+

roomId: "!room:example.org",

1555+

eventId: "$enc-other",

1556+

sender: "@alice:matrix.example.org",

1557+

senderMatchesOwnUser: false,

1558+

});

15401559

});

1541156015421561

it("classifies repeated fresh post-healthy-sync decrypt failures separately", async () => {

@@ -1570,43 +1589,32 @@ describe("registerMatrixMonitorEvents verification routing", () => {

15701589

);

15711590

}

157215911573-

expect(logger.warn).toHaveBeenNthCalledWith(

1574-

1,

1575-

"Failed to decrypt fresh post-healthy-sync message",

1576-

expect.objectContaining({

1577-

eventId: "$enc-fresh-1",

1578-

freshAfterHealthySync: true,

1579-

postHealthySyncFailureCount: 1,

1580-

}),

1581-

);

1582-

expect(logger.warn).toHaveBeenNthCalledWith(

1583-

2,

1584-

"Failed to decrypt fresh post-healthy-sync message",

1585-

expect.objectContaining({

1586-

eventId: "$enc-fresh-2",

1587-

freshAfterHealthySync: true,

1588-

postHealthySyncFailureCount: 2,

1589-

}),

1590-

);

1591-

expect(logger.warn).toHaveBeenNthCalledWith(

1592-

3,

1593-

"Failed to decrypt fresh post-healthy-sync message",

1594-

expect.objectContaining({

1595-

eventId: "$enc-fresh-3",

1596-

freshAfterHealthySync: true,

1597-

postHealthySyncFailureCount: 3,

1598-

}),

1599-

);

1600-

expect(logger.warn).toHaveBeenNthCalledWith(

1592+

expectWarnContextFields(logger, 1, "Failed to decrypt fresh post-healthy-sync message", {

1593+

eventId: "$enc-fresh-1",

1594+

freshAfterHealthySync: true,

1595+

postHealthySyncFailureCount: 1,

1596+

});

1597+

expectWarnContextFields(logger, 2, "Failed to decrypt fresh post-healthy-sync message", {

1598+

eventId: "$enc-fresh-2",

1599+

freshAfterHealthySync: true,

1600+

postHealthySyncFailureCount: 2,

1601+

});

1602+

expectWarnContextFields(logger, 3, "Failed to decrypt fresh post-healthy-sync message", {

1603+

eventId: "$enc-fresh-3",

1604+

freshAfterHealthySync: true,

1605+

postHealthySyncFailureCount: 3,

1606+

});

1607+

expectWarnContextFields(

1608+

logger,

16011609

4,

16021610

"matrix: repeated fresh encrypted messages are still failing to decrypt after Matrix resumed healthy sync. This device may still be missing new room keys. Check 'openclaw matrix verify status --verbose --account ops' and 'openclaw matrix devices list --account ops'.",

1603-

expect.objectContaining({

1611+

{

16041612

failureCount: 3,

16051613

roomCount: 3,

16061614

senderCount: 3,

16071615

rooms: ["!room-a:example.org", "!room-b:example.org", "!room-c:example.org"],

16081616

sampleEventIds: ["$enc-fresh-1", "$enc-fresh-2", "$enc-fresh-3"],

1609-

}),

1617+

},

16101618

);

16111619

} finally {

16121620

vi.useRealTimers();

@@ -1639,13 +1647,10 @@ describe("registerMatrixMonitorEvents verification routing", () => {

16391647

);

1640164816411649

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

1642-

expect(logger.warn).toHaveBeenCalledWith(

1643-

"Failed to decrypt message",

1644-

expect.objectContaining({

1645-

eventId: "$enc-old",

1646-

freshAfterHealthySync: false,

1647-

}),

1648-

);

1650+

expectWarnContextFields(logger, 1, "Failed to decrypt message", {

1651+

eventId: "$enc-old",

1652+

freshAfterHealthySync: false,

1653+

});

1649165416501655

healthySyncSinceMs = Date.now();

16511656

@@ -1661,15 +1666,11 @@ describe("registerMatrixMonitorEvents verification routing", () => {

16611666

new Error("The sender's device has not sent us the keys for this message."),

16621667

);

166316681664-

expect(logger.warn).toHaveBeenNthCalledWith(

1665-

2,

1666-

"Failed to decrypt fresh post-healthy-sync message",

1667-

expect.objectContaining({

1668-

eventId: "$enc-fresh-after-ready",

1669-

freshAfterHealthySync: true,

1670-

postHealthySyncFailureCount: 1,

1671-

}),

1672-

);

1669+

expectWarnContextFields(logger, 2, "Failed to decrypt fresh post-healthy-sync message", {

1670+

eventId: "$enc-fresh-after-ready",

1671+

freshAfterHealthySync: true,

1672+

postHealthySyncFailureCount: 1,

1673+

});

16731674

} finally {

16741675

vi.useRealTimers();

16751676

}

@@ -1708,19 +1709,21 @@ describe("registerMatrixMonitorEvents verification routing", () => {

17081709

}

17091710

}

171017111711-

expect(logger.warn).toHaveBeenNthCalledWith(

1712+

expectWarnContextFields(

1713+

logger,

17121714

4,

17131715

"matrix: repeated fresh encrypted messages are still failing to decrypt after Matrix resumed healthy sync. This device may still be missing new room keys. Check 'openclaw matrix verify status --verbose --account ops' and 'openclaw matrix devices list --account ops'.",

1714-

expect.objectContaining({

1716+

{

17151717

sampleEventIds: ["$enc-wave-1-1", "$enc-wave-1-2", "$enc-wave-1-3"],

1716-

}),

1718+

},

17171719

);

1718-

expect(logger.warn).toHaveBeenNthCalledWith(

1720+

expectWarnContextFields(

1721+

logger,

17191722

8,

17201723

"matrix: repeated fresh encrypted messages are still failing to decrypt after Matrix resumed healthy sync. This device may still be missing new room keys. Check 'openclaw matrix verify status --verbose --account ops' and 'openclaw matrix devices list --account ops'.",

1721-

expect.objectContaining({

1724+

{

17221725

sampleEventIds: ["$enc-wave-2-1", "$enc-wave-2-2", "$enc-wave-2-3"],

1723-

}),

1726+

},

17241727

);

17251728

} finally {

17261729

vi.useRealTimers();

@@ -1770,39 +1773,28 @@ describe("registerMatrixMonitorEvents verification routing", () => {

17701773

);

17711774

}

177217751773-

expect(logger.warn).toHaveBeenNthCalledWith(

1774-

5,

1775-

"Failed to decrypt fresh post-healthy-sync message",

1776-

expect.objectContaining({

1777-

eventId: "$enc-second-1",

1778-

freshAfterHealthySync: true,

1779-

postHealthySyncFailureCount: 1,

1780-

}),

1781-

);

1782-

expect(logger.warn).toHaveBeenNthCalledWith(

1783-

6,

1784-

"Failed to decrypt fresh post-healthy-sync message",

1785-

expect.objectContaining({

1786-

eventId: "$enc-second-2",

1787-

freshAfterHealthySync: true,

1788-

postHealthySyncFailureCount: 2,

1789-

}),

1790-

);

1791-

expect(logger.warn).toHaveBeenNthCalledWith(

1792-

7,

1793-

"Failed to decrypt fresh post-healthy-sync message",

1794-

expect.objectContaining({

1795-

eventId: "$enc-second-3",

1796-

freshAfterHealthySync: true,

1797-

postHealthySyncFailureCount: 3,

1798-

}),

1799-

);

1800-

expect(logger.warn).toHaveBeenNthCalledWith(

1776+

expectWarnContextFields(logger, 5, "Failed to decrypt fresh post-healthy-sync message", {

1777+

eventId: "$enc-second-1",

1778+

freshAfterHealthySync: true,

1779+

postHealthySyncFailureCount: 1,

1780+

});

1781+

expectWarnContextFields(logger, 6, "Failed to decrypt fresh post-healthy-sync message", {

1782+

eventId: "$enc-second-2",

1783+

freshAfterHealthySync: true,

1784+

postHealthySyncFailureCount: 2,

1785+

});

1786+

expectWarnContextFields(logger, 7, "Failed to decrypt fresh post-healthy-sync message", {

1787+

eventId: "$enc-second-3",

1788+

freshAfterHealthySync: true,

1789+

postHealthySyncFailureCount: 3,

1790+

});

1791+

expectWarnContextFields(

1792+

logger,

18011793

8,

18021794

"matrix: repeated fresh encrypted messages are still failing to decrypt after Matrix resumed healthy sync. This device may still be missing new room keys. Check 'openclaw matrix verify status --verbose --account ops' and 'openclaw matrix devices list --account ops'.",

1803-

expect.objectContaining({

1795+

{

18041796

sampleEventIds: ["$enc-second-1", "$enc-second-2", "$enc-second-3"],

1805-

}),

1797+

},

18061798

);

18071799

} finally {

18081800

vi.useRealTimers();

@@ -1833,14 +1825,11 @@ describe("registerMatrixMonitorEvents verification routing", () => {

18331825

).resolves.toBeUndefined();

1834182618351827

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

1836-

expect(logger.warn).toHaveBeenCalledWith(

1837-

"Failed to decrypt message",

1838-

expect.objectContaining({

1839-

roomId: "!room:example.org",

1840-

eventId: "$enc-lookup-fail",

1841-

senderMatchesOwnUser: false,

1842-

}),

1843-

);

1828+

expectWarnContextFields(logger, 1, "Failed to decrypt message", {

1829+

roomId: "!room:example.org",

1830+

eventId: "$enc-lookup-fail",

1831+

senderMatchesOwnUser: false,

1832+

});

18441833

expect(logVerboseMessage).toHaveBeenCalledWith(

18451834

"matrix: failed resolving self user id for decrypt warning: Error: lookup failed",

18461835

);