{ "version": 1, "caseName": "conversation-session-background-guide-steer", "spec": "./test/e2e/conversation-session/background/conversation-session-background-guide-steer.test.ts", "fixtures": [ { "id": "conversation-session-background-guide-steer-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-background-guide-steer-agent-tool-call", "description": "BG20: main agent launches a background Agent before the user sends guide text.", "metadata": { "kind": "main", "timingPolicy": "controlled-tool-use", "source": "synthetic", "syntheticReason": "延迟 Agent tool_use 响应,稳定覆盖 background Agent 创建过程中发送 guide 的窗口。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["E2E_BACKGROUND_GUIDE_STEER_LAUNCH"], "bodyExcludes": [ "Async agent launched successfully", "agentId: agent_", "Generate a concise title", "CRITICAL: Respond with TEXT ONLY", "Verify whether the active session goal" ], "lastUserMessageIncludes": ["E2E_BACKGROUND_GUIDE_STEER_LAUNCH"] }, "response": { "statusCode": 200, "delayMs": 5000, "toolUse": { "id": "toolu_e2e_background_guide_steer_agent", "name": "Agent", "input": { "description": "E2E background guide steer agent", "prompt": "E2E_BACKGROUND_GUIDE_STEER_CHILD: Reply exactly E2E_BACKGROUND_GUIDE_STEER_CHILD_DONE.", "run_in_background": true } } } }, { "id": "upstream-background-guide-steer-child-result", "description": "BG20: child Agent completes after a short delay.", "metadata": { "kind": "subagent", "timingPolicy": "delayed-text", "source": "synthetic", "syntheticReason": "延迟 background Agent completion,避免 notification 抢在 launch+guide 合流断言前完成。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["E2E_BACKGROUND_GUIDE_STEER_CHILD"], "bodyExcludes": [ "Generate a concise title", "CRITICAL: Respond with TEXT ONLY", "Verify whether the active session goal" ], "lastUserMessageExcludes": [""], "lastUserMessageIncludes": ["E2E_BACKGROUND_GUIDE_STEER_CHILD"] }, "response": { "statusCode": 200, "delayMs": 2500, "text": { "id": "upstream-e2e-background-guide-steer-child", "text": "E2E_BACKGROUND_GUIDE_STEER_CHILD_DONE" } } }, { "id": "upstream-background-guide-steer-launch-and-guide", "description": "BG20: parent consumes Agent launch tool result and guide text in the same model request.", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "验证 guide 文本随 background Agent launch tool result 合流,而不是进入普通 future queue。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "E2E_BACKGROUND_GUIDE_STEER_LAUNCH", "E2E_BACKGROUND_GUIDE_STEER_MESSAGE", "Async agent launched successfully" ], "bodyExcludes": [ "Generate a concise title", "CRITICAL: Respond with TEXT ONLY", "Verify whether the active session goal" ], "lastUserMessageExcludes": [""] }, "response": { "statusCode": 200, "text": { "id": "upstream-e2e-background-guide-steer-launch-consumed", "text": "background-guide-steer-launch-consumed-ok" } } }, { "id": "upstream-background-guide-steer-notification-consumed", "description": "BG20: parent consumes background Agent completion notification.", "metadata": { "kind": "main", "timingPolicy": "task-notification", "source": "synthetic", "syntheticReason": "验证 launch+guide 合流后 background Agent completion notification 仍按标准链路消费。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["", "E2E_BACKGROUND_GUIDE_STEER_CHILD_DONE"], "bodyExcludes": [ "Generate a concise title", "CRITICAL: Respond with TEXT ONLY", "Verify whether the active session goal" ], "lastUserMessageIncludes": [""] }, "response": { "statusCode": 200, "text": { "id": "upstream-e2e-background-guide-steer-notification", "text": "background-guide-steer-notification-consumed-ok" } } } ] }