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

推荐订阅源

P
Proofpoint News Feed
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
量子位
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
IT之家
IT之家
V
Visual Studio Blog
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
宝玉的分享
宝玉的分享
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
D
Docker
V
V2EX

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(announce-delivery): cross-channel lastTo must not le...
2026-06-23 · via Recent Commits to openclaw:main

@@ -4932,4 +4932,101 @@ describe("deliverSubagentAnnouncement requester session backfill (issue #86034)"

49324932

await fs.rm(storePath, { force: true });

49334933

}

49344934

});

4935+4936+

// Cross-channel safety regression: a stale lastChannel that differs from

4937+

// the completion origin's channel must not leak its lastTo into the

4938+

// telegram delivery. mergeDeliveryContext.channelsConflict (delivery-context.shared.ts:233-260)

4939+

// is the structural guard; this test locks it.

4940+

it("does not import a cross-channel lastTo when the completion origin's channel differs from lastChannel (cross-channel guard regression)", async () => {

4941+

const agentId = `xchan-${Date.now()}-${Math.random().toString(16).slice(2)}`;

4942+

const sessionKey = `agent:${agentId}:telegram:5866004662`;

4943+

const storeTemplate = path.join(

4944+

os.tmpdir(),

4945+

`openclaw-86034-xchan-session-${agentId}-{agentId}.json`,

4946+

);

4947+

const storePath = storeTemplate.replaceAll("{agentId}", agentId);

4948+

await fs.writeFile(

4949+

storePath,

4950+

JSON.stringify(

4951+

{

4952+

[sessionKey]: {

4953+

sessionId: "telegram-session-xchan",

4954+

updatedAt: Date.now(),

4955+

channel: "telegram",

4956+

lastChannel: "signal",

4957+

lastTo: "signal-stale-target",

4958+

lastAccountId: "signal-bot-1",

4959+

},

4960+

},

4961+

null,

4962+

2,

4963+

),

4964+

"utf-8",

4965+

);

4966+4967+

try {

4968+

const dispatchGatewayMethodInProcess = createInProcessGatewayMock({

4969+

result: { payloads: [{ text: "requester voice completion" }] },

4970+

});

4971+

testing.setDepsForTest({

4972+

dispatchGatewayMethodInProcess,

4973+

getRequesterSessionActivity: () => ({

4974+

sessionId: "telegram-session-xchan",

4975+

isActive: false,

4976+

}),

4977+

getRuntimeConfig: () => ({ session: { store: storeTemplate } }) as never,

4978+

});

4979+4980+

const result = await deliverSubagentAnnouncement({

4981+

requesterSessionKey: sessionKey,

4982+

targetRequesterSessionKey: sessionKey,

4983+

triggerMessage: "image done",

4984+

steerMessage: "image done",

4985+

requesterOrigin: { channel: "telegram", accountId: "telegram-bot-1" },

4986+

requesterSessionOrigin: { channel: "telegram", accountId: "telegram-bot-1" },

4987+

completionDirectOrigin: { channel: "telegram", accountId: "telegram-bot-1" },

4988+

directOrigin: { channel: "telegram", accountId: "telegram-bot-1" },

4989+

requesterIsSubagent: false,

4990+

expectsCompletionMessage: true,

4991+

bestEffortDeliver: true,

4992+

directIdempotencyKey: "announce-86034-cross-channel",

4993+

sourceTool: "image_generate",

4994+

});

4995+4996+

// Structural assertion: the stale signal `to` must not have leaked into

4997+

// any in-process gateway dispatch, regardless of whether the call ended

4998+

// up routed (path: "direct") or short-circuited (delivered: false /

4999+

// path: "none"). The guard is "no cross-channel `to` ever reaches the

5000+

// gateway", not a specific terminal path.

5001+

expect(dispatchGatewayMethodInProcess).not.toHaveBeenCalledWith(

5002+

"agent",

5003+

expect.objectContaining({ to: "signal-stale-target" }),

5004+

expect.anything(),

5005+

);

5006+

expect(dispatchGatewayMethodInProcess).not.toHaveBeenCalledWith(

5007+

"agent",

5008+

expect.objectContaining({ channel: "signal" }),

5009+

expect.anything(),

5010+

);

5011+

for (const call of asMock(dispatchGatewayMethodInProcess).mock.calls) {

5012+

const params = call[1] as Record<string, unknown> | undefined;

5013+

if (!params) continue;

5014+

expect(params.to).not.toBe("signal-stale-target");

5015+

expect(params.channel).not.toBe("signal");

5016+

}

5017+5018+

// Result-shape assertion: if the dispatcher was invoked at all on the

5019+

// direct path, it must not have been with the stale signal target.

5020+

if (

5021+

(result as { path?: string }).path === "direct" &&

5022+

(result as { delivered?: boolean }).delivered === true

5023+

) {

5024+

const params = mockCallArg(dispatchGatewayMethodInProcess, 0, 1) as Record<string, unknown>;

5025+

expect(params.to).not.toBe("signal-stale-target");

5026+

expect(params.channel).not.toBe("signal");

5027+

}

5028+

} finally {

5029+

await fs.rm(storePath, { force: true });

5030+

}

5031+

});

49355032

});