conversation-session-queue-edit-freeze.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-queue-edit-freeze",
  4. "spec": "./test/e2e/conversation-session/queue/conversation-session-queue-edit-freeze.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-queue-edit-freeze-title",
  8. "description": "E2E_QEF_ 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_QEF_ 首发会触发默认 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_QEF_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "conversation-session-queue-edit-freeze-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\": \"Queue Edit Freeze E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "qef-slow-g",
  32. "description": "B09h/B09i/B09o 首轮慢流,保持队列存在。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "controlled-stream",
  36. "source": "synthetic",
  37. "syntheticReason": "编辑态需要 running 窗口;在 UI 动作与断言完成后由测试显式释放,不改变产品时钟。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_QEF_SLOW_G"],
  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\":\"qef-slow-g\",\"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"
  57. },
  58. {
  59. "offsetMs": 250,
  60. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  61. },
  62. {
  63. "offsetMs": 500,
  64. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"QEF_G_STREAMING \"}}\n\n"
  65. },
  66. {
  67. "offsetMs": 600,
  68. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  69. },
  70. {
  71. "offsetMs": 700,
  72. "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"
  73. },
  74. {
  75. "offsetMs": 800,
  76. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  77. }
  78. ],
  79. "text": {
  80. "id": "qef-slow-g",
  81. "inputTokens": 80,
  82. "outputTokens": 4,
  83. "text": "QEF_G_STREAMING"
  84. },
  85. "releaseAfterChunks": 3
  86. }
  87. },
  88. {
  89. "id": "qef-a",
  90. "description": "B09h 冻结项之前的队列项正常消费。",
  91. "metadata": {
  92. "kind": "main",
  93. "timingPolicy": "fast-text",
  94. "source": "synthetic",
  95. "syntheticReason": "证明冻结项之前的 FIFO 不受影响。"
  96. },
  97. "match": {
  98. "method": "POST",
  99. "pathIncludes": "/messages",
  100. "lastUserMessageIncludes": ["E2E_QEF_A"],
  101. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  102. },
  103. "response": {
  104. "statusCode": 200,
  105. "text": {
  106. "id": "qef-a",
  107. "inputTokens": 80,
  108. "outputTokens": 6,
  109. "text": "QEF_A_REPLY"
  110. }
  111. }
  112. },
  113. {
  114. "id": "qef-c",
  115. "description": "B09o/B09p 冻结项编辑提交后按新配置消费;慢流让 D 在应用弹窗确认前保持排队。",
  116. "metadata": {
  117. "kind": "main",
  118. "timingPolicy": "controlled-stream",
  119. "source": "synthetic",
  120. "syntheticReason": "请求体用于断言 editQueueItem 写回的模型;应用到排队消息需要 D 仍在队列,由测试显式释放,不改变产品时钟。"
  121. },
  122. "maxMatches": 1,
  123. "match": {
  124. "method": "POST",
  125. "pathIncludes": "/messages",
  126. "lastUserMessageIncludes": ["E2E_QEF_C_EDITED"],
  127. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  128. },
  129. "response": {
  130. "statusCode": 200,
  131. "statusMessage": "OK",
  132. "headers": {
  133. "cache-control": "no-cache",
  134. "content-type": "text/event-stream; charset=utf-8"
  135. },
  136. "chunks": [
  137. {
  138. "offsetMs": 0,
  139. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"qef-c\",\"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"
  140. },
  141. {
  142. "offsetMs": 250,
  143. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  144. },
  145. {
  146. "offsetMs": 500,
  147. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"QEF_C_REPLY \"}}\n\n"
  148. },
  149. {
  150. "offsetMs": 600,
  151. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  152. },
  153. {
  154. "offsetMs": 700,
  155. "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"
  156. },
  157. {
  158. "offsetMs": 800,
  159. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  160. }
  161. ],
  162. "text": {
  163. "id": "qef-c",
  164. "inputTokens": 80,
  165. "outputTokens": 6,
  166. "text": "QEF_C_REPLY"
  167. },
  168. "releaseAfterChunks": 3
  169. }
  170. },
  171. {
  172. "id": "qef-d",
  173. "description": "B09h 冻结项之后的队列项在解锁后消费。",
  174. "metadata": {
  175. "kind": "main",
  176. "timingPolicy": "fast-text",
  177. "source": "synthetic",
  178. "syntheticReason": "证明冻结期间 D 等待、解锁后按顺序消费。"
  179. },
  180. "match": {
  181. "method": "POST",
  182. "pathIncludes": "/messages",
  183. "lastUserMessageIncludes": ["E2E_QEF_D"],
  184. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  185. },
  186. "response": {
  187. "statusCode": 200,
  188. "text": {
  189. "id": "qef-d",
  190. "inputTokens": 80,
  191. "outputTokens": 6,
  192. "text": "QEF_D_REPLY"
  193. }
  194. }
  195. },
  196. {
  197. "id": "qef-slow-j",
  198. "description": "B09k 刷新释放锁的慢流窗口。",
  199. "metadata": {
  200. "kind": "main",
  201. "timingPolicy": "controlled-stream",
  202. "source": "synthetic",
  203. "syntheticReason": "编辑态需要 running 窗口;在 UI 动作与断言完成后由测试显式释放,不改变产品时钟。"
  204. },
  205. "maxMatches": 1,
  206. "match": {
  207. "method": "POST",
  208. "pathIncludes": "/messages",
  209. "lastUserMessageIncludes": ["E2E_QEF_SLOW_J"],
  210. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  211. },
  212. "response": {
  213. "statusCode": 200,
  214. "statusMessage": "OK",
  215. "headers": {
  216. "cache-control": "no-cache",
  217. "content-type": "text/event-stream; charset=utf-8"
  218. },
  219. "chunks": [
  220. {
  221. "offsetMs": 0,
  222. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"qef-slow-j\",\"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"
  223. },
  224. {
  225. "offsetMs": 250,
  226. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  227. },
  228. {
  229. "offsetMs": 500,
  230. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"QEF_J_STREAMING \"}}\n\n"
  231. },
  232. {
  233. "offsetMs": 600,
  234. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  235. },
  236. {
  237. "offsetMs": 700,
  238. "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"
  239. },
  240. {
  241. "offsetMs": 800,
  242. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  243. }
  244. ],
  245. "text": {
  246. "id": "qef-slow-j",
  247. "inputTokens": 80,
  248. "outputTokens": 4,
  249. "text": "QEF_J_STREAMING"
  250. },
  251. "releaseAfterChunks": 3
  252. }
  253. },
  254. {
  255. "id": "qef-j",
  256. "description": "B09k 刷新释放锁后队列项正常消费。",
  257. "metadata": {
  258. "kind": "main",
  259. "timingPolicy": "fast-text",
  260. "source": "synthetic",
  261. "syntheticReason": "证明发起端刷新后锁已释放。"
  262. },
  263. "match": {
  264. "method": "POST",
  265. "pathIncludes": "/messages",
  266. "lastUserMessageIncludes": ["E2E_QEF_J"],
  267. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  268. },
  269. "response": {
  270. "statusCode": 200,
  271. "text": {
  272. "id": "qef-j",
  273. "inputTokens": 80,
  274. "outputTokens": 6,
  275. "text": "QEF_J_REPLY"
  276. }
  277. }
  278. }
  279. ]
  280. }