| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- {
- "version": 1,
- "caseName": "conversation-session-tool-groups-history-restore",
- "spec": "./test/e2e/conversation-session/tools/conversation-session-tool-groups-history-restore.test.ts",
- "fixtures": [
- {
- "id": "tool-groups-history-restore-title-sidecar",
- "description": "本例标题旁路响应,防止 strict replay 依赖 legacy fixture。",
- "metadata": {
- "kind": "common",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "运行时证据显示 session_title 旁路缺少 fixture;固定标题响应隔离标题生成,主用例不验证标题内容。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "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}}"
- }
- },
- {
- "id": "tge05-read",
- "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "tool-use",
- "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE"],
- "bodyExcludes": ["Generate a concise title", "toolu_tge05_read"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_tge05_read",
- "name": "Read",
- "input": {
- "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/read.txt"
- }
- }
- }
- },
- {
- "id": "tge05-read-b",
- "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "tool-use",
- "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_read"],
- "bodyExcludes": ["Generate a concise title", "toolu_tge05_read-b"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_tge05_read-b",
- "name": "Read",
- "input": {
- "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/read.txt"
- }
- }
- }
- },
- {
- "id": "tge05-execute",
- "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "tool-use",
- "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_read-b"],
- "bodyExcludes": ["Generate a concise title", "toolu_tge05_execute"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_tge05_execute",
- "name": "Bash",
- "input": {
- "command": "node -e \"console.log('TGE05_EXEC_A')\""
- }
- }
- }
- },
- {
- "id": "tge05-execute-b",
- "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "tool-use",
- "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_execute"],
- "bodyExcludes": ["Generate a concise title", "toolu_tge05_execute-b"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_tge05_execute-b",
- "name": "Bash",
- "input": {
- "command": "node -e \"console.log('TGE05_EXEC_B')\""
- }
- }
- }
- },
- {
- "id": "tge05-write",
- "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "tool-use",
- "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_execute-b"],
- "bodyExcludes": ["Generate a concise title", "toolu_tge05_write"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_tge05_write",
- "name": "Write",
- "input": {
- "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/write.ts",
- "content": "export const restored = true;\n"
- }
- }
- }
- },
- {
- "id": "tge05-edit",
- "description": "两条同类真实工具构成分组,冷恢复验证终态、顺序和子项。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "tool-use",
- "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_write"],
- "bodyExcludes": ["Generate a concise title", "toolu_tge05_edit"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_tge05_edit",
- "name": "Edit",
- "input": {
- "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-groups-history-restore/write.ts",
- "old_string": "true",
- "new_string": "false"
- }
- }
- }
- },
- {
- "id": "tge05-final",
- "description": "全部工具执行后结束当前轮。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定三类 group 的最小历史,验证 cold restore。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_TOOL_GROUPS_HISTORY_RESTORE", "toolu_tge05_edit"],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "text": "upstream-e2e-ok"
- }
- }
- ]
- }
|