conversation-session-subagent-parallel-projection.json 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-subagent-parallel-projection",
  4. "spec": "./test/e2e/conversation-session/subagents/conversation-session-subagent-parallel-projection.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-subagent-parallel-projection-title-sidecar",
  8. "description": "本例标题旁路响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy fixture 或触发后台网络重试。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "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\"}}"
  27. }
  28. },
  29. {
  30. "id": "subagent-parallel-projection-parent-launch",
  31. "description": "父模型在同一回复中并行启动 7 个 foreground Agent。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-tool-use",
  35. "source": "synthetic",
  36. "syntheticReason": "固定产生 7 个并行 Agent tool calls,稳定覆盖 child persist 与父投影发布的竞态窗口。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT"],
  43. "bodyIncludes": [
  44. "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT",
  45. "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT_DONE"
  46. ],
  47. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "toolUses": [
  52. {
  53. "id": "toolu_e2e_parallel_subagent_01",
  54. "name": "Agent",
  55. "input": {
  56. "description": "E2E parallel child 01",
  57. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_01: wait for the controlled response and return it.",
  58. "subagent_type": "general-purpose"
  59. }
  60. },
  61. {
  62. "id": "toolu_e2e_parallel_subagent_02",
  63. "name": "Agent",
  64. "input": {
  65. "description": "E2E parallel child 02",
  66. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_02: wait for the controlled response and return it.",
  67. "subagent_type": "general-purpose"
  68. }
  69. },
  70. {
  71. "id": "toolu_e2e_parallel_subagent_03",
  72. "name": "Agent",
  73. "input": {
  74. "description": "E2E parallel child 03",
  75. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_03: wait for the controlled response and return it.",
  76. "subagent_type": "general-purpose"
  77. }
  78. },
  79. {
  80. "id": "toolu_e2e_parallel_subagent_04",
  81. "name": "Agent",
  82. "input": {
  83. "description": "E2E parallel child 04",
  84. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_04: wait for the controlled response and return it.",
  85. "subagent_type": "general-purpose"
  86. }
  87. },
  88. {
  89. "id": "toolu_e2e_parallel_subagent_05",
  90. "name": "Agent",
  91. "input": {
  92. "description": "E2E parallel child 05",
  93. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_05: wait for the controlled response and return it.",
  94. "subagent_type": "general-purpose"
  95. }
  96. },
  97. {
  98. "id": "toolu_e2e_parallel_subagent_06",
  99. "name": "Agent",
  100. "input": {
  101. "description": "E2E parallel child 06",
  102. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_06: wait for the controlled response and return it.",
  103. "subagent_type": "general-purpose"
  104. }
  105. },
  106. {
  107. "id": "toolu_e2e_parallel_subagent_07",
  108. "name": "Agent",
  109. "input": {
  110. "description": "E2E parallel child 07",
  111. "prompt": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_07: wait for the controlled response and return it.",
  112. "subagent_type": "general-purpose"
  113. }
  114. }
  115. ]
  116. }
  117. },
  118. {
  119. "id": "subagent-parallel-projection-child-controlled-window",
  120. "description": "7 个 child 的模型请求保持同一个可观察 running 窗口。",
  121. "metadata": {
  122. "kind": "subagent",
  123. "timingPolicy": "controlled-stream",
  124. "source": "synthetic",
  125. "syntheticReason": "真实模型完成速度不可控;固定延迟让 E2E 能在 child 全部 running 时断言并切换任务。"
  126. },
  127. "maxMatches": 7,
  128. "match": {
  129. "method": "POST",
  130. "pathIncludes": "/messages",
  131. "lastUserMessageIncludes": ["E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_"],
  132. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  133. },
  134. "response": {
  135. "statusCode": 200,
  136. "delayMs": 15000,
  137. "text": {
  138. "id": "upstream-e2e-subagent-parallel-projection-child-done",
  139. "text": "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_DONE"
  140. }
  141. }
  142. },
  143. {
  144. "id": "subagent-parallel-projection-parent-final",
  145. "description": "父模型收到全部 7 个 child 结果后结束。",
  146. "metadata": {
  147. "kind": "main",
  148. "timingPolicy": "fast-text",
  149. "source": "synthetic",
  150. "syntheticReason": "固定父 continuation 收口,证明 7 个真实 child 都已完成且 parent 可恢复 idle。"
  151. },
  152. "maxMatches": 1,
  153. "match": {
  154. "method": "POST",
  155. "pathIncludes": "/messages",
  156. "bodyIncludes": [
  157. "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT",
  158. "toolu_e2e_parallel_subagent_01",
  159. "toolu_e2e_parallel_subagent_02",
  160. "toolu_e2e_parallel_subagent_03",
  161. "toolu_e2e_parallel_subagent_04",
  162. "toolu_e2e_parallel_subagent_05",
  163. "toolu_e2e_parallel_subagent_06",
  164. "toolu_e2e_parallel_subagent_07",
  165. "E2E_SUBAGENT_PARALLEL_PROJECTION_CHILD_DONE"
  166. ],
  167. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  168. },
  169. "response": {
  170. "statusCode": 200,
  171. "text": {
  172. "id": "upstream-e2e-subagent-parallel-projection-parent-done",
  173. "text": "E2E_SUBAGENT_PARALLEL_PROJECTION_PARENT_DONE"
  174. }
  175. }
  176. }
  177. ]
  178. }