| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- {
- "version": 1,
- "caseName": "conversation-session-v4-scroll",
- "spec": "./test/e2e/conversation-session/presentation/conversation-session-v4-scroll.test.ts",
- "fixtures": [
- {
- "id": "v4-scroll-title",
- "description": "E2E_V4_SCROLL_HISTORY_001 首发的 case-local 标题生成响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "E2E_V4_SCROLL_HISTORY_001 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_V4_SCROLL_HISTORY_001"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "v4-scroll-title",
- "inputTokens": 64,
- "outputTokens": 8,
- "text": "{\"title\":\"V4 Scroll E2E\"}"
- }
- }
- },
- {
- "id": "v4-scroll-turn1-long-history",
- "description": "M5④ 长会话滚动门禁:14 个 completed turn 形成稳定 turn render units,并撑出远超视口的可滚动历史。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "虚拟滚动断言需要确定的 completed turn 数和可滚动高度;真实 provider 无法稳定复现该窗口边界。"
- },
- "maxMatches": 14,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_V4_SCROLL_HISTORY_"],
- "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-scroll-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": 5,
- "text": "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}\n\n"
- },
- {
- "offsetMs": 10,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4 scroll completed turn response:此段保持足够长度以形成稳定的 turn 高度,验证动态测高、虚拟窗口、顶部历史可达、流式期间不拉回以及回到底部。\"}}\n\n"
- },
- {
- "offsetMs": 15,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 20,
- "text": "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 900}}\n\n"
- },
- {
- "offsetMs": 25,
- "text": "event: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
- }
- ]
- }
- },
- {
- "id": "v4-scroll-turn2-controlled-stream",
- "description": "M5④ 长会话滚动门禁 turn2:可控慢流(首 delta 0.4s,完流 ~11.5s),制造「上滚阅读时流式增量」窗口。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "「上滚不被流式拉回」断言需要稳定的 streaming 窗口。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_V4_SCROLL_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-scroll-turn2\", \"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": 200,
- "text": "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}\n\n"
- },
- {
- "offsetMs": 400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"V4_SCROLL_TURN2_STREAMING \"}}\n\n"
- },
- {
- "offsetMs": 900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 1,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 1400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 2,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 1900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 3,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 2400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 4,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 2900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 5,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 3400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 6,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 3900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 7,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 4400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 8,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 4900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 9,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 5400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 10,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 5900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 11,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 6400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 12,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 6900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 13,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 7400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 14,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 7900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 15,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 8400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 16,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 8900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 17,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 9400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 18,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 9900,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 19,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 10400,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 20,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
- },
- {
- "offsetMs": 11200,
- "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \" V4_SCROLL_TURN2_DONE\"}}\n\n"
- },
- {
- "offsetMs": 11300,
- "text": "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}\n\n"
- },
- {
- "offsetMs": 11400,
- "text": "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 260}}\n\n"
- },
- {
- "offsetMs": 11500,
- "text": "event: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
- }
- ]
- }
- }
- ]
- }
|