| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- {
- "version": 1,
- "caseName": "conversation-session-plan-approval-feedback-user-message",
- "spec": "./test/e2e/conversation-session/planning/conversation-session-plan-approval-feedback-user-message.test.ts",
- "fixtures": [
- {
- "id": "conversation-session-plan-approval-feedback-user-message-title-sidecar",
- "description": "本例标题旁路响应。",
- "metadata": {
- "kind": "common",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy fixture 或触发后台网络重试。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"upstream-e2e-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
- }
- },
- {
- "id": "upstream-conversation-plan-approval-enter-plan-call",
- "description": "首轮请求稳定返回 EnterPlanMode 工具调用,制造 plan mode 审批前置状态。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "需要稳定制造 plan mode 状态,避免依赖真实模型是否选择 EnterPlanMode。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_PLAN_APPROVAL_FEEDBACK_USER_MESSAGE"],
- "bodyIncludes": [
- "E2E_PLAN_APPROVAL_FEEDBACK_USER_MESSAGE",
- "E2E_PLAN_APPROVAL_ENTER_PLAN",
- "E2E_PLAN_APPROVAL_EXIT_PLAN"
- ],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_e2e_plan_approval_enter_plan_mode",
- "name": "EnterPlanMode",
- "input": {}
- }
- }
- },
- {
- "id": "upstream-conversation-plan-approval-exit-plan-call",
- "description": "进入 plan mode 后返回 ExitPlanMode 工具调用,触发审批弹窗。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "需要稳定触发 ExitPlanMode 审批弹窗,避免模型输出文本而跳过工具。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_PLAN_APPROVAL_EXIT_PLAN", "toolu_e2e_plan_approval_enter_plan_mode"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_e2e_plan_approval_exit_plan_mode",
- "name": "ExitPlanMode",
- "input": {
- "plan": "E2E_PLAN_APPROVAL_PLAN_BODY: 1. Add runtime bridge. 2. Add UI regression coverage."
- }
- }
- }
- },
- {
- "id": "upstream-conversation-plan-approval-feedback-final",
- "description": "审批 custom feedback 被续作用户消息后返回最终文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "需要断言 custom feedback 出现在下一轮用户消息,而不是被塞回 ExitPlanMode tool_result。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_PLAN_APPROVAL_FEEDBACK"],
- "bodyIncludes": [
- "E2E_PLAN_APPROVAL_FEEDBACK",
- "E2E_PLAN_APPROVAL_EXIT_PLAN",
- "toolu_e2e_plan_approval_exit_plan_mode",
- "The plan was not approved by the user."
- ],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": "upstream-e2e-ok"
- }
- }
- ]
- }
|