Skip to content

Commit 09bfefe

Browse files
committed
test(outbound): align implicit source reply sink
1 parent 827ceb5 commit 09bfefe

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/infra/outbound/message-action-runner.core-send.test.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe("runMessageAction core send routing", () => {
228228
expect(payload.dryRun).toBe(true);
229229
});
230230

231-
it("uses best-effort delivery for implicit message-tool-only source replies", async () => {
231+
it("uses the internal source sink for implicit message-tool-only source replies", async () => {
232232
const sendText = registerSlackTextPlugin();
233233

234234
const result = await runMessageAction({
@@ -248,7 +248,20 @@ describe("runMessageAction core send routing", () => {
248248
});
249249

250250
expect(result.kind).toBe("send");
251-
expect(sendText).toHaveBeenCalledOnce();
251+
expect(result).toMatchObject({
252+
channel: "webchat",
253+
to: "current-run",
254+
handledBy: "internal-source",
255+
payload: {
256+
status: "ok",
257+
sourceReplyDeliveryMode: "message_tool_only",
258+
sourceReplySink: "internal-ui",
259+
sourceReply: {
260+
text: "visible source reply",
261+
},
262+
},
263+
});
264+
expect(sendText).not.toHaveBeenCalled();
252265
});
253266

254267
it("uses best-effort delivery for explicit current-source message-tool-only replies", async () => {

0 commit comments

Comments
 (0)