conversation-session-stop-held-queue.json 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-stop-held-queue",
  4. "spec": "./test/e2e/conversation-session/conversation-session-stop-held-queue.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-stop-held-queue-first-contract",
  8. "description": "第一条 held queue marker 合同占位;stop 后不应自动发送。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "held queue 的产品语义是保留队列且不自动消费;fixture 只覆盖 marker 合同。"
  14. },
  15. "maxMatches": 0,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": [
  20. "E2E_STOP_HELD_QUEUE_FIRST"
  21. ],
  22. "bodyExcludes": [
  23. "Generate a concise title",
  24. "CRITICAL: Respond with TEXT ONLY"
  25. ],
  26. "lastUserMessageIncludes": [
  27. "E2E_STOP_HELD_QUEUE_FIRST"
  28. ]
  29. },
  30. "response": {
  31. "statusCode": 200,
  32. "text": {
  33. "id": "upstream-e2e-stop-held-queue-first-should-not-send",
  34. "inputTokens": 128,
  35. "outputTokens": 12,
  36. "text": "upstream-e2e-ok"
  37. }
  38. }
  39. },
  40. {
  41. "id": "upstream-stop-held-running-slow-stream",
  42. "description": "Stop held queue 首轮慢流,稳定制造 held queue 入队窗口。",
  43. "metadata": {
  44. "kind": "main",
  45. "timingPolicy": "controlled-stream",
  46. "source": "synthetic",
  47. "syntheticReason": "held queue 需要当前轮保持 running;真实 provider 过快完成会让后续输入变成普通新轮。"
  48. },
  49. "maxMatches": 1,
  50. "match": {
  51. "method": "POST",
  52. "pathIncludes": "/messages",
  53. "bodyIncludes": [
  54. "E2E_SLOW_STREAM",
  55. "E2E_STOP_HELD_RUNNING"
  56. ],
  57. "bodyExcludes": [
  58. "Generate a concise title",
  59. "CRITICAL: Respond with TEXT ONLY"
  60. ],
  61. "lastUserMessageIncludes": [
  62. "E2E_STOP_HELD_RUNNING"
  63. ]
  64. },
  65. "response": {
  66. "statusCode": 200,
  67. "statusMessage": "OK",
  68. "headers": {
  69. "cache-control": "no-cache",
  70. "content-type": "text/event-stream; charset=utf-8"
  71. },
  72. "events": [
  73. {
  74. "sequence": 0,
  75. "offsetMs": 0,
  76. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-stop-held-running-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"
  77. },
  78. {
  79. "sequence": 1,
  80. "offsetMs": 250,
  81. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  82. },
  83. {
  84. "sequence": 2,
  85. "offsetMs": 700,
  86. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\n"
  87. },
  88. {
  89. "sequence": 3,
  90. "offsetMs": 60000,
  91. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek-e2e-ok\"}}\n\n"
  92. },
  93. {
  94. "sequence": 4,
  95. "offsetMs": 60100,
  96. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  97. },
  98. {
  99. "sequence": 5,
  100. "offsetMs": 60200,
  101. "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"
  102. },
  103. {
  104. "sequence": 6,
  105. "offsetMs": 60300,
  106. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  107. }
  108. ]
  109. }
  110. },
  111. {
  112. "id": "upstream-stop-held-queue-second-contract",
  113. "description": "第二条 held queue marker 合同占位;stop 后不应自动发送。",
  114. "metadata": {
  115. "kind": "main",
  116. "timingPolicy": "fast-text",
  117. "source": "synthetic",
  118. "syntheticReason": "held queue 的产品语义是保留队列且不自动消费;fixture 只覆盖 marker 合同。"
  119. },
  120. "maxMatches": 0,
  121. "match": {
  122. "method": "POST",
  123. "pathIncludes": "/messages",
  124. "bodyIncludes": [
  125. "E2E_STOP_HELD_QUEUE_SECOND"
  126. ],
  127. "bodyExcludes": [
  128. "Generate a concise title",
  129. "CRITICAL: Respond with TEXT ONLY"
  130. ],
  131. "lastUserMessageIncludes": [
  132. "E2E_STOP_HELD_QUEUE_SECOND"
  133. ]
  134. },
  135. "response": {
  136. "statusCode": 200,
  137. "text": {
  138. "id": "upstream-e2e-stop-held-queue-second-should-not-send",
  139. "inputTokens": 128,
  140. "outputTokens": 12,
  141. "text": "upstream-e2e-ok"
  142. }
  143. }
  144. },
  145. {
  146. "id": "upstream-stop-held-queue-third-contract",
  147. "description": "第三条 held queue marker 合同占位;stop 后不应自动发送。",
  148. "metadata": {
  149. "kind": "main",
  150. "timingPolicy": "fast-text",
  151. "source": "synthetic",
  152. "syntheticReason": "held queue 的产品语义是保留队列且不自动消费;fixture 只覆盖 marker 合同。"
  153. },
  154. "maxMatches": 0,
  155. "match": {
  156. "method": "POST",
  157. "pathIncludes": "/messages",
  158. "bodyIncludes": [
  159. "E2E_STOP_HELD_QUEUE_THIRD"
  160. ],
  161. "bodyExcludes": [
  162. "Generate a concise title",
  163. "CRITICAL: Respond with TEXT ONLY"
  164. ],
  165. "lastUserMessageIncludes": [
  166. "E2E_STOP_HELD_QUEUE_THIRD"
  167. ]
  168. },
  169. "response": {
  170. "statusCode": 200,
  171. "text": {
  172. "id": "upstream-e2e-stop-held-queue-third-should-not-send",
  173. "inputTokens": 128,
  174. "outputTokens": 12,
  175. "text": "upstream-e2e-ok"
  176. }
  177. }
  178. },
  179. {
  180. "id": "upstream-stop-held-queue-append-contract",
  181. "description": "Stop 后追加 held queue marker 合同占位;不应立即发送。",
  182. "metadata": {
  183. "kind": "main",
  184. "timingPolicy": "fast-text",
  185. "source": "synthetic",
  186. "syntheticReason": "已 held 的 queue 下追加普通文本仍应进入队列;fixture 只覆盖 marker 合同。"
  187. },
  188. "maxMatches": 0,
  189. "match": {
  190. "method": "POST",
  191. "pathIncludes": "/messages",
  192. "bodyIncludes": [
  193. "E2E_STOP_HELD_QUEUE_APPEND"
  194. ],
  195. "bodyExcludes": [
  196. "Generate a concise title",
  197. "CRITICAL: Respond with TEXT ONLY"
  198. ],
  199. "lastUserMessageIncludes": [
  200. "E2E_STOP_HELD_QUEUE_APPEND"
  201. ]
  202. },
  203. "response": {
  204. "statusCode": 200,
  205. "text": {
  206. "id": "upstream-e2e-stop-held-queue-append-should-not-send",
  207. "inputTokens": 128,
  208. "outputTokens": 12,
  209. "text": "upstream-e2e-ok"
  210. }
  211. }
  212. }
  213. ]
  214. }