conversation-session-v4-scroll.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-scroll",
  4. "spec": "./test/e2e/conversation-session/presentation/conversation-session-v4-scroll.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-scroll-title",
  8. "description": "E2E_V4_SCROLL_HISTORY_001 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_V4_SCROLL_HISTORY_001 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_V4_SCROLL_HISTORY_001"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "v4-scroll-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"V4 Scroll E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "v4-scroll-turn1-long-history",
  32. "description": "M5④ 长会话滚动门禁:14 个 completed turn 形成稳定 turn render units,并撑出远超视口的可滚动历史。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "虚拟滚动断言需要确定的 completed turn 数和可滚动高度;真实 provider 无法稳定复现该窗口边界。"
  38. },
  39. "maxMatches": 14,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_V4_SCROLL_HISTORY_"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "cache-control": "no-cache",
  51. "content-type": "text/event-stream; charset=utf-8"
  52. },
  53. "chunks": [
  54. {
  55. "offsetMs": 0,
  56. "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"
  57. },
  58. {
  59. "offsetMs": 5,
  60. "text": "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}\n\n"
  61. },
  62. {
  63. "offsetMs": 10,
  64. "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"
  65. },
  66. {
  67. "offsetMs": 15,
  68. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  69. },
  70. {
  71. "offsetMs": 20,
  72. "text": "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 900}}\n\n"
  73. },
  74. {
  75. "offsetMs": 25,
  76. "text": "event: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  77. }
  78. ]
  79. }
  80. },
  81. {
  82. "id": "v4-scroll-turn2-controlled-stream",
  83. "description": "M5④ 长会话滚动门禁 turn2:可控慢流(首 delta 0.4s,完流 ~11.5s),制造「上滚阅读时流式增量」窗口。",
  84. "metadata": {
  85. "kind": "main",
  86. "timingPolicy": "controlled-stream",
  87. "source": "synthetic",
  88. "syntheticReason": "「上滚不被流式拉回」断言需要稳定的 streaming 窗口。"
  89. },
  90. "maxMatches": 1,
  91. "match": {
  92. "method": "POST",
  93. "pathIncludes": "/messages",
  94. "lastUserMessageIncludes": ["E2E_V4_SCROLL_TURN2"],
  95. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  96. },
  97. "response": {
  98. "statusCode": 200,
  99. "statusMessage": "OK",
  100. "headers": {
  101. "cache-control": "no-cache",
  102. "content-type": "text/event-stream; charset=utf-8"
  103. },
  104. "chunks": [
  105. {
  106. "offsetMs": 0,
  107. "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"
  108. },
  109. {
  110. "offsetMs": 200,
  111. "text": "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}\n\n"
  112. },
  113. {
  114. "offsetMs": 400,
  115. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"V4_SCROLL_TURN2_STREAMING \"}}\n\n"
  116. },
  117. {
  118. "offsetMs": 900,
  119. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 1,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  120. },
  121. {
  122. "offsetMs": 1400,
  123. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 2,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  124. },
  125. {
  126. "offsetMs": 1900,
  127. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 3,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  128. },
  129. {
  130. "offsetMs": 2400,
  131. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 4,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  132. },
  133. {
  134. "offsetMs": 2900,
  135. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 5,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  136. },
  137. {
  138. "offsetMs": 3400,
  139. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 6,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  140. },
  141. {
  142. "offsetMs": 3900,
  143. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 7,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  144. },
  145. {
  146. "offsetMs": 4400,
  147. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 8,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  148. },
  149. {
  150. "offsetMs": 4900,
  151. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 9,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  152. },
  153. {
  154. "offsetMs": 5400,
  155. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 10,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  156. },
  157. {
  158. "offsetMs": 5900,
  159. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 11,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  160. },
  161. {
  162. "offsetMs": 6400,
  163. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 12,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  164. },
  165. {
  166. "offsetMs": 6900,
  167. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 13,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  168. },
  169. {
  170. "offsetMs": 7400,
  171. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 14,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  172. },
  173. {
  174. "offsetMs": 7900,
  175. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 15,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  176. },
  177. {
  178. "offsetMs": 8400,
  179. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 16,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  180. },
  181. {
  182. "offsetMs": 8900,
  183. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 17,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  184. },
  185. {
  186. "offsetMs": 9400,
  187. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 18,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  188. },
  189. {
  190. "offsetMs": 9900,
  191. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 19,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  192. },
  193. {
  194. "offsetMs": 10400,
  195. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"turn2 持续输出片段 20,此时用户上滚阅读历史不应被拉回底部。\"}}\n\n"
  196. },
  197. {
  198. "offsetMs": 11200,
  199. "text": "event: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \" V4_SCROLL_TURN2_DONE\"}}\n\n"
  200. },
  201. {
  202. "offsetMs": 11300,
  203. "text": "event: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}\n\n"
  204. },
  205. {
  206. "offsetMs": 11400,
  207. "text": "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 260}}\n\n"
  208. },
  209. {
  210. "offsetMs": 11500,
  211. "text": "event: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  212. }
  213. ]
  214. }
  215. }
  216. ]
  217. }