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

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