From a76ebdf7815ccb4be64ff43e10cc604570890d0c Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Thu, 18 Jun 2026 06:46:57 -0700 Subject: [PATCH] FN-6637: align chat multipart 400 regression test Keep the chat route regression test focused on missing multipart content without adding attachments.\n\n- Update the multipart 400-path test to send an empty multipart request.\n- Document why attachment-only multipart requests remain valid for chat sends.\n\nFiles changed:\n packages/dashboard/src/__tests__/chat-routes.test.ts | 13 +++++--------\n 1 file changed, 5 insertions(+), 8 deletions(-) Fusion-Task-Id: FN-6637 Fusion-Task-Lineage: 63145e30-1a72-4fdd-8b60-e4eba65bb7aa --- .../dashboard/src/__tests__/chat-routes.test.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/dashboard/src/__tests__/chat-routes.test.ts b/packages/dashboard/src/__tests__/chat-routes.test.ts index b8268dc74a..7681dda0fd 100644 --- a/packages/dashboard/src/__tests__/chat-routes.test.ts +++ b/packages/dashboard/src/__tests__/chat-routes.test.ts @@ -1181,14 +1181,11 @@ describe("Chat API Routes", () => { it("returns 400 for multipart requests missing content instead of crashing", async () => { mockGetSession.mockReturnValue(sampleSession); - const { payload, boundary } = makeMultipartMessageRequest({ - files: [{ - fieldName: "attachments", - filename: "note.txt", - contentType: "text/plain", - body: Buffer.from("hello"), - }], - }); + /** + * FNXC:Chat 2026-06-18-06:34: + * FN-6637 keeps this regression test aligned with the register-chat-routes.ts FNXC:Chat 2026-06-17-02:12 invariant: attachment-only multipart sends are valid, so the 400 no-SSE path must omit both text content and files. + */ + const { payload, boundary } = makeMultipartMessageRequest({}); const response = await request( app,