conversation-session-guarded-batch-delete.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-guarded-batch-delete",
  4. "spec": "./test/e2e/conversation-session/task-management/conversation-session-guarded-batch-delete.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "batch-delete-title",
  8. "description": "Case-local title",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "隔离标题 sidecar,不依赖真实模型。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_GUARDED_DELETE_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"batch-delete-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Batch deletion E2E\\\"}\"}],\"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": "E2E_GUARDED_DELETE_RECURSIVE-call",
  30. "description": "Batch deletion tool call",
  31. "metadata": {
  32. "kind": "main",
  33. "timingPolicy": "fast-text",
  34. "source": "synthetic",
  35. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  36. },
  37. "match": {
  38. "method": "POST",
  39. "pathIncludes": "/messages",
  40. "bodyIncludes": ["E2E_GUARDED_DELETE_RECURSIVE"],
  41. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  42. "lastUserMessageIncludes": ["E2E_GUARDED_DELETE_RECURSIVE"]
  43. },
  44. "response": {
  45. "statusCode": 200,
  46. "toolUse": {
  47. "id": "toolu_E2E_GUARDED_DELETE_RECURSIVE",
  48. "name": "Bash",
  49. "input": {
  50. "command": "cd .zcode-e2e/conversation-session-guarded-batch-delete/E2E_GUARDED_DELETE_RECURSIVE && echo executed > executed && rm -r target"
  51. }
  52. }
  53. }
  54. },
  55. {
  56. "id": "E2E_GUARDED_DELETE_RECURSIVE-final",
  57. "description": "Batch deletion provider continuation",
  58. "metadata": {
  59. "kind": "main",
  60. "timingPolicy": "fast-text",
  61. "source": "synthetic",
  62. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  63. },
  64. "match": {
  65. "method": "POST",
  66. "pathIncludes": "/messages",
  67. "bodyIncludes": ["E2E_GUARDED_DELETE_RECURSIVE", "toolu_E2E_GUARDED_DELETE_RECURSIVE"],
  68. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  69. },
  70. "response": {
  71. "statusCode": 200,
  72. "text": {
  73. "id": "E2E_GUARDED_DELETE_RECURSIVE-final",
  74. "inputTokens": 80,
  75. "outputTokens": 8,
  76. "text": "E2E_GUARDED_DELETE_RECURSIVE_DONE"
  77. }
  78. }
  79. },
  80. {
  81. "id": "E2E_GUARDED_DELETE_BATCH-call",
  82. "description": "Batch deletion tool call",
  83. "metadata": {
  84. "kind": "main",
  85. "timingPolicy": "fast-text",
  86. "source": "synthetic",
  87. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  88. },
  89. "match": {
  90. "method": "POST",
  91. "pathIncludes": "/messages",
  92. "bodyIncludes": ["E2E_GUARDED_DELETE_BATCH"],
  93. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  94. "lastUserMessageIncludes": ["E2E_GUARDED_DELETE_BATCH"]
  95. },
  96. "response": {
  97. "statusCode": 200,
  98. "toolUse": {
  99. "id": "toolu_E2E_GUARDED_DELETE_BATCH",
  100. "name": "Bash",
  101. "input": {
  102. "command": "cd .zcode-e2e/conversation-session-guarded-batch-delete/E2E_GUARDED_DELETE_BATCH && echo executed > executed && rm one.txt two.txt"
  103. }
  104. }
  105. }
  106. },
  107. {
  108. "id": "E2E_GUARDED_DELETE_BATCH-final",
  109. "description": "Batch deletion provider continuation",
  110. "metadata": {
  111. "kind": "main",
  112. "timingPolicy": "fast-text",
  113. "source": "synthetic",
  114. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  115. },
  116. "match": {
  117. "method": "POST",
  118. "pathIncludes": "/messages",
  119. "bodyIncludes": ["E2E_GUARDED_DELETE_BATCH", "toolu_E2E_GUARDED_DELETE_BATCH"],
  120. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  121. },
  122. "response": {
  123. "statusCode": 200,
  124. "text": {
  125. "id": "E2E_GUARDED_DELETE_BATCH-final",
  126. "inputTokens": 80,
  127. "outputTokens": 8,
  128. "text": "E2E_GUARDED_DELETE_BATCH_DONE"
  129. }
  130. }
  131. },
  132. {
  133. "id": "E2E_GUARDED_DELETE_GLOB-call",
  134. "description": "Batch deletion tool call",
  135. "metadata": {
  136. "kind": "main",
  137. "timingPolicy": "fast-text",
  138. "source": "synthetic",
  139. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  140. },
  141. "match": {
  142. "method": "POST",
  143. "pathIncludes": "/messages",
  144. "bodyIncludes": ["E2E_GUARDED_DELETE_GLOB"],
  145. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  146. "lastUserMessageIncludes": ["E2E_GUARDED_DELETE_GLOB"]
  147. },
  148. "response": {
  149. "statusCode": 200,
  150. "toolUse": {
  151. "id": "toolu_E2E_GUARDED_DELETE_GLOB",
  152. "name": "Bash",
  153. "input": {
  154. "command": "cd .zcode-e2e/conversation-session-guarded-batch-delete/E2E_GUARDED_DELETE_GLOB && echo executed > executed && rm *.txt"
  155. }
  156. }
  157. }
  158. },
  159. {
  160. "id": "E2E_GUARDED_DELETE_GLOB-final",
  161. "description": "Batch deletion provider continuation",
  162. "metadata": {
  163. "kind": "main",
  164. "timingPolicy": "fast-text",
  165. "source": "synthetic",
  166. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  167. },
  168. "match": {
  169. "method": "POST",
  170. "pathIncludes": "/messages",
  171. "bodyIncludes": ["E2E_GUARDED_DELETE_GLOB", "toolu_E2E_GUARDED_DELETE_GLOB"],
  172. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  173. },
  174. "response": {
  175. "statusCode": 200,
  176. "text": {
  177. "id": "E2E_GUARDED_DELETE_GLOB-final",
  178. "inputTokens": 80,
  179. "outputTokens": 8,
  180. "text": "E2E_GUARDED_DELETE_GLOB_DONE"
  181. }
  182. }
  183. },
  184. {
  185. "id": "E2E_GUARDED_DELETE_FIND-call",
  186. "description": "Batch deletion tool call",
  187. "metadata": {
  188. "kind": "main",
  189. "timingPolicy": "fast-text",
  190. "source": "synthetic",
  191. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  192. },
  193. "match": {
  194. "method": "POST",
  195. "pathIncludes": "/messages",
  196. "bodyIncludes": ["E2E_GUARDED_DELETE_FIND"],
  197. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  198. "lastUserMessageIncludes": ["E2E_GUARDED_DELETE_FIND"]
  199. },
  200. "response": {
  201. "statusCode": 200,
  202. "toolUse": {
  203. "id": "toolu_E2E_GUARDED_DELETE_FIND",
  204. "name": "Bash",
  205. "input": {
  206. "command": "cd .zcode-e2e/conversation-session-guarded-batch-delete/E2E_GUARDED_DELETE_FIND && echo executed > executed && find target -type f -delete"
  207. }
  208. }
  209. }
  210. },
  211. {
  212. "id": "E2E_GUARDED_DELETE_FIND-final",
  213. "description": "Batch deletion provider continuation",
  214. "metadata": {
  215. "kind": "main",
  216. "timingPolicy": "fast-text",
  217. "source": "synthetic",
  218. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  219. },
  220. "match": {
  221. "method": "POST",
  222. "pathIncludes": "/messages",
  223. "bodyIncludes": ["E2E_GUARDED_DELETE_FIND", "toolu_E2E_GUARDED_DELETE_FIND"],
  224. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  225. },
  226. "response": {
  227. "statusCode": 200,
  228. "text": {
  229. "id": "E2E_GUARDED_DELETE_FIND-final",
  230. "inputTokens": 80,
  231. "outputTokens": 8,
  232. "text": "E2E_GUARDED_DELETE_FIND_DONE"
  233. }
  234. }
  235. },
  236. {
  237. "id": "E2E_GUARDED_DELETE_CLEAN-call",
  238. "description": "Batch deletion tool call",
  239. "metadata": {
  240. "kind": "main",
  241. "timingPolicy": "fast-text",
  242. "source": "synthetic",
  243. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  244. },
  245. "match": {
  246. "method": "POST",
  247. "pathIncludes": "/messages",
  248. "bodyIncludes": ["E2E_GUARDED_DELETE_CLEAN"],
  249. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  250. "lastUserMessageIncludes": ["E2E_GUARDED_DELETE_CLEAN"]
  251. },
  252. "response": {
  253. "statusCode": 200,
  254. "toolUse": {
  255. "id": "toolu_E2E_GUARDED_DELETE_CLEAN",
  256. "name": "Bash",
  257. "input": {
  258. "command": "cd .zcode-e2e/conversation-session-guarded-batch-delete/E2E_GUARDED_DELETE_CLEAN && echo executed > executed && git clean -f"
  259. }
  260. }
  261. }
  262. },
  263. {
  264. "id": "E2E_GUARDED_DELETE_CLEAN-final",
  265. "description": "Batch deletion provider continuation",
  266. "metadata": {
  267. "kind": "main",
  268. "timingPolicy": "fast-text",
  269. "source": "synthetic",
  270. "syntheticReason": "固定 case 自有目录内的删除命令;真实 broker 拒绝并向 provider 返回结果,不依赖模型随机行为。"
  271. },
  272. "match": {
  273. "method": "POST",
  274. "pathIncludes": "/messages",
  275. "bodyIncludes": ["E2E_GUARDED_DELETE_CLEAN", "toolu_E2E_GUARDED_DELETE_CLEAN"],
  276. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  277. },
  278. "response": {
  279. "statusCode": 200,
  280. "text": {
  281. "id": "E2E_GUARDED_DELETE_CLEAN-final",
  282. "inputTokens": 80,
  283. "outputTokens": 8,
  284. "text": "E2E_GUARDED_DELETE_CLEAN_DONE"
  285. }
  286. }
  287. }
  288. ]
  289. }