conversation-session-tool-group-settings-persistence.json 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-tool-group-settings-persistence",
  4. "spec": "./test/e2e/conversation-session/conversation-session-tool-group-settings-persistence.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "tge06-title",
  8. "description": "TGE06 title sidecar response.",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "标题不参与分组设置持久化语义;case-local 固定响应保证 strict replay 不依赖 legacy fixture 池。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "tge06-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"Tool Group Settings E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "tge06-read",
  32. "description": "TGE06 creates the Explore history segment with two consecutive Read tools.",
  33. "metadata": {
  34. "kind": "main",
  35. "source": "synthetic",
  36. "timingPolicy": "tool-use",
  37. "syntheticReason": "每个家族固定两个连续工具,满足父分组创建条件并验证设置切换后只重分组对应家族。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_TOOL_GROUP_SETTINGS_PERSISTENCE"],
  44. "bodyExcludes": ["Generate a concise title", "toolu_tge06_read_1", "toolu_tge06_read_2"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "toolUses": [
  49. {
  50. "id": "toolu_tge06_read_1",
  51. "name": "Read",
  52. "input": {
  53. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/seed-a.txt"
  54. }
  55. },
  56. {
  57. "id": "toolu_tge06_read_2",
  58. "name": "Read",
  59. "input": {
  60. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/seed-b.txt"
  61. }
  62. }
  63. ]
  64. }
  65. },
  66. {
  67. "id": "tge06-compact-after-read",
  68. "description": "TGE06 compact sidecar after the Read pair.",
  69. "metadata": {
  70. "kind": "main",
  71. "source": "synthetic",
  72. "timingPolicy": "fast-text",
  73. "syntheticReason": "E2E 极小 context window 在首组工具后触发自动 compact;摘要保留 marker 与两个 Read tool id,让后续 Bash matcher 继续命中。"
  74. },
  75. "maxMatches": 1,
  76. "match": {
  77. "method": "POST",
  78. "pathIncludes": "/messages",
  79. "bodyIncludes": [
  80. "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE",
  81. "toolu_tge06_read_1",
  82. "toolu_tge06_read_2",
  83. "CRITICAL: Respond with TEXT ONLY"
  84. ],
  85. "bodyExcludes": [
  86. "toolu_tge06_terminal_1",
  87. "toolu_tge06_terminal_2",
  88. "toolu_tge06_write_1",
  89. "toolu_tge06_write_2",
  90. "Generate a concise title"
  91. ]
  92. },
  93. "response": {
  94. "statusCode": 200,
  95. "text": {
  96. "id": "tge06-compact-after-read",
  97. "inputTokens": 128,
  98. "outputTokens": 20,
  99. "text": "<summary>E2E_TOOL_GROUP_SETTINGS_PERSISTENCE completed Reads toolu_tge06_read_1 and toolu_tge06_read_2. Continue with Bash.</summary>"
  100. }
  101. }
  102. },
  103. {
  104. "id": "tge06-compact-after-terminal",
  105. "description": "TGE06 compact sidecar after the terminal pair.",
  106. "metadata": {
  107. "kind": "main",
  108. "source": "synthetic",
  109. "timingPolicy": "fast-text",
  110. "syntheticReason": "E2E 极小 context window 在第二组工具后触发自动 compact;摘要保留 marker 与两个 Bash tool id,让后续 Write matcher 继续命中。"
  111. },
  112. "maxMatches": 1,
  113. "match": {
  114. "method": "POST",
  115. "pathIncludes": "/messages",
  116. "bodyIncludes": [
  117. "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE",
  118. "toolu_tge06_terminal_1",
  119. "toolu_tge06_terminal_2",
  120. "CRITICAL: Respond with TEXT ONLY"
  121. ],
  122. "bodyExcludes": ["toolu_tge06_write_1", "toolu_tge06_write_2", "Generate a concise title"]
  123. },
  124. "response": {
  125. "statusCode": 200,
  126. "text": {
  127. "id": "tge06-compact-after-terminal",
  128. "inputTokens": 128,
  129. "outputTokens": 24,
  130. "text": "<summary>E2E_TOOL_GROUP_SETTINGS_PERSISTENCE completed Reads toolu_tge06_read_1/toolu_tge06_read_2 and Bash tools toolu_tge06_terminal_1/toolu_tge06_terminal_2. Continue with Write.</summary>"
  131. }
  132. }
  133. },
  134. {
  135. "id": "tge06-terminal",
  136. "description": "TGE06 creates the Terminal history segment with two consecutive Bash tools.",
  137. "metadata": {
  138. "kind": "main",
  139. "source": "synthetic",
  140. "timingPolicy": "tool-use",
  141. "syntheticReason": "固定两个连续命令工具,满足 Terminal 父分组创建条件并验证开关独立于另外两类分组。"
  142. },
  143. "maxMatches": 1,
  144. "match": {
  145. "method": "POST",
  146. "pathIncludes": "/messages",
  147. "bodyIncludes": [
  148. "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE",
  149. "toolu_tge06_read_1",
  150. "toolu_tge06_read_2"
  151. ],
  152. "bodyExcludes": [
  153. "Generate a concise title",
  154. "toolu_tge06_terminal_1",
  155. "toolu_tge06_terminal_2"
  156. ]
  157. },
  158. "response": {
  159. "statusCode": 200,
  160. "toolUses": [
  161. {
  162. "id": "toolu_tge06_terminal_1",
  163. "name": "Bash",
  164. "input": { "command": "node -e \"console.log('TGE06_TERMINAL_A')\"" }
  165. },
  166. {
  167. "id": "toolu_tge06_terminal_2",
  168. "name": "Bash",
  169. "input": { "command": "node -e \"console.log('TGE06_TERMINAL_B')\"" }
  170. }
  171. ]
  172. }
  173. },
  174. {
  175. "id": "tge06-write",
  176. "description": "TGE06 creates the Changes history segment with two consecutive Write tools.",
  177. "metadata": {
  178. "kind": "main",
  179. "source": "synthetic",
  180. "timingPolicy": "tool-use",
  181. "syntheticReason": "固定两个连续写文件工具,满足 Changes 父分组创建条件并验证默认关闭的 Changes 开启后参与历史重分组。"
  182. },
  183. "maxMatches": 1,
  184. "match": {
  185. "method": "POST",
  186. "pathIncludes": "/messages",
  187. "bodyIncludes": [
  188. "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE",
  189. "toolu_tge06_terminal_1",
  190. "toolu_tge06_terminal_2"
  191. ],
  192. "bodyExcludes": ["Generate a concise title", "toolu_tge06_write_1", "toolu_tge06_write_2"]
  193. },
  194. "response": {
  195. "statusCode": 200,
  196. "toolUses": [
  197. {
  198. "id": "toolu_tge06_write_1",
  199. "name": "Write",
  200. "input": {
  201. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/result-a.ts",
  202. "content": "export const grouped = true;\n"
  203. }
  204. },
  205. {
  206. "id": "toolu_tge06_write_2",
  207. "name": "Write",
  208. "input": {
  209. "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/result-b.ts",
  210. "content": "export const grouped = true;\n"
  211. }
  212. }
  213. ]
  214. }
  215. },
  216. {
  217. "id": "tge06-final",
  218. "description": "TGE06 closes the tool history.",
  219. "metadata": {
  220. "kind": "main",
  221. "source": "synthetic",
  222. "timingPolicy": "fast-text",
  223. "syntheticReason": "固定终态文本,使设置切换断言只观察已完成历史。"
  224. },
  225. "maxMatches": 1,
  226. "match": {
  227. "method": "POST",
  228. "pathIncludes": "/messages",
  229. "bodyIncludes": [
  230. "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE",
  231. "toolu_tge06_write_1",
  232. "toolu_tge06_write_2"
  233. ],
  234. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  235. },
  236. "response": { "statusCode": 200, "text": "upstream-e2e-ok" }
  237. },
  238. {
  239. "id": "tge06-compact-after-write",
  240. "description": "TGE06 compact sidecar after the Write pair.",
  241. "metadata": {
  242. "kind": "main",
  243. "source": "synthetic",
  244. "timingPolicy": "fast-text",
  245. "syntheticReason": "第三组工具后的自动 compact 保留全部 tool id,使最终响应 matcher 可继续命中。"
  246. },
  247. "maxMatches": 1,
  248. "match": {
  249. "method": "POST",
  250. "pathIncludes": "/messages",
  251. "bodyIncludes": [
  252. "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE",
  253. "toolu_tge06_write_1",
  254. "toolu_tge06_write_2",
  255. "CRITICAL: Respond with TEXT ONLY"
  256. ],
  257. "bodyExcludes": ["Generate a concise title"]
  258. },
  259. "response": {
  260. "statusCode": 200,
  261. "text": {
  262. "id": "tge06-compact-after-write",
  263. "inputTokens": 128,
  264. "outputTokens": 24,
  265. "text": "<summary>E2E_TOOL_GROUP_SETTINGS_PERSISTENCE completed both Read, Bash, and Write tool pairs. Return upstream-e2e-ok.</summary>"
  266. }
  267. }
  268. }
  269. ]
  270. }