conversation-session-v4-scroll.json 12 KB

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