conversation-session-subagent-sidebar-isolation.json 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-subagent-sidebar-isolation",
  4. "spec": "./test/e2e/conversation-session/subagents/conversation-session-subagent-sidebar-isolation.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-subagent-sidebar-isolation-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-sidebar-parent-agent",
  31. "description": "subagent-sidebar-parent-agent",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "只固定模型回复;真实 Agent 派发、SQLite、冷恢复与 UI 路径执行生产代码。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  43. "lastUserMessageIncludes": ["E2E_SUBAGENT_SIDEBAR_PARENT"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "toolUse": {
  48. "id": "toolu_e2e_subagent_sidebar",
  49. "name": "Agent",
  50. "input": {
  51. "description": "Sidebar isolation child",
  52. "prompt": "E2E_SUBAGENT_SIDEBAR_CHILD: reply with exactly E2E_SUBAGENT_SIDEBAR_CHILD_DONE",
  53. "subagent_type": "general-purpose"
  54. }
  55. }
  56. }
  57. },
  58. {
  59. "id": "subagent-sidebar-child",
  60. "description": "subagent-sidebar-child",
  61. "metadata": {
  62. "kind": "main",
  63. "timingPolicy": "fast-text",
  64. "source": "synthetic",
  65. "syntheticReason": "只固定模型回复;真实 Agent 派发、SQLite、冷恢复与 UI 路径执行生产代码。"
  66. },
  67. "maxMatches": 1,
  68. "match": {
  69. "method": "POST",
  70. "pathIncludes": "/messages",
  71. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  72. "lastUserMessageIncludes": ["E2E_SUBAGENT_SIDEBAR_CHILD"]
  73. },
  74. "response": {
  75. "statusCode": 200,
  76. "text": {
  77. "id": "child",
  78. "text": "E2E_SUBAGENT_SIDEBAR_CHILD_DONE",
  79. "inputTokens": 64,
  80. "outputTokens": 8
  81. }
  82. }
  83. },
  84. {
  85. "id": "subagent-sidebar-parent-final",
  86. "description": "subagent-sidebar-parent-final",
  87. "metadata": {
  88. "kind": "main",
  89. "timingPolicy": "fast-text",
  90. "source": "synthetic",
  91. "syntheticReason": "只固定模型回复;真实 Agent 派发、SQLite、冷恢复与 UI 路径执行生产代码。"
  92. },
  93. "maxMatches": 1,
  94. "match": {
  95. "method": "POST",
  96. "pathIncludes": "/messages",
  97. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  98. "bodyIncludes": [
  99. "E2E_SUBAGENT_SIDEBAR_PARENT",
  100. "E2E_SUBAGENT_SIDEBAR_CHILD_DONE",
  101. "E2E_SUBAGENT_SIDEBAR_PARENT_DONE"
  102. ]
  103. },
  104. "response": {
  105. "statusCode": 200,
  106. "text": {
  107. "id": "parent-final",
  108. "text": "E2E_SUBAGENT_SIDEBAR_PARENT_DONE",
  109. "inputTokens": 64,
  110. "outputTokens": 8
  111. }
  112. }
  113. }
  114. ]
  115. }