conversation-session-composer-edit-mode.json 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-composer-edit-mode",
  4. "spec": "./test/e2e/conversation-session/editing/conversation-session-composer-edit-mode.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-composer-edit-mode-title",
  8. "description": "E2E_CEM_ 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_CEM_ 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_CEM_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "conversation-session-composer-edit-mode-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\": \"Composer Edit E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "cem-original",
  32. "description": "D21/D24/D26/D27/D28 被编辑的 latest user query 首轮回复。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "需要稳定可编辑的 latest real-user row。"
  38. },
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_CEM_ORIGINAL"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "text": {
  48. "id": "cem-original",
  49. "inputTokens": 80,
  50. "outputTokens": 6,
  51. "text": "CEM_ORIGINAL_REPLY"
  52. }
  53. }
  54. },
  55. {
  56. "id": "cem-next",
  57. "description": "D28 编辑提交后的下一条消息回复;排在 cem-edited 前,避免历史里的 E2E_CEM_EDITED 先命中。",
  58. "metadata": {
  59. "kind": "main",
  60. "timingPolicy": "fast-text",
  61. "source": "synthetic",
  62. "syntheticReason": "下一条请求用于断言编辑提交后工具栏保留的模型。"
  63. },
  64. "match": {
  65. "method": "POST",
  66. "pathIncludes": "/messages",
  67. "lastUserMessageIncludes": ["E2E_CEM_NEXT"],
  68. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  69. },
  70. "response": {
  71. "statusCode": 200,
  72. "text": {
  73. "id": "cem-next",
  74. "inputTokens": 80,
  75. "outputTokens": 6,
  76. "text": "CEM_NEXT_REPLY"
  77. }
  78. }
  79. },
  80. {
  81. "id": "cem-edited",
  82. "description": "D27/D28 编辑态提交后的重跑回复。",
  83. "metadata": {
  84. "kind": "main",
  85. "timingPolicy": "fast-text",
  86. "source": "synthetic",
  87. "syntheticReason": "重跑请求用于断言新附件与工具栏模型随 editUserQuery 提交。"
  88. },
  89. "match": {
  90. "method": "POST",
  91. "pathIncludes": "/messages",
  92. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  93. "bodyIncludes": ["E2E_CEM_EDITED"]
  94. },
  95. "response": {
  96. "statusCode": 200,
  97. "text": {
  98. "id": "cem-edited",
  99. "inputTokens": 80,
  100. "outputTokens": 6,
  101. "text": "CEM_EDITED_REPLY"
  102. }
  103. }
  104. },
  105. {
  106. "id": "cem-slow-d22",
  107. "description": "D23 编辑中的 latest query 慢流。",
  108. "metadata": {
  109. "kind": "main",
  110. "timingPolicy": "controlled-stream",
  111. "source": "synthetic",
  112. "syntheticReason": "编辑态需要 running 窗口;在 UI 动作与断言完成后由测试显式释放,不改变产品时钟。"
  113. },
  114. "maxMatches": 1,
  115. "match": {
  116. "method": "POST",
  117. "pathIncludes": "/messages",
  118. "lastUserMessageIncludes": ["E2E_CEM_SLOW_D22"],
  119. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  120. },
  121. "response": {
  122. "statusCode": 200,
  123. "statusMessage": "OK",
  124. "headers": {
  125. "cache-control": "no-cache",
  126. "content-type": "text/event-stream; charset=utf-8"
  127. },
  128. "chunks": [
  129. {
  130. "offsetMs": 0,
  131. "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"
  132. },
  133. {
  134. "offsetMs": 250,
  135. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  136. },
  137. {
  138. "offsetMs": 500,
  139. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"CEM_D22_STREAMING \"}}\n\n"
  140. },
  141. {
  142. "offsetMs": 600,
  143. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  144. },
  145. {
  146. "offsetMs": 700,
  147. "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"
  148. },
  149. {
  150. "offsetMs": 800,
  151. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  152. }
  153. ],
  154. "text": {
  155. "id": "cem-slow-d22",
  156. "inputTokens": 80,
  157. "outputTokens": 4,
  158. "text": "CEM_D22_STREAMING"
  159. },
  160. "releaseAfterChunks": 3
  161. }
  162. },
  163. {
  164. "id": "cem-queued-d22",
  165. "description": "D23 队列续跑产生新的 real-user 输入。",
  166. "metadata": {
  167. "kind": "main",
  168. "timingPolicy": "fast-text",
  169. "source": "synthetic",
  170. "syntheticReason": "续跑让原 row canEdit=false,验证编辑态失效。"
  171. },
  172. "match": {
  173. "method": "POST",
  174. "pathIncludes": "/messages",
  175. "lastUserMessageIncludes": ["E2E_CEM_QUEUED_D22"],
  176. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  177. },
  178. "response": {
  179. "statusCode": 200,
  180. "text": {
  181. "id": "cem-queued-d22",
  182. "inputTokens": 80,
  183. "outputTokens": 6,
  184. "text": "CEM_D22_QUEUED_REPLY"
  185. }
  186. }
  187. },
  188. {
  189. "id": "cem-as-new",
  190. "description": "D23 失效后发送作为普通新消息。",
  191. "metadata": {
  192. "kind": "main",
  193. "timingPolicy": "fast-text",
  194. "source": "synthetic",
  195. "syntheticReason": "证明失效态发送走普通 sendText,而不是 editUserQuery。"
  196. },
  197. "match": {
  198. "method": "POST",
  199. "pathIncludes": "/messages",
  200. "lastUserMessageIncludes": ["E2E_CEM_AS_NEW"],
  201. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  202. },
  203. "response": {
  204. "statusCode": 200,
  205. "text": {
  206. "id": "cem-as-new",
  207. "inputTokens": 80,
  208. "outputTokens": 6,
  209. "text": "CEM_AS_NEW_REPLY"
  210. }
  211. }
  212. },
  213. {
  214. "id": "cem-slow-d24",
  215. "description": "D25 切换编辑目标时保持 running 与队列。",
  216. "metadata": {
  217. "kind": "main",
  218. "timingPolicy": "controlled-stream",
  219. "source": "synthetic",
  220. "syntheticReason": "编辑态需要 running 窗口;在 UI 动作与断言完成后由测试显式释放,不改变产品时钟。"
  221. },
  222. "maxMatches": 1,
  223. "match": {
  224. "method": "POST",
  225. "pathIncludes": "/messages",
  226. "lastUserMessageIncludes": ["E2E_CEM_SLOW_D24"],
  227. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  228. },
  229. "response": {
  230. "statusCode": 200,
  231. "statusMessage": "OK",
  232. "headers": {
  233. "cache-control": "no-cache",
  234. "content-type": "text/event-stream; charset=utf-8"
  235. },
  236. "chunks": [
  237. {
  238. "offsetMs": 0,
  239. "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"
  240. },
  241. {
  242. "offsetMs": 250,
  243. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  244. },
  245. {
  246. "offsetMs": 500,
  247. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"CEM_D24_STREAMING \"}}\n\n"
  248. },
  249. {
  250. "offsetMs": 600,
  251. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  252. },
  253. {
  254. "offsetMs": 700,
  255. "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"
  256. },
  257. {
  258. "offsetMs": 800,
  259. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  260. }
  261. ],
  262. "text": {
  263. "id": "cem-slow-d24",
  264. "inputTokens": 80,
  265. "outputTokens": 4,
  266. "text": "CEM_D24_STREAMING"
  267. },
  268. "releaseAfterChunks": 3
  269. }
  270. }
  271. ]
  272. }