{ "version": 1, "caseName": "conversation-session-composer-edit-mode", "spec": "./test/e2e/conversation-session/editing/conversation-session-composer-edit-mode.test.ts", "fixtures": [ { "id": "conversation-session-composer-edit-mode-title", "description": "E2E_CEM_ 首发的 case-local 标题生成响应。", "metadata": { "kind": "common", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "E2E_CEM_ 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic。" }, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["Generate a concise title", "E2E_CEM_"] }, "response": { "statusCode": 200, "text": { "id": "conversation-session-composer-edit-mode-title", "inputTokens": 64, "outputTokens": 8, "text": "{\"title\": \"Composer Edit E2E\"}" } } }, { "id": "cem-original", "description": "D21/D24/D26/D27/D28 被编辑的 latest user query 首轮回复。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "需要稳定可编辑的 latest real-user row。" }, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_CEM_ORIGINAL"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "cem-original", "inputTokens": 80, "outputTokens": 6, "text": "CEM_ORIGINAL_REPLY" } } }, { "id": "cem-next", "description": "D28 编辑提交后的下一条消息回复;排在 cem-edited 前,避免历史里的 E2E_CEM_EDITED 先命中。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "下一条请求用于断言编辑提交后工具栏保留的模型。" }, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_CEM_NEXT"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "cem-next", "inputTokens": 80, "outputTokens": 6, "text": "CEM_NEXT_REPLY" } } }, { "id": "cem-edited", "description": "D27/D28 编辑态提交后的重跑回复。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "重跑请求用于断言新附件与工具栏模型随 editUserQuery 提交。" }, "match": { "method": "POST", "pathIncludes": "/messages", "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"], "bodyIncludes": ["E2E_CEM_EDITED"] }, "response": { "statusCode": 200, "text": { "id": "cem-edited", "inputTokens": 80, "outputTokens": 6, "text": "CEM_EDITED_REPLY" } } }, { "id": "cem-slow-d22", "description": "D23 编辑中的 latest query 慢流。", "metadata": { "kind": "main", "timingPolicy": "controlled-stream", "source": "synthetic", "syntheticReason": "编辑态需要 running 窗口;在 UI 动作与断言完成后由测试显式释放,不改变产品时钟。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_CEM_SLOW_D22"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "cache-control": "no-cache", "content-type": "text/event-stream; charset=utf-8" }, "chunks": [ { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"cem-slow-d22\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" }, { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" }, { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"CEM_D22_STREAMING \"}}\n\n" }, { "offsetMs": 600, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" }, { "offsetMs": 700, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n" }, { "offsetMs": 800, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" } ], "text": { "id": "cem-slow-d22", "inputTokens": 80, "outputTokens": 4, "text": "CEM_D22_STREAMING" }, "releaseAfterChunks": 3 } }, { "id": "cem-queued-d22", "description": "D23 队列续跑产生新的 real-user 输入。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "续跑让原 row canEdit=false,验证编辑态失效。" }, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_CEM_QUEUED_D22"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "cem-queued-d22", "inputTokens": 80, "outputTokens": 6, "text": "CEM_D22_QUEUED_REPLY" } } }, { "id": "cem-as-new", "description": "D23 失效后发送作为普通新消息。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "证明失效态发送走普通 sendText,而不是 editUserQuery。" }, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_CEM_AS_NEW"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "cem-as-new", "inputTokens": 80, "outputTokens": 6, "text": "CEM_AS_NEW_REPLY" } } }, { "id": "cem-slow-d24", "description": "D25 切换编辑目标时保持 running 与队列。", "metadata": { "kind": "main", "timingPolicy": "controlled-stream", "source": "synthetic", "syntheticReason": "编辑态需要 running 窗口;在 UI 动作与断言完成后由测试显式释放,不改变产品时钟。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_CEM_SLOW_D24"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "cache-control": "no-cache", "content-type": "text/event-stream; charset=utf-8" }, "chunks": [ { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"cem-slow-d24\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" }, { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" }, { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"CEM_D24_STREAMING \"}}\n\n" }, { "offsetMs": 600, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" }, { "offsetMs": 700, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n" }, { "offsetMs": 800, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" } ], "text": { "id": "cem-slow-d24", "inputTokens": 80, "outputTokens": 4, "text": "CEM_D24_STREAMING" }, "releaseAfterChunks": 3 } } ] }