| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- {
- "version": 1,
- "caseName": "conversation-session-v4-vertical-slice",
- "spec": "./test/e2e/conversation-session/smoke/conversation-session-v4-vertical-slice.test.ts",
- "fixtures": [
- {
- "id": "v4-vertical-slice-title",
- "description": "E2E_V4_SLICE_TURN1 首发的 case-local 标题生成响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "E2E_V4_SLICE_TURN1 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_V4_SLICE_TURN1"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "v4-vertical-slice-title",
- "inputTokens": 64,
- "outputTokens": 8,
- "text": "{\"title\":\"V4 Vertical Slice E2E\"}"
- }
- }
- },
- {
- "id": "v4-slice-turn1-controlled-stream",
- "description": "M3 竖切门禁 turn1:可控慢流,制造「agent 输出中刷新」窗口(首 delta 0.5s,完流 12s)。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "刷新恢复断言需要稳定的 streaming 窗口;真实 provider 完流时间不可控。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_V4_SLICE_TURN1"],
- "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\":\"v4-slice-turn1\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"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\":\"V4_TURN1_STREAMING \"}}\n\n"
- },
- {
- "offsetMs": 3000,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"part-two \"}}\n\n"
- },
- {
- "offsetMs": 6000,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"part-three \"}}\n\n"
- },
- {
- "offsetMs": 9000,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"part-four \"}}\n\n"
- },
- {
- "offsetMs": 12000,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_TURN1_DONE\"}}\n\n"
- },
- {
- "offsetMs": 12200,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 12300,
- "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":64,\"output_tokens\":24,\"service_tier\":\"standard\"}}\n\n"
- },
- {
- "offsetMs": 12400,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ],
- "text": {
- "id": "v4-slice-turn1",
- "inputTokens": 64,
- "outputTokens": 24,
- "text": "V4_TURN1_STREAMING part-two part-three part-four V4_TURN1_DONE"
- }
- }
- },
- {
- "id": "v4-slice-turn2-controlled-stream",
- "description": "M3 竖切门禁 turn2:长尾慢流(45s 才完流),留出点 stop 的窗口;stop 后客户端 abort。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "stop 断言需要 running 窗口远大于点击耗时,避免时序抖动误报。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_V4_SLICE_TURN2"],
- "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\":\"v4-slice-turn2\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":96,\"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\":\"V4_TURN2_STREAMING \"}}\n\n"
- },
- {
- "offsetMs": 5000,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"turn2-part-two \"}}\n\n"
- },
- {
- "offsetMs": 45000,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 45100,
- "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":96,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n"
- },
- {
- "offsetMs": 45200,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ],
- "text": {
- "id": "v4-slice-turn2",
- "inputTokens": 96,
- "outputTokens": 12,
- "text": "V4_TURN2_STREAMING turn2-part-two"
- }
- }
- }
- ]
- }
|