conversation-session-running-queue.json 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-running-queue",
  4. "spec": "./test/e2e/conversation-session/queue/conversation-session-running-queue.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-running-queue-first-slow-stream",
  8. "description": "A03-A08 running queue 首轮慢流,稳定制造 running 窗口。",
  9. "metadata": {
  10. "kind": "main",
  11. "source": "synthetic",
  12. "timingPolicy": "controlled-stream",
  13. "syntheticReason": "真实首轮输出后保持流;队列交互全部结束再由用户 Stop 收口,不靠延时或自然完成跳过断言。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["E2E_SLOW_STREAM", "E2E_RUNNING_QUEUE_FIRST"],
  20. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  21. "lastUserMessageIncludes": ["E2E_RUNNING_QUEUE_FIRST"]
  22. },
  23. "response": {
  24. "statusCode": 200,
  25. "headers": {
  26. "cache-control": "no-cache",
  27. "content-type": "text/event-stream; charset=utf-8"
  28. },
  29. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-running-queue-first-slow-stream\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"-e2e-ok\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  30. "chunks": [
  31. {
  32. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-running-queue-first-slow-stream\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n",
  33. "delayMs": 0
  34. },
  35. {
  36. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n",
  37. "delayMs": 0
  38. },
  39. {
  40. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\n",
  41. "delayMs": 0
  42. },
  43. {
  44. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek\"}}\n\n",
  45. "delayMs": 0
  46. },
  47. {
  48. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"-e2e-ok\"}}\n\n",
  49. "delayMs": 0
  50. },
  51. {
  52. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n",
  53. "delayMs": 0
  54. },
  55. {
  56. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n",
  57. "delayMs": 0
  58. },
  59. {
  60. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  61. "delayMs": 0
  62. }
  63. ],
  64. "releaseAfterChunks": 3
  65. }
  66. },
  67. {
  68. "id": "upstream-running-queue-second-queued-contract",
  69. "description": "A03-A06 second queued marker 合同占位;running 中不应立即发 provider。",
  70. "metadata": {
  71. "kind": "main",
  72. "timingPolicy": "fast-text",
  73. "source": "synthetic",
  74. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  75. },
  76. "maxMatches": 0,
  77. "match": {
  78. "method": "POST",
  79. "pathIncludes": "/messages",
  80. "bodyIncludes": ["E2E_RUNNING_QUEUE_SECOND"],
  81. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  82. "lastUserMessageIncludes": ["E2E_RUNNING_QUEUE_SECOND"]
  83. },
  84. "response": {
  85. "statusCode": 200,
  86. "text": {
  87. "id": "upstream-e2e-running-queue-second-should-not-send",
  88. "inputTokens": 128,
  89. "outputTokens": 12,
  90. "text": "upstream-e2e-ok"
  91. }
  92. }
  93. },
  94. {
  95. "id": "upstream-running-queue-third-queued-contract",
  96. "description": "A03-A06 third queued marker 合同占位;running 中不应立即发 provider。",
  97. "metadata": {
  98. "kind": "main",
  99. "timingPolicy": "fast-text",
  100. "source": "synthetic",
  101. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  102. },
  103. "maxMatches": 0,
  104. "match": {
  105. "method": "POST",
  106. "pathIncludes": "/messages",
  107. "bodyIncludes": ["E2E_RUNNING_QUEUE_THIRD"],
  108. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  109. "lastUserMessageIncludes": ["E2E_RUNNING_QUEUE_THIRD"]
  110. },
  111. "response": {
  112. "statusCode": 200,
  113. "text": {
  114. "id": "upstream-e2e-running-queue-third-should-not-send",
  115. "inputTokens": 128,
  116. "outputTokens": 12,
  117. "text": "upstream-e2e-ok"
  118. }
  119. }
  120. },
  121. {
  122. "id": "upstream-running-queue-fourth-queued-contract",
  123. "description": "A03-A06 fourth queued marker 合同占位;running 中不应立即发 provider。",
  124. "metadata": {
  125. "kind": "main",
  126. "timingPolicy": "fast-text",
  127. "source": "synthetic",
  128. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  129. },
  130. "maxMatches": 0,
  131. "match": {
  132. "method": "POST",
  133. "pathIncludes": "/messages",
  134. "bodyIncludes": ["E2E_RUNNING_QUEUE_FOURTH"],
  135. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  136. "lastUserMessageIncludes": ["E2E_RUNNING_QUEUE_FOURTH"]
  137. },
  138. "response": {
  139. "statusCode": 200,
  140. "text": {
  141. "id": "upstream-e2e-running-queue-fourth-should-not-send",
  142. "inputTokens": 128,
  143. "outputTokens": 12,
  144. "text": "upstream-e2e-ok"
  145. }
  146. }
  147. },
  148. {
  149. "id": "upstream-running-queue-fifth-queued-contract",
  150. "description": "A03-A06 fifth queued marker 合同占位;running 中不应立即发 provider。",
  151. "metadata": {
  152. "kind": "main",
  153. "timingPolicy": "fast-text",
  154. "source": "synthetic",
  155. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  156. },
  157. "maxMatches": 0,
  158. "match": {
  159. "method": "POST",
  160. "pathIncludes": "/messages",
  161. "bodyIncludes": ["E2E_RUNNING_QUEUE_FIFTH"],
  162. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  163. "lastUserMessageIncludes": ["E2E_RUNNING_QUEUE_FIFTH"]
  164. },
  165. "response": {
  166. "statusCode": 200,
  167. "text": {
  168. "id": "upstream-e2e-running-queue-fifth-should-not-send",
  169. "inputTokens": 128,
  170. "outputTokens": 12,
  171. "text": "upstream-e2e-ok"
  172. }
  173. }
  174. },
  175. {
  176. "id": "upstream-running-queue-goal-queued-contract",
  177. "description": "A07 running 中 /goal 入队合同占位;不应立即发 provider。",
  178. "metadata": {
  179. "kind": "main",
  180. "timingPolicy": "fast-text",
  181. "source": "synthetic",
  182. "syntheticReason": "running 中 /goal 只进入本地 queue,不能立即触发 provider 请求。"
  183. },
  184. "maxMatches": 0,
  185. "match": {
  186. "method": "POST",
  187. "pathIncludes": "/messages",
  188. "bodyIncludes": ["E2E_RUNNING_QUEUE_GOAL"],
  189. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  190. "lastUserMessageIncludes": ["E2E_RUNNING_QUEUE_GOAL"]
  191. },
  192. "response": {
  193. "statusCode": 200,
  194. "text": {
  195. "id": "upstream-e2e-running-queue-goal-should-not-send",
  196. "inputTokens": 128,
  197. "outputTokens": 12,
  198. "text": "upstream-e2e-ok"
  199. }
  200. }
  201. }
  202. ]
  203. }