Skip to content

Commit 05565da

Browse files
committed
test(subagents): keep visible_reply_missing through dropped steer fallback
Use the no-output Discord completion path so deliverSubagentAnnouncement keeps the direct classification while the fallback phase records steer_dropped.
1 parent 4423942 commit 05565da

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎src/agents/subagents/announce/subagent-announce-delivery.test.ts‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,19 +2147,19 @@ describe("deliverSubagentAnnouncement completion delivery", () => {
21472147
});
21482148

21492149
it("preserves visible_reply_missing when completion direct delivery fails and fallback steering drops", async () => {
2150-
const callGateway = createGatewayMock({
2151-
result: { payloads: [{ text: "NO_REPLY" }] },
2152-
});
2150+
const callGateway = createPayloadGatewayMock();
2151+
const sendMessage = createSendMessageMock();
21532152
const queueEmbeddedAgentMessageWithOutcome = createQueueOutcomeMock(false);
2154-
const result = await deliverSlackThreadAnnouncement({
2153+
const result = await deliverDiscordDirectMessageCompletion({
21552154
callGateway,
2155+
sendMessage,
21562156
isActive: true,
2157-
sessionId: "requester-session-1",
2158-
directIdempotencyKey: "announce-completion-steer-dropped",
21592157
queueEmbeddedAgentMessageWithOutcome,
21602158
internalEvents: taskCompletionEvents({
21612159
childSessionId: "child-session-id",
2162-
taskLabel: "completion drop smoke",
2160+
status: "error",
2161+
statusLabel: "failed: all models failed",
2162+
result: "(no output)",
21632163
}),
21642164
});
21652165

@@ -2186,8 +2186,8 @@ describe("deliverSubagentAnnouncement completion delivery", () => {
21862186
],
21872187
});
21882188
expect(result.terminal).toBeUndefined();
2189-
expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalledTimes(1);
2190-
expect(callGateway).toHaveBeenCalled();
2189+
expect(queueEmbeddedAgentMessageWithOutcome).toHaveBeenCalled();
2190+
expect(sendMessage).not.toHaveBeenCalled();
21912191
});
21922192

21932193
it("reports failure for Telegram DMs when announce-agent delivery fails", async () => {

0 commit comments

Comments
 (0)