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

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
量子位
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
博客园 - 聂微东
美团技术团队
Last Week in AI
Last Week in AI
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
V
Visual Studio Blog
大猫的无限游戏
大猫的无限游戏
The Cloudflare 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: tighten outbound adapter assertions · openclaw/open...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -551,19 +551,14 @@ describe("deliverOutboundPayloads", () => {

551551

payloads: [{ text: "hello" }],

552552

});

553553554-

expect(messageSendText).toHaveBeenCalledWith(

555-

expect.objectContaining({

556-

to: "!room:example",

557-

text: "hello",

558-

}),

559-

);

554+

const [[sendTextParams]] = messageSendText.mock.calls as unknown as Array<

555+

[Record<string, unknown>]

556+

>;

557+

expect(sendTextParams?.to).toBe("!room:example");

558+

expect(sendTextParams?.text).toBe("hello");

560559

expect(outboundSendText).not.toHaveBeenCalled();

561-

expect(results).toMatchObject([

562-

{

563-

channel: "matrix",

564-

messageId: "message-adapter-1",

565-

},

566-

]);

560+

expect(results[0]?.channel).toBe("matrix");

561+

expect(results[0]?.messageId).toBe("message-adapter-1");

567562

expect(results[0]?.receipt?.platformMessageIds).toEqual(["message-adapter-1"]);

568563

});

569564

@@ -652,28 +647,26 @@ describe("deliverOutboundPayloads", () => {

652647

"ack",

653648

"commit:pending-1:message-adapter-1",

654649

]);

655-

expect(beforeSendAttempt).toHaveBeenCalledWith(

656-

expect.objectContaining({

657-

kind: "text",

658-

to: "!room:example",

659-

text: "hello",

660-

}),

661-

);

662-

expect(afterSendSuccess).toHaveBeenCalledWith(

663-

expect.objectContaining({

664-

kind: "text",

665-

attemptToken: "pending-1",

666-

result: expect.objectContaining({ messageId: "message-adapter-1" }),

667-

}),

668-

);

669-

expect(afterCommit).toHaveBeenCalledWith(

670-

expect.objectContaining({

671-

kind: "text",

672-

attemptToken: "pending-1",

673-

result: expect.objectContaining({ messageId: "message-adapter-1" }),

674-

}),

675-

);

676-

expect(results).toMatchObject([{ channel: "matrix", messageId: "message-adapter-1" }]);

650+

const [[beforeParams]] = beforeSendAttempt.mock.calls as unknown as Array<

651+

[Record<string, unknown>]

652+

>;

653+

expect(beforeParams?.kind).toBe("text");

654+

expect(beforeParams?.to).toBe("!room:example");

655+

expect(beforeParams?.text).toBe("hello");

656+

const [[successParams]] = afterSendSuccess.mock.calls as unknown as Array<

657+

[Record<string, unknown> & { result?: { messageId?: string } }]

658+

>;

659+

expect(successParams?.kind).toBe("text");

660+

expect(successParams?.attemptToken).toBe("pending-1");

661+

expect(successParams?.result?.messageId).toBe("message-adapter-1");

662+

const [[commitParams]] = afterCommit.mock.calls as unknown as Array<

663+

[Record<string, unknown> & { result?: { messageId?: string } }]

664+

>;

665+

expect(commitParams?.kind).toBe("text");

666+

expect(commitParams?.attemptToken).toBe("pending-1");

667+

expect(commitParams?.result?.messageId).toBe("message-adapter-1");

668+

expect(results[0]?.channel).toBe("matrix");

669+

expect(results[0]?.messageId).toBe("message-adapter-1");

677670

});

678671679672

it("does not mark queued delivery as unknown when hooks cancel before platform send", async () => {

@@ -745,13 +738,12 @@ describe("deliverOutboundPayloads", () => {

745738

}),

746739

).rejects.toThrow("native send failed");

747740748-

expect(afterSendFailure).toHaveBeenCalledWith(

749-

expect.objectContaining({

750-

kind: "text",

751-

attemptToken: "pending-2",

752-

error: expect.any(Error),

753-

}),

754-

);

741+

const [[failureParams]] = afterSendFailure.mock.calls as unknown as Array<

742+

[Record<string, unknown>]

743+

>;

744+

expect(failureParams?.kind).toBe("text");

745+

expect(failureParams?.attemptToken).toBe("pending-2");

746+

expect(failureParams?.error).toBeInstanceOf(Error);

755747

expect(queueMocks.failDelivery).toHaveBeenCalledWith(

756748

"mock-queue-id",

757749

expect.stringContaining("native send failed"),

@@ -803,13 +795,12 @@ describe("deliverOutboundPayloads", () => {

803795

}),

804796

).rejects.toThrow("native send failed");

805797806-

expect(afterSendFailure).toHaveBeenCalledWith(

807-

expect.objectContaining({

808-

kind: "text",

809-

attemptToken: "pending-2",

810-

error: expect.any(Error),

811-

}),

812-

);

798+

const [[failureParams]] = afterSendFailure.mock.calls as unknown as Array<

799+

[Record<string, unknown>]

800+

>;

801+

expect(failureParams?.kind).toBe("text");

802+

expect(failureParams?.attemptToken).toBe("pending-2");

803+

expect(failureParams?.error).toBeInstanceOf(Error);

813804

expect(queueMocks.failDelivery).toHaveBeenCalledWith(

814805

"mock-queue-id",

815806

expect.stringContaining("native send failed"),

@@ -865,14 +856,14 @@ describe("deliverOutboundPayloads", () => {

865856

queuePolicy: "required",

866857

});

867858868-

expect(results).toMatchObject([{ channel: "matrix", messageId: "message-adapter-1" }]);

859+

expect(results[0]?.channel).toBe("matrix");

860+

expect(results[0]?.messageId).toBe("message-adapter-1");

869861

expect(afterSendFailure).not.toHaveBeenCalled();

870-

expect(afterCommit).toHaveBeenCalledWith(

871-

expect.objectContaining({

872-

kind: "text",

873-

result: expect.objectContaining({ messageId: "message-adapter-1" }),

874-

}),

875-

);

862+

const [[commitParams]] = afterCommit.mock.calls as unknown as Array<

863+

[Record<string, unknown> & { result?: { messageId?: string } }]

864+

>;

865+

expect(commitParams?.kind).toBe("text");

866+

expect(commitParams?.result?.messageId).toBe("message-adapter-1");

876867

expect(queueMocks.ackDelivery).toHaveBeenCalledWith("mock-queue-id");

877868

expect(queueMocks.failDelivery).not.toHaveBeenCalled();

878869

});

@@ -899,16 +890,15 @@ describe("deliverOutboundPayloads", () => {

899890

queueMocks.enqueueDelivery.mockRejectedValueOnce(new Error("queue offline"));

900891

const sendMatrix = vi.fn().mockResolvedValue({ messageId: "m1" });

901892902-

await expect(

903-

deliverOutboundPayloads({

904-

cfg: {},

905-

channel: "matrix",

906-

to: "!room:example",

907-

payloads: [{ text: "hi" }],

908-

deps: { matrix: sendMatrix },

909-

queuePolicy: "best_effort",

910-

}),

911-

).resolves.toEqual([expect.objectContaining({ messageId: "m1" })]);

893+

const results = await deliverOutboundPayloads({

894+

cfg: {},

895+

channel: "matrix",

896+

to: "!room:example",

897+

payloads: [{ text: "hi" }],

898+

deps: { matrix: sendMatrix },

899+

queuePolicy: "best_effort",

900+

});

901+

expect(results[0]?.messageId).toBe("m1");

912902913903

expect(sendMatrix).toHaveBeenCalled();

914904

});