conversation-session-tool-groups-history-restore.json 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-tool-groups-history-restore",
  4. "spec": "./test/e2e/conversation-session/tools/conversation-session-tool-groups-history-restore.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "tool-groups-history-restore-title-sidecar",
  8. "description": "本例标题旁路响应,防止 strict replay 依赖 legacy fixture。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "运行时证据显示 session_title 旁路缺少 fixture;固定标题响应隔离标题生成,主用例不验证标题内容。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"msg_tool-groups-history-restore-title-sidecar\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"E2E regression task\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"output_tokens\":8}}"
  26. }
  27. },
  28. {
  29. "id": "tge05-read",
  30. "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
  31. "metadata": {
  32. "kind": "main",
  33. "source": "synthetic",
  34. "timingPolicy": "tool-use",
  35. "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
  36. },
  37. "maxMatches": 1,
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/messages",
  41. "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE"],
  42. "bodyExcludes": ["Generate a concise title", "toolu_tge05_read"]
  43. },
  44. "response": {
  45. "statusCode": 200,
  46. "toolUse": {
  47. "id": "toolu_tge05_read",
  48. "name": "Read",
  49. "input": {
  50. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/read.txt"
  51. }
  52. }
  53. }
  54. },
  55. {
  56. "id": "tge05-read-b",
  57. "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
  58. "metadata": {
  59. "kind": "main",
  60. "source": "synthetic",
  61. "timingPolicy": "tool-use",
  62. "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
  63. },
  64. "maxMatches": 1,
  65. "match": {
  66. "method": "POST",
  67. "pathIncludes": "/messages",
  68. "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_read"],
  69. "bodyExcludes": ["Generate a concise title", "toolu_tge05_read-b"]
  70. },
  71. "response": {
  72. "statusCode": 200,
  73. "toolUse": {
  74. "id": "toolu_tge05_read-b",
  75. "name": "Read",
  76. "input": {
  77. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/read.txt"
  78. }
  79. }
  80. }
  81. },
  82. {
  83. "id": "tge05-execute",
  84. "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
  85. "metadata": {
  86. "kind": "main",
  87. "source": "synthetic",
  88. "timingPolicy": "tool-use",
  89. "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
  90. },
  91. "maxMatches": 1,
  92. "match": {
  93. "method": "POST",
  94. "pathIncludes": "/messages",
  95. "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_read-b"],
  96. "bodyExcludes": ["Generate a concise title", "toolu_tge05_execute"]
  97. },
  98. "response": {
  99. "statusCode": 200,
  100. "toolUse": {
  101. "id": "toolu_tge05_execute",
  102. "name": "Bash",
  103. "input": {
  104. "command": "node -e \"console.log('TGE05_EXEC_A')\""
  105. }
  106. }
  107. }
  108. },
  109. {
  110. "id": "tge05-execute-b",
  111. "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
  112. "metadata": {
  113. "kind": "main",
  114. "source": "synthetic",
  115. "timingPolicy": "tool-use",
  116. "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
  117. },
  118. "maxMatches": 1,
  119. "match": {
  120. "method": "POST",
  121. "pathIncludes": "/messages",
  122. "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_execute"],
  123. "bodyExcludes": ["Generate a concise title", "toolu_tge05_execute-b"]
  124. },
  125. "response": {
  126. "statusCode": 200,
  127. "toolUse": {
  128. "id": "toolu_tge05_execute-b",
  129. "name": "Bash",
  130. "input": {
  131. "command": "node -e \"console.log('TGE05_EXEC_B')\""
  132. }
  133. }
  134. }
  135. },
  136. {
  137. "id": "tge05-write",
  138. "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
  139. "metadata": {
  140. "kind": "main",
  141. "source": "synthetic",
  142. "timingPolicy": "tool-use",
  143. "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
  144. },
  145. "maxMatches": 1,
  146. "match": {
  147. "method": "POST",
  148. "pathIncludes": "/messages",
  149. "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_execute-b"],
  150. "bodyExcludes": ["Generate a concise title", "toolu_tge05_write"]
  151. },
  152. "response": {
  153. "statusCode": 200,
  154. "toolUse": {
  155. "id": "toolu_tge05_write",
  156. "name": "Write",
  157. "input": {
  158. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/write.ts",
  159. "content": "export const restored = true;\n"
  160. }
  161. }
  162. }
  163. },
  164. {
  165. "id": "tge05-edit",
  166. "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
  167. "metadata": {
  168. "kind": "main",
  169. "source": "synthetic",
  170. "timingPolicy": "tool-use",
  171. "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
  172. },
  173. "maxMatches": 1,
  174. "match": {
  175. "method": "POST",
  176. "pathIncludes": "/messages",
  177. "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_write"],
  178. "bodyExcludes": ["Generate a concise title", "toolu_tge05_edit"]
  179. },
  180. "response": {
  181. "statusCode": 200,
  182. "toolUse": {
  183. "id": "toolu_tge05_edit",
  184. "name": "Edit",
  185. "input": {
  186. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/write.ts",
  187. "old_string": "true",
  188. "new_string": "false"
  189. }
  190. }
  191. }
  192. },
  193. {
  194. "id": "tge05-final",
  195. "description": "全部工具执行后结束当前轮。",
  196. "metadata": {
  197. "kind": "main",
  198. "source": "synthetic",
  199. "timingPolicy": "fast-text",
  200. "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
  201. },
  202. "maxMatches": 1,
  203. "match": {
  204. "method": "POST",
  205. "pathIncludes": "/messages",
  206. "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_edit"],
  207. "bodyExcludes": ["Generate a concise title"]
  208. },
  209. "response": {
  210. "statusCode": 200,
  211. "text": "upstream-e2e-ok"
  212. }
  213. }
  214. ]
  215. }