conversation-session-stop-tool-results.json 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-stop-tool-results",
  4. "spec": "./test/e2e/conversation-session/execution/conversation-session-stop-tool-results.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "stop-results-title",
  8. "description": "本例辅助标题",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "固定三个真实 Read:首个成功,后两个由隔离 PreToolUse Hook 挂起;在模型流完成后点击 Stop。只改变首个文件为文本或 PNG,不伪造工具结果或 SDK 错误。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_STOP_RESULTS_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"msg_upstream_e2e_text\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Stop tool results\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  26. }
  27. },
  28. {
  29. "id": "stop-results-text-tools",
  30. "description": "text 真实 Read 批次",
  31. "metadata": {
  32. "kind": "synthetic",
  33. "source": "synthetic",
  34. "timingPolicy": "controlled-stream",
  35. "syntheticReason": "固定三个真实 Read:首个成功,后两个由隔离 PreToolUse Hook 挂起;在模型流完成后点击 Stop。只改变首个文件为文本或 PNG,不伪造工具结果或 SDK 错误。"
  36. },
  37. "match": {
  38. "method": "POST",
  39. "pathIncludes": "/messages",
  40. "lastUserMessageIncludes": ["E2E_STOP_RESULTS_TEXT_START"],
  41. "bodyExcludes": [
  42. "Generate a concise title",
  43. "CRITICAL: Respond with TEXT ONLY",
  44. "toolu_stop_results_text_1"
  45. ]
  46. },
  47. "response": {
  48. "statusCode": 200,
  49. "toolUses": [
  50. {
  51. "id": "toolu_stop_results_text_1",
  52. "name": "Read",
  53. "input": {
  54. "file_path": "{{e2eRuntimeRoot}}/conversation-session-stop-tool-results/first.txt"
  55. }
  56. },
  57. {
  58. "id": "toolu_stop_results_text_2",
  59. "name": "Read",
  60. "input": {
  61. "file_path": "{{e2eRuntimeRoot}}/conversation-session-stop-tool-results/blocked-2.txt"
  62. }
  63. },
  64. {
  65. "id": "toolu_stop_results_text_3",
  66. "name": "Read",
  67. "input": {
  68. "file_path": "{{e2eRuntimeRoot}}/conversation-session-stop-tool-results/blocked-3.txt"
  69. }
  70. }
  71. ]
  72. }
  73. },
  74. {
  75. "id": "stop-results-text-followup",
  76. "description": "text Stop 后正常续聊",
  77. "metadata": {
  78. "kind": "main",
  79. "source": "synthetic",
  80. "timingPolicy": "fast-text",
  81. "syntheticReason": "固定三个真实 Read:首个成功,后两个由隔离 PreToolUse Hook 挂起;在模型流完成后点击 Stop。只改变首个文件为文本或 PNG,不伪造工具结果或 SDK 错误。"
  82. },
  83. "match": {
  84. "method": "POST",
  85. "pathIncludes": "/messages",
  86. "lastUserMessageIncludes": ["E2E_STOP_RESULTS_TEXT_FOLLOWUP"],
  87. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  88. },
  89. "response": {
  90. "statusCode": 200,
  91. "text": {
  92. "text": "STOP_RESULTS_TEXT_OK",
  93. "inputTokens": 96,
  94. "outputTokens": 8
  95. }
  96. }
  97. },
  98. {
  99. "id": "stop-results-image-tools",
  100. "description": "image 真实 Read 批次",
  101. "metadata": {
  102. "kind": "synthetic",
  103. "source": "synthetic",
  104. "timingPolicy": "controlled-stream",
  105. "syntheticReason": "固定三个真实 Read:首个成功,后两个由隔离 PreToolUse Hook 挂起;在模型流完成后点击 Stop。只改变首个文件为文本或 PNG,不伪造工具结果或 SDK 错误。"
  106. },
  107. "match": {
  108. "method": "POST",
  109. "pathIncludes": "/messages",
  110. "lastUserMessageIncludes": ["E2E_STOP_RESULTS_IMAGE_START"],
  111. "bodyExcludes": [
  112. "Generate a concise title",
  113. "CRITICAL: Respond with TEXT ONLY",
  114. "toolu_stop_results_image_1"
  115. ]
  116. },
  117. "response": {
  118. "statusCode": 200,
  119. "toolUses": [
  120. {
  121. "id": "toolu_stop_results_image_1",
  122. "name": "Read",
  123. "input": {
  124. "file_path": "{{e2eRuntimeRoot}}/conversation-session-stop-tool-results/first.png"
  125. }
  126. },
  127. {
  128. "id": "toolu_stop_results_image_2",
  129. "name": "Read",
  130. "input": {
  131. "file_path": "{{e2eRuntimeRoot}}/conversation-session-stop-tool-results/blocked-2.txt"
  132. }
  133. },
  134. {
  135. "id": "toolu_stop_results_image_3",
  136. "name": "Read",
  137. "input": {
  138. "file_path": "{{e2eRuntimeRoot}}/conversation-session-stop-tool-results/blocked-3.txt"
  139. }
  140. }
  141. ]
  142. }
  143. },
  144. {
  145. "id": "stop-results-image-followup",
  146. "description": "image Stop 后正常续聊",
  147. "metadata": {
  148. "kind": "main",
  149. "source": "synthetic",
  150. "timingPolicy": "fast-text",
  151. "syntheticReason": "固定三个真实 Read:首个成功,后两个由隔离 PreToolUse Hook 挂起;在模型流完成后点击 Stop。只改变首个文件为文本或 PNG,不伪造工具结果或 SDK 错误。"
  152. },
  153. "match": {
  154. "method": "POST",
  155. "pathIncludes": "/messages",
  156. "lastUserMessageIncludes": ["E2E_STOP_RESULTS_IMAGE_FOLLOWUP"],
  157. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  158. },
  159. "response": {
  160. "statusCode": 200,
  161. "text": {
  162. "text": "STOP_RESULTS_IMAGE_OK",
  163. "inputTokens": 96,
  164. "outputTokens": 8
  165. }
  166. }
  167. },
  168. {
  169. "id": "stop-results-db-tools",
  170. "description": "纯文本 Bash 工具调用",
  171. "metadata": {
  172. "kind": "synthetic",
  173. "source": "synthetic",
  174. "timingPolicy": "controlled-stream",
  175. "syntheticReason": "独立非媒体对照:真实 Bash 仅返回短文本;PostToolUse barrier 后持有隔离 SQLite 写锁,进入失败收尾后放锁再从 UI 续聊。对照组不持锁,均不点 Stop、不伪造工具结果或 SDK 错误。"
  176. },
  177. "match": {
  178. "method": "POST",
  179. "pathIncludes": "/messages",
  180. "lastUserMessageIncludes": ["E2E_STOP_RESULTS_DB_START"],
  181. "bodyExcludes": [
  182. "Generate a concise title",
  183. "CRITICAL: Respond with TEXT ONLY",
  184. "toolu_stop_results_db_bash"
  185. ]
  186. },
  187. "response": {
  188. "statusCode": 200,
  189. "toolUses": [
  190. {
  191. "id": "toolu_stop_results_db_bash",
  192. "name": "Bash",
  193. "input": {
  194. "command": "echo E2E_STOP_RESULTS_DB_OUTPUT"
  195. }
  196. }
  197. ]
  198. }
  199. },
  200. {
  201. "id": "stop-results-db-initial",
  202. "description": "纯文本 Bash 初始轮正常完成",
  203. "metadata": {
  204. "kind": "main",
  205. "source": "synthetic",
  206. "timingPolicy": "fast-text",
  207. "syntheticReason": "独立非媒体对照:真实 Bash 仅返回短文本;PostToolUse barrier 后持有隔离 SQLite 写锁,进入失败收尾后放锁再从 UI 续聊。对照组不持锁,均不点 Stop、不伪造工具结果或 SDK 错误。"
  208. },
  209. "match": {
  210. "method": "POST",
  211. "pathIncludes": "/messages",
  212. "bodyExcludes": [
  213. "Generate a concise title",
  214. "CRITICAL: Respond with TEXT ONLY",
  215. "E2E_STOP_RESULTS_DB_FOLLOWUP"
  216. ],
  217. "bodyIncludes": [
  218. "E2E_STOP_RESULTS_DB_START",
  219. "toolu_stop_results_db_bash",
  220. "E2E_STOP_RESULTS_DB_OUTPUT"
  221. ]
  222. },
  223. "response": {
  224. "statusCode": 200,
  225. "text": {
  226. "text": "STOP_RESULTS_DB_INITIAL_OK",
  227. "inputTokens": 96,
  228. "outputTokens": 8
  229. }
  230. }
  231. },
  232. {
  233. "id": "stop-results-db-followup",
  234. "description": "数据库恢复后续聊",
  235. "metadata": {
  236. "kind": "main",
  237. "source": "synthetic",
  238. "timingPolicy": "fast-text",
  239. "syntheticReason": "独立非媒体对照:真实 Bash 仅返回短文本;PostToolUse barrier 后持有隔离 SQLite 写锁,进入失败收尾后放锁再从 UI 续聊。对照组不持锁,均不点 Stop、不伪造工具结果或 SDK 错误。"
  240. },
  241. "match": {
  242. "method": "POST",
  243. "pathIncludes": "/messages",
  244. "lastUserMessageIncludes": ["E2E_STOP_RESULTS_DB_FOLLOWUP"],
  245. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  246. },
  247. "response": {
  248. "statusCode": 200,
  249. "text": {
  250. "text": "STOP_RESULTS_DB_OK",
  251. "inputTokens": 96,
  252. "outputTokens": 8
  253. }
  254. }
  255. }
  256. ]
  257. }