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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
月光博客
月光博客
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
Vercel News
Vercel News
量子位
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
腾讯CDC
有赞技术团队
有赞技术团队

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 queue persistence assertions · ope...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -2268,10 +2268,15 @@ describe("deliverOutboundPayloads", () => {

22682268

session: { agentId: "agent-main" },

22692269

});

227022702271-

expect(logMocks.warn).toHaveBeenCalledWith(

2271+

expect(logMocks.warn.mock.calls[0]?.[0]).toBe(

22722272

"deliverOutboundPayloads: session.agentId present without session key; internal message:sent hook will be skipped",

2273-

expect.objectContaining({ channel: "matrix", to: "!room:example", agentId: "agent-main" }),

22742273

);

2274+

const warnContext = logMocks.warn.mock.calls[0]?.[1] as

2275+

| { agentId?: unknown; channel?: unknown; to?: unknown }

2276+

| undefined;

2277+

expect(warnContext?.channel).toBe("matrix");

2278+

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

2279+

expect(warnContext?.agentId).toBe("agent-main");

22752280

});

2276228122772282

it("calls failDelivery instead of ackDelivery on bestEffort partial failure", async () => {

@@ -2316,29 +2321,40 @@ describe("deliverOutboundPayloads", () => {

23162321

});

2317232223182323

expect(queueMocks.enqueueDelivery).toHaveBeenCalledTimes(1);

2319-

expect(queueMocks.enqueueDelivery).toHaveBeenCalledWith(

2320-

expect.objectContaining({

2321-

payloads: [

2322-

{ text: "NO_REPLY" },

2323-

{ text: '{"action":"NO_REPLY"}' },

2324-

{ text: "caption\nMEDIA:https://x.test/a.png" },

2325-

{ text: "NO_REPLY", mediaUrl: " https://x.test/b.png " },

2326-

],

2327-

renderedBatchPlan: expect.objectContaining({

2328-

payloadCount: 4,

2329-

textCount: 4,

2330-

mediaCount: 1,

2331-

items: expect.arrayContaining([

2332-

expect.objectContaining({

2333-

index: 3,

2334-

kinds: ["text", "media"],

2335-

text: "NO_REPLY",

2336-

mediaUrls: ["https://x.test/b.png"],

2337-

}),

2338-

]),

2339-

}),

2340-

}),

2341-

);

2324+

const queuedDelivery = (

2325+

queueMocks.enqueueDelivery.mock.calls as unknown as Array<

2326+

[

2327+

{

2328+

payloads?: unknown;

2329+

renderedBatchPlan?: {

2330+

items?: Array<{

2331+

index?: unknown;

2332+

kinds?: unknown;

2333+

mediaUrls?: unknown;

2334+

text?: unknown;

2335+

}>;

2336+

mediaCount?: unknown;

2337+

payloadCount?: unknown;

2338+

textCount?: unknown;

2339+

};

2340+

},

2341+

]

2342+

>

2343+

)[0]?.[0];

2344+

expect(queuedDelivery?.payloads).toStrictEqual([

2345+

{ text: "NO_REPLY" },

2346+

{ text: '{"action":"NO_REPLY"}' },

2347+

{ text: "caption\nMEDIA:https://x.test/a.png" },

2348+

{ text: "NO_REPLY", mediaUrl: " https://x.test/b.png " },

2349+

]);

2350+

const renderedPlan = queuedDelivery?.renderedBatchPlan;

2351+

expect(renderedPlan?.payloadCount).toBe(4);

2352+

expect(renderedPlan?.textCount).toBe(4);

2353+

expect(renderedPlan?.mediaCount).toBe(1);

2354+

const noReplyMediaItem = renderedPlan?.items?.find((item) => item.index === 3);

2355+

expect(noReplyMediaItem?.kinds).toStrictEqual(["text", "media"]);

2356+

expect(noReplyMediaItem?.text).toBe("NO_REPLY");

2357+

expect(noReplyMediaItem?.mediaUrls).toStrictEqual(["https://x.test/b.png"]);

23422358

});

2343235923442360

it("strips internal runtime scaffolding before queue persistence", async () => {

@@ -2374,27 +2390,31 @@ describe("deliverOutboundPayloads", () => {

23742390

deps: { matrix: sendMatrix },

23752391

});

237623922377-

expect(queueMocks.enqueueDelivery).toHaveBeenCalledWith(

2378-

expect.objectContaining({

2379-

payloads: [

2393+

const queuedDelivery = (

2394+

queueMocks.enqueueDelivery.mock.calls as unknown as Array<

2395+

[

23802396

{

2381-

text: "visible\nafter",

2382-

channelData: {

2383-

internal: "",

2384-

},

2397+

payloads?: unknown;

2398+

renderedBatchPlan?: {

2399+

items?: Array<{ text?: unknown }>;

2400+

payloadCount?: unknown;

2401+

textCount?: unknown;

2402+

};

23852403

},

2386-

],

2387-

renderedBatchPlan: expect.objectContaining({

2388-

payloadCount: 1,

2389-

textCount: 1,

2390-

items: [

2391-

expect.objectContaining({

2392-

text: "visible\nafter",

2393-

}),

2394-

],

2395-

}),

2396-

}),

2397-

);

2404+

]

2405+

>

2406+

)[0]?.[0];

2407+

expect(queuedDelivery?.payloads).toStrictEqual([

2408+

{

2409+

text: "visible\nafter",

2410+

channelData: {

2411+

internal: "",

2412+

},

2413+

},

2414+

]);

2415+

expect(queuedDelivery?.renderedBatchPlan?.payloadCount).toBe(1);

2416+

expect(queuedDelivery?.renderedBatchPlan?.textCount).toBe(1);

2417+

expect(queuedDelivery?.renderedBatchPlan?.items?.[0]?.text).toBe("visible\nafter");

23982418

});

2399241924002420

it("persists rendered batch plans with queued deliveries", async () => {

@@ -2422,11 +2442,10 @@ describe("deliverOutboundPayloads", () => {

24222442

renderedBatchPlan,

24232443

});

242424442425-

expect(queueMocks.enqueueDelivery).toHaveBeenCalledWith(

2426-

expect.objectContaining({

2427-

renderedBatchPlan,

2428-

}),

2429-

);

2445+

const queuedDelivery = (

2446+

queueMocks.enqueueDelivery.mock.calls as unknown as Array<[{ renderedBatchPlan?: unknown }]>

2447+

)[0]?.[0];

2448+

expect(queuedDelivery?.renderedBatchPlan).toBe(renderedBatchPlan);

24302449

});

2431245024322451

it("applies silent-reply rewrite policy from the outbound session", async () => {