conversation-session-side-slash-arguments.json 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-side-slash-arguments",
  4. "spec": "./test/e2e/conversation-session/conversation-session-side-slash-arguments.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "side-slash-arguments-title",
  8. "description": "所有 slash argument child 的标题 sidecar 固定返回,避免标题请求抢占主消息 fixture。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是 slash argument 语义;按统一 E2E marker 返回固定标题,隔离 replay 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_SLASH_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "side-slash-arguments-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"Slash arguments E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "side-slash-arguments-parent-running",
  32. "description": "父任务 running 窗口:首 delta 很快到达,完流延迟到 60 秒,允许在父 turn 期间提交 /btw 参数。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "controlled-stream",
  36. "source": "synthetic",
  37. "syntheticReason": "running 组合需要稳定的父 active turn;真实 provider 完流时间不可控。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_SLASH_PARENT_RUNNING"],
  44. "bodyIncludes": ["E2E_SLASH_PARENT_RUNNING"],
  45. "bodyExcludes": [
  46. "Generate a concise title",
  47. "CRITICAL: Respond with TEXT ONLY"
  48. ]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "statusMessage": "OK",
  53. "headers": {
  54. "cache-control": "no-cache",
  55. "content-type": "text/event-stream; charset=utf-8"
  56. },
  57. "events": [
  58. {
  59. "sequence": 0,
  60. "offsetMs": 0,
  61. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"side-slash-arguments-parent-running\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":96,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  62. },
  63. {
  64. "sequence": 1,
  65. "offsetMs": 250,
  66. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  67. },
  68. {
  69. "sequence": 2,
  70. "offsetMs": 700,
  71. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_SLASH_PARENT_RUNNING_STREAMING\"}}\n\n"
  72. },
  73. {
  74. "sequence": 3,
  75. "offsetMs": 60000,
  76. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" done\"}}\n\n"
  77. },
  78. {
  79. "sequence": 4,
  80. "offsetMs": 60100,
  81. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  82. },
  83. {
  84. "sequence": 5,
  85. "offsetMs": 60200,
  86. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":96,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n"
  87. },
  88. {
  89. "sequence": 6,
  90. "offsetMs": 60300,
  91. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  92. }
  93. ]
  94. }
  95. },
  96. {
  97. "id": "side-slash-arguments-parent-seed",
  98. "description": "父会话首发 seed 的固定快速文本响应。",
  99. "metadata": {
  100. "kind": "main",
  101. "timingPolicy": "fast-text",
  102. "source": "synthetic",
  103. "syntheticReason": "父会话只需稳定建立 session,不依赖真实 provider 生成。"
  104. },
  105. "match": {
  106. "method": "POST",
  107. "pathIncludes": "/messages",
  108. "lastUserMessageIncludes": ["E2E_SLASH_PARENT_SEED"],
  109. "bodyIncludes": ["E2E_SLASH_PARENT_SEED"],
  110. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  111. },
  112. "response": {
  113. "statusCode": 200,
  114. "text": {
  115. "id": "side-slash-arguments-parent-seed",
  116. "inputTokens": 128,
  117. "outputTokens": 12,
  118. "text": "upstream-e2e-ok"
  119. }
  120. }
  121. },
  122. {
  123. "id": "side-slash-arguments-side-idle",
  124. "description": "idle /side firstInput 的固定快速文本响应。",
  125. "metadata": {
  126. "kind": "main",
  127. "timingPolicy": "fast-text",
  128. "source": "synthetic",
  129. "syntheticReason": "idle alias 断言只需稳定的 child 文本响应。"
  130. },
  131. "match": {
  132. "method": "POST",
  133. "pathIncludes": "/messages",
  134. "lastUserMessageIncludes": ["E2E_SLASH_SIDE_IDLE"],
  135. "bodyIncludes": ["E2E_SLASH_SIDE_IDLE"],
  136. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  137. },
  138. "response": {
  139. "statusCode": 200,
  140. "text": {
  141. "id": "side-slash-arguments-side-idle",
  142. "inputTokens": 128,
  143. "outputTokens": 12,
  144. "text": "upstream-e2e-ok"
  145. }
  146. }
  147. },
  148. {
  149. "id": "side-slash-arguments-btw-multiline",
  150. "description": "带外层空白和内部换行的 /btw firstInput 固定响应。",
  151. "metadata": {
  152. "kind": "main",
  153. "timingPolicy": "fast-text",
  154. "source": "synthetic",
  155. "syntheticReason": "验证 parser trim 边界与多行参数保留。"
  156. },
  157. "match": {
  158. "method": "POST",
  159. "pathIncludes": "/messages",
  160. "lastUserMessageIncludes": ["E2E_SLASH_BTW_MULTILINE"],
  161. "bodyIncludes": ["E2E_SLASH_BTW_MULTILINE"],
  162. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  163. },
  164. "response": {
  165. "statusCode": 200,
  166. "text": {
  167. "id": "side-slash-arguments-btw-multiline",
  168. "inputTokens": 128,
  169. "outputTokens": 12,
  170. "text": "upstream-e2e-ok"
  171. }
  172. }
  173. },
  174. {
  175. "id": "side-slash-arguments-second-side",
  176. "description": "连续提交组合中的 /side child 响应。",
  177. "metadata": {
  178. "kind": "main",
  179. "timingPolicy": "fast-text",
  180. "source": "synthetic",
  181. "syntheticReason": "连续 child 创建只需稳定响应,验证不复用 child。"
  182. },
  183. "match": {
  184. "method": "POST",
  185. "pathIncludes": "/messages",
  186. "lastUserMessageIncludes": ["E2E_SLASH_SECOND_SIDE"],
  187. "bodyIncludes": ["E2E_SLASH_SECOND_SIDE"],
  188. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  189. },
  190. "response": {
  191. "statusCode": 200,
  192. "text": {
  193. "id": "side-slash-arguments-second-side",
  194. "inputTokens": 128,
  195. "outputTokens": 12,
  196. "text": "upstream-e2e-ok"
  197. }
  198. }
  199. },
  200. {
  201. "id": "side-slash-arguments-second-btw",
  202. "description": "连续提交组合中的 /btw child 响应。",
  203. "metadata": {
  204. "kind": "main",
  205. "timingPolicy": "fast-text",
  206. "source": "synthetic",
  207. "syntheticReason": "连续 child 创建只需稳定响应,验证不复用 child。"
  208. },
  209. "match": {
  210. "method": "POST",
  211. "pathIncludes": "/messages",
  212. "lastUserMessageIncludes": ["E2E_SLASH_SECOND_BTW"],
  213. "bodyIncludes": ["E2E_SLASH_SECOND_BTW"],
  214. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  215. },
  216. "response": {
  217. "statusCode": 200,
  218. "text": {
  219. "id": "side-slash-arguments-second-btw",
  220. "inputTokens": 128,
  221. "outputTokens": 12,
  222. "text": "upstream-e2e-ok"
  223. }
  224. }
  225. },
  226. {
  227. "id": "side-slash-arguments-running-child",
  228. "description": "父任务 running 时 /btw child 的固定快速响应。",
  229. "metadata": {
  230. "kind": "main",
  231. "timingPolicy": "fast-text",
  232. "source": "synthetic",
  233. "syntheticReason": "child startNow 断言需要在父 controlled stream 期间快速完成。"
  234. },
  235. "match": {
  236. "method": "POST",
  237. "pathIncludes": "/messages",
  238. "lastUserMessageIncludes": ["E2E_SLASH_RUNNING_CHILD"],
  239. "bodyIncludes": ["E2E_SLASH_RUNNING_CHILD"],
  240. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  241. },
  242. "response": {
  243. "statusCode": 200,
  244. "text": {
  245. "id": "side-slash-arguments-running-child",
  246. "inputTokens": 128,
  247. "outputTokens": 12,
  248. "text": "upstream-e2e-ok"
  249. }
  250. }
  251. }
  252. ]
  253. }