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

推荐订阅源

S
SegmentFault 最新的问题
B
Blog
P
Proofpoint News Feed
美团技术团队
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
有赞技术团队
有赞技术团队
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
罗磊的独立博客
L
LangChain Blog
GbyAI
GbyAI
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security 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
fix(agents): fallback when generated media handoff locks ...
fuller-stack · 2026-05-29 · via Recent Commits to openclaw:main

@@ -2890,6 +2890,109 @@ describe("deliverSubagentAnnouncement completion delivery", () => {

28902890

);

28912891

});

289228922893+

it("directly delivers generated media after active wake failure when requester handoff locks", async () => {

2894+

const callGateway = vi.fn(async () => {

2895+

throw new Error(

2896+

"SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=43",

2897+

);

2898+

}) as unknown as typeof runtimeCallGateway;

2899+

const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeSequenceMock([

2900+

"transcript_commit_wait_unsupported",

2901+

"no_active_run",

2902+

]);

2903+

const sendMessage = createSendMessageMock();

2904+

const result = await deliverSlackChannelAnnouncement({

2905+

callGateway,

2906+

sendMessage,

2907+

queueEmbeddedAgentMessageWithOutcome,

2908+

sessionId: "requester-session-channel",

2909+

isActive: true,

2910+

expectsCompletionMessage: true,

2911+

directIdempotencyKey: "announce-channel-media-handoff-locked",

2912+

sourceTool: "image_generate",

2913+

internalEvents: [

2914+

{

2915+

type: "task_completion",

2916+

source: "image_generation",

2917+

childSessionKey: "image_generate:task-locked",

2918+

childSessionId: "task-locked",

2919+

announceType: "image generation task",

2920+

taskLabel: "locked handoff image",

2921+

status: "ok",

2922+

statusLabel: "completed successfully",

2923+

result: "Generated 1 image.\nMEDIA:/tmp/generated-locked.png",

2924+

mediaUrls: ["/tmp/generated-locked.png"],

2925+

replyInstruction:

2926+

"Tell the user the image is ready and send it through the message tool.",

2927+

},

2928+

],

2929+

});

2930+2931+

expectRecordFields(result, {

2932+

delivered: true,

2933+

path: "direct",

2934+

});

2935+

expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalledTimes(2);

2936+

expect(callGateway).toHaveBeenCalledTimes(1);

2937+

expect(sendMessage).toHaveBeenCalledWith(

2938+

expect.objectContaining({

2939+

channel: "slack",

2940+

accountId: "acct-1",

2941+

to: "channel:C123",

2942+

content: "The generated image is ready.",

2943+

mediaUrls: ["/tmp/generated-locked.png"],

2944+

idempotencyKey: "announce-channel-media-handoff-locked:generated-media-direct",

2945+

}),

2946+

);

2947+

});

2948+2949+

it("keeps generic requester handoff errors visible after active wake failure", async () => {

2950+

const callGateway = vi.fn(async () => {

2951+

throw new Error("requester handoff exploded after dispatch");

2952+

}) as unknown as typeof runtimeCallGateway;

2953+

const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeSequenceMock([

2954+

"transcript_commit_wait_unsupported",

2955+

"no_active_run",

2956+

]);

2957+

const sendMessage = createSendMessageMock();

2958+2959+

const result = await deliverSlackChannelAnnouncement({

2960+

callGateway,

2961+

sendMessage,

2962+

queueEmbeddedAgentMessageWithOutcome,

2963+

sessionId: "requester-session-channel",

2964+

isActive: true,

2965+

expectsCompletionMessage: true,

2966+

directIdempotencyKey: "announce-channel-media-handoff-error",

2967+

sourceTool: "image_generate",

2968+

internalEvents: [

2969+

{

2970+

type: "task_completion",

2971+

source: "image_generation",

2972+

childSessionKey: "image_generate:task-error",

2973+

childSessionId: "task-error",

2974+

announceType: "image generation task",

2975+

taskLabel: "errored handoff image",

2976+

status: "ok",

2977+

statusLabel: "completed successfully",

2978+

result: "Generated 1 image.\nMEDIA:/tmp/generated-error.png",

2979+

mediaUrls: ["/tmp/generated-error.png"],

2980+

replyInstruction:

2981+

"Tell the user the image is ready and send it through the message tool.",

2982+

},

2983+

],

2984+

});

2985+2986+

expectRecordFields(result, {

2987+

delivered: false,

2988+

path: "direct",

2989+

error: "requester handoff exploded after dispatch",

2990+

});

2991+

expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalled();

2992+

expect(callGateway).toHaveBeenCalledTimes(1);

2993+

expect(sendMessage).not.toHaveBeenCalled();

2994+

});

2995+28932996

it("directly delivers stale isolated cron run media completions", async () => {

28942997

const callGateway = createGatewayMock();

28952998

const sendMessage = createSendMessageMock();