conversation-session-side-pane-full-view.json 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-side-pane-full-view",
  4. "spec": "./test/e2e/conversation-session/branching/conversation-session-side-pane-full-view.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-conversation-side-pane-full-view-first",
  8. "description": "完整视图用例的首条消息:建立真实会话 A。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "只需要一个已完成的会话作为完整视图 owner,回复内容不参与断言。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "lastUserMessageIncludes": ["E2E_SPFV_FIRST"],
  20. "bodyIncludes": ["E2E_SPFV_FIRST"],
  21. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  22. },
  23. "response": {
  24. "statusCode": 200,
  25. "text": "spfv-first-ok"
  26. }
  27. },
  28. {
  29. "id": "upstream-conversation-side-pane-full-view-floating-send",
  30. "description": "从完整视图浮窗输入框发送的消息。",
  31. "metadata": {
  32. "kind": "main",
  33. "timingPolicy": "fast-text",
  34. "source": "synthetic",
  35. "syntheticReason": "证明浮窗输入框与主对话是同一实例,回复内容只用于确认消息被 agent 处理。"
  36. },
  37. "maxMatches": 1,
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/messages",
  41. "lastUserMessageIncludes": ["E2E_SPFV_FLOATING_SEND"],
  42. "bodyIncludes": ["E2E_SPFV_FLOATING_SEND"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "text": "spfv-floating-ok"
  48. }
  49. },
  50. {
  51. "id": "upstream-conversation-side-pane-full-view-ask",
  52. "description": "最小化浮窗期间触发 AskUserQuestion 等待态。",
  53. "metadata": {
  54. "kind": "main",
  55. "timingPolicy": "controlled-stream",
  56. "source": "synthetic",
  57. "syntheticReason": "稳定制造问答等待态并延迟 4s 返回,保证请求在浮窗最小化之后到达,验证自动恢复并显示卡片。"
  58. },
  59. "maxMatches": 1,
  60. "match": {
  61. "method": "POST",
  62. "pathIncludes": "/messages",
  63. "lastUserMessageIncludes": ["E2E_SPFV_ASK"],
  64. "bodyIncludes": ["E2E_SPFV_ASK"],
  65. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  66. },
  67. "response": {
  68. "statusCode": 200,
  69. "toolUse": {
  70. "id": "toolu_e2e_spfv_ask_user_question",
  71. "name": "AskUserQuestion",
  72. "input": {
  73. "questions": [
  74. {
  75. "question": "E2E_SPFV_ASK_QUESTION: choose an answer?",
  76. "header": "E2E",
  77. "options": [
  78. {
  79. "label": "Use default",
  80. "description": "Continue with the default answer."
  81. },
  82. {
  83. "label": "Use fallback",
  84. "description": "Continue with the fallback answer."
  85. }
  86. ]
  87. }
  88. ]
  89. }
  90. },
  91. "delayMs": 4000
  92. }
  93. },
  94. {
  95. "id": "upstream-conversation-side-pane-full-view-ask-final",
  96. "description": "问答回答进入下一次请求后的最终回复。",
  97. "metadata": {
  98. "kind": "main",
  99. "timingPolicy": "fast-text",
  100. "source": "synthetic",
  101. "syntheticReason": "只证明问答回答已被 agent 消费,核心断言在浮窗卡片的显示与消失。"
  102. },
  103. "maxMatches": 1,
  104. "match": {
  105. "method": "POST",
  106. "pathIncludes": "/messages",
  107. "bodyIncludes": ["E2E_SPFV_ASK_QUESTION", "toolu_e2e_spfv_ask_user_question"],
  108. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  109. },
  110. "response": {
  111. "statusCode": 200,
  112. "text": "spfv-ask-done"
  113. }
  114. },
  115. {
  116. "id": "upstream-conversation-side-pane-full-view-title",
  117. "description": "完整视图用例首发的 case-local 标题生成响应。",
  118. "metadata": {
  119. "kind": "common",
  120. "timingPolicy": "fast-text",
  121. "source": "synthetic",
  122. "syntheticReason": "E2E_SPFV_FIRST 首发会触发 title sidecar;固定 case-local 标题,避免 sidecar 500 重试干扰会话。"
  123. },
  124. "match": {
  125. "method": "POST",
  126. "pathIncludes": "/messages",
  127. "bodyIncludes": ["Generate a concise title", "E2E_SPFV_FIRST"]
  128. },
  129. "response": {
  130. "statusCode": 200,
  131. "text": {
  132. "id": "upstream-conversation-side-pane-full-view-title",
  133. "inputTokens": 64,
  134. "outputTokens": 8,
  135. "text": "{\"title\":\"SPFV E2E\"}"
  136. }
  137. }
  138. },
  139. {
  140. "id": "upstream-conversation-side-pane-full-view-compact",
  141. "description": "manual-review 小上下文窗口触发的自动 compact 摘要。",
  142. "metadata": {
  143. "kind": "common",
  144. "timingPolicy": "fast-text",
  145. "source": "synthetic",
  146. "syntheticReason": "manual-review 的小上下文窗口会在每轮之间自动 compact(compact 后历史不再含首条 marker);compact 失败会退避重试并阻塞后续输入,这里统一给出稳定摘要。"
  147. },
  148. "match": {
  149. "method": "POST",
  150. "pathIncludes": "/messages",
  151. "bodyIncludes": ["CRITICAL: Respond with TEXT ONLY", "E2E_SPFV_"],
  152. "bodyExcludes": ["Generate a concise title"]
  153. },
  154. "response": {
  155. "statusCode": 200,
  156. "statusMessage": "OK",
  157. "text": {
  158. "id": "upstream-conversation-side-pane-full-view-compact",
  159. "inputTokens": 128,
  160. "outputTokens": 32,
  161. "text": "<summary>The user asked for brief replies in a side pane full view test. No files or tools were used.</summary>"
  162. }
  163. }
  164. }
  165. ]
  166. }