| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- {
- "version": 1,
- "caseName": "conversation-session-subagent-parallel-projection",
- "spec": "./test/e2e/conversation-session/subagents/conversation-session-subagent-parallel-projection.test.ts",
- "fixtures": [
- {
- "id": "conversation-session-subagent-parallel-projection-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": "subagent-parallel-projection-parent-launch",
- "description": "父模型在同一回复中并行启动 7 个 foreground Agent。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-tool-use",
- "source": "synthetic",
- "syntheticReason": "固定产生 7 个并行 Agent tool calls,稳定覆盖 child persist 与父投影发布的竞态窗口。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT"],
- "bodyIncludes": [
- "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT",
- "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT_DONE"
- ],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "toolUses": [
- {
- "id": "toolu_e2e_parallel_subagent_01",
- "name": "Agent",
- "input": {
- "description": "E2E parallel child 01",
- "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_01: wait for the controlled response and return it.",
- "subagent_type": "general-purpose"
- }
- },
- {
- "id": "toolu_e2e_parallel_subagent_02",
- "name": "Agent",
- "input": {
- "description": "E2E parallel child 02",
- "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_02: wait for the controlled response and return it.",
- "subagent_type": "general-purpose"
- }
- },
- {
- "id": "toolu_e2e_parallel_subagent_03",
- "name": "Agent",
- "input": {
- "description": "E2E parallel child 03",
- "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_03: wait for the controlled response and return it.",
- "subagent_type": "general-purpose"
- }
- },
- {
- "id": "toolu_e2e_parallel_subagent_04",
- "name": "Agent",
- "input": {
- "description": "E2E parallel child 04",
- "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_04: wait for the controlled response and return it.",
- "subagent_type": "general-purpose"
- }
- },
- {
- "id": "toolu_e2e_parallel_subagent_05",
- "name": "Agent",
- "input": {
- "description": "E2E parallel child 05",
- "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_05: wait for the controlled response and return it.",
- "subagent_type": "general-purpose"
- }
- },
- {
- "id": "toolu_e2e_parallel_subagent_06",
- "name": "Agent",
- "input": {
- "description": "E2E parallel child 06",
- "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_06: wait for the controlled response and return it.",
- "subagent_type": "general-purpose"
- }
- },
- {
- "id": "toolu_e2e_parallel_subagent_07",
- "name": "Agent",
- "input": {
- "description": "E2E parallel child 07",
- "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_07: wait for the controlled response and return it.",
- "subagent_type": "general-purpose"
- }
- }
- ]
- }
- },
- {
- "id": "subagent-parallel-projection-child-controlled-window",
- "description": "7 个 child 的模型请求保持同一个可观察 running 窗口。",
- "metadata": {
- "kind": "subagent",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "真实模型完成速度不可控;固定延迟让 E2E 能在 child 全部 running 时断言并切换任务。"
- },
- "maxMatches": 7,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "delayMs": 15000,
- "text": {
- "id": "upstream-e2e-subagent-parallel-projection-child-done",
- "text": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_DONE"
- }
- }
- },
- {
- "id": "subagent-parallel-projection-parent-final",
- "description": "父模型收到全部 7 个 child 结果后结束。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定父 continuation 收口,证明 7 个真实 child 都已完成且 parent 可恢复 idle。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT",
- "toolu_e2e_parallel_subagent_01",
- "toolu_e2e_parallel_subagent_02",
- "toolu_e2e_parallel_subagent_03",
- "toolu_e2e_parallel_subagent_04",
- "toolu_e2e_parallel_subagent_05",
- "toolu_e2e_parallel_subagent_06",
- "toolu_e2e_parallel_subagent_07",
- "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_DONE"
- ],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "upstream-e2e-subagent-parallel-projection-parent-done",
- "text": "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT_DONE"
- }
- }
- }
- ]
- }
|