fix(agents): ignore failed subagent placeholders · openclaw/openclaw@31ecbbd
vincentkoc
·
2026-05-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1003,6 +1003,41 @@ describe("deliverSubagentAnnouncement completion delivery", () => {
|
1003 | 1003 | ); |
1004 | 1004 | }); |
1005 | 1005 | |
| 1006 | +it("does not directly deliver failed subagent placeholder output", async () => { |
| 1007 | +const callGateway = createGatewayMock({ |
| 1008 | +result: { |
| 1009 | +payloads: [], |
| 1010 | +}, |
| 1011 | +}); |
| 1012 | +const sendMessage = createSendMessageMock(); |
| 1013 | + |
| 1014 | +const result = await deliverDiscordDirectMessageCompletion({ |
| 1015 | + callGateway, |
| 1016 | + sendMessage, |
| 1017 | +internalEvents: [ |
| 1018 | +{ |
| 1019 | +type: "task_completion", |
| 1020 | +source: "subagent", |
| 1021 | +childSessionKey: "agent:worker:subagent:child", |
| 1022 | +childSessionId: "child-session-id", |
| 1023 | +announceType: "subagent task", |
| 1024 | +taskLabel: "direct completion smoke", |
| 1025 | +status: "error", |
| 1026 | +statusLabel: "failed: all models failed", |
| 1027 | +result: "(no output)", |
| 1028 | +replyInstruction: "Summarize the result.", |
| 1029 | +}, |
| 1030 | +], |
| 1031 | +}); |
| 1032 | + |
| 1033 | +expectRecordFields(result, { |
| 1034 | +delivered: false, |
| 1035 | +path: "direct", |
| 1036 | +error: "completion agent did not produce a visible reply", |
| 1037 | +}); |
| 1038 | +expect(sendMessage).not.toHaveBeenCalled(); |
| 1039 | +}); |
| 1040 | + |
1006 | 1041 | it("directly delivers unprefixed direct targets recognized by the channel grammar", async () => { |
1007 | 1042 | registerDirectTargetTestChannel("qa-channel"); |
1008 | 1043 | const callGateway = createGatewayMock({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。