{ "version": 1, "caseName": "conversation-session-tool-group-settings-persistence", "spec": "./test/e2e/conversation-session/conversation-session-tool-group-settings-persistence.test.ts", "fixtures": [ { "id": "tge06-title", "description": "TGE06 title sidecar response.", "metadata": { "kind": "common", "source": "synthetic", "timingPolicy": "fast-text", "syntheticReason": "标题不参与分组设置持久化语义;case-local 固定响应保证 strict replay 不依赖 legacy fixture 池。" }, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["Generate a concise title", "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE"] }, "response": { "statusCode": 200, "text": { "id": "tge06-title", "inputTokens": 64, "outputTokens": 8, "text": "{\"title\":\"Tool Group Settings E2E\"}" } } }, { "id": "tge06-read", "description": "TGE06 creates the Explore history segment with two consecutive Read tools.", "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "tool-use", "syntheticReason": "每个家族固定两个连续工具,满足父分组创建条件并验证设置切换后只重分组对应家族。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_TOOL_GROUP_SETTINGS_PERSISTENCE"], "bodyExcludes": ["Generate a concise title", "toolu_tge06_read_1", "toolu_tge06_read_2"] }, "response": { "statusCode": 200, "toolUses": [ { "id": "toolu_tge06_read_1", "name": "Read", "input": { "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/seed-a.txt" } }, { "id": "toolu_tge06_read_2", "name": "Read", "input": { "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/seed-b.txt" } } ] } }, { "id": "tge06-compact-after-read", "description": "TGE06 compact sidecar after the Read pair.", "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "fast-text", "syntheticReason": "E2E 极小 context window 在首组工具后触发自动 compact;摘要保留 marker 与两个 Read tool id,让后续 Bash matcher 继续命中。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE", "toolu_tge06_read_1", "toolu_tge06_read_2", "CRITICAL: Respond with TEXT ONLY" ], "bodyExcludes": [ "toolu_tge06_terminal_1", "toolu_tge06_terminal_2", "toolu_tge06_write_1", "toolu_tge06_write_2", "Generate a concise title" ] }, "response": { "statusCode": 200, "text": { "id": "tge06-compact-after-read", "inputTokens": 128, "outputTokens": 20, "text": "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE completed Reads toolu_tge06_read_1 and toolu_tge06_read_2. Continue with Bash." } } }, { "id": "tge06-compact-after-terminal", "description": "TGE06 compact sidecar after the terminal pair.", "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "fast-text", "syntheticReason": "E2E 极小 context window 在第二组工具后触发自动 compact;摘要保留 marker 与两个 Bash tool id,让后续 Write matcher 继续命中。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE", "toolu_tge06_terminal_1", "toolu_tge06_terminal_2", "CRITICAL: Respond with TEXT ONLY" ], "bodyExcludes": ["toolu_tge06_write_1", "toolu_tge06_write_2", "Generate a concise title"] }, "response": { "statusCode": 200, "text": { "id": "tge06-compact-after-terminal", "inputTokens": 128, "outputTokens": 24, "text": "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." } } }, { "id": "tge06-terminal", "description": "TGE06 creates the Terminal history segment with two consecutive Bash tools.", "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "tool-use", "syntheticReason": "固定两个连续命令工具,满足 Terminal 父分组创建条件并验证开关独立于另外两类分组。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE", "toolu_tge06_read_1", "toolu_tge06_read_2" ], "bodyExcludes": [ "Generate a concise title", "toolu_tge06_terminal_1", "toolu_tge06_terminal_2" ] }, "response": { "statusCode": 200, "toolUses": [ { "id": "toolu_tge06_terminal_1", "name": "Bash", "input": { "command": "node -e \"console.log('TGE06_TERMINAL_A')\"" } }, { "id": "toolu_tge06_terminal_2", "name": "Bash", "input": { "command": "node -e \"console.log('TGE06_TERMINAL_B')\"" } } ] } }, { "id": "tge06-write", "description": "TGE06 creates the Changes history segment with two consecutive Write tools.", "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "tool-use", "syntheticReason": "固定两个连续写文件工具,满足 Changes 父分组创建条件并验证默认关闭的 Changes 开启后参与历史重分组。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE", "toolu_tge06_terminal_1", "toolu_tge06_terminal_2" ], "bodyExcludes": ["Generate a concise title", "toolu_tge06_write_1", "toolu_tge06_write_2"] }, "response": { "statusCode": 200, "toolUses": [ { "id": "toolu_tge06_write_1", "name": "Write", "input": { "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/result-a.ts", "content": "export const grouped = true;\n" } }, { "id": "toolu_tge06_write_2", "name": "Write", "input": { "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-group-settings-persistence/result-b.ts", "content": "export const grouped = true;\n" } } ] } }, { "id": "tge06-final", "description": "TGE06 closes the tool history.", "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "fast-text", "syntheticReason": "固定终态文本,使设置切换断言只观察已完成历史。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE", "toolu_tge06_write_1", "toolu_tge06_write_2" ], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": "upstream-e2e-ok" } }, { "id": "tge06-compact-after-write", "description": "TGE06 compact sidecar after the Write pair.", "metadata": { "kind": "main", "source": "synthetic", "timingPolicy": "fast-text", "syntheticReason": "第三组工具后的自动 compact 保留全部 tool id,使最终响应 matcher 可继续命中。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE", "toolu_tge06_write_1", "toolu_tge06_write_2", "CRITICAL: Respond with TEXT ONLY" ], "bodyExcludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "text": { "id": "tge06-compact-after-write", "inputTokens": 128, "outputTokens": 24, "text": "E2E_TOOL_GROUP_SETTINGS_PERSISTENCE completed both Read, Bash, and Write tool pairs. Return upstream-e2e-ok." } } } ] }