conversation-session-ask-user-question-auto-resolution-setting.json 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ask-user-question-auto-resolution-setting",
  4. "spec": "./test/e2e/conversation-session/permissions/conversation-session-ask-user-question-auto-resolution-setting.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-ask-user-question-auto-resolution-setting-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": "upstream-ask-auto-resolution-setting-first-controlled-stream",
  31. "description": "首个 AskUserQuestion 以 controlled-stream 建立可观察的计时等待态。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "controlled-stream",
  35. "source": "synthetic",
  36. "syntheticReason": "稳定制造计时中关闭设置的 GUI 窗口,避免真实模型工具选择和流速漂移。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_ASK_AUTO_RESOLUTION_SETTING_FIRST"],
  43. "bodyIncludes": ["E2E_ASK_AUTO_RESOLUTION_SETTING_FIRST_DONE"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "cache-control": "no-cache",
  51. "content-type": "text/event-stream; charset=utf-8"
  52. },
  53. "chunks": [
  54. {
  55. "offsetMs": 0,
  56. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_ask_auto_resolution_first\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":100,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  57. },
  58. {
  59. "offsetMs": 100,
  60. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_e2e_ask_auto_resolution_first\",\"name\":\"AskUserQuestion\",\"input\":{}}}\n\n"
  61. },
  62. {
  63. "offsetMs": 700,
  64. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"questions\\\":[{\\\"question\\\":\\\"E2E_ASK_AUTO_RESOLUTION_SETTING_FIRST: keep waiting?\\\",\\\"header\\\":\\\"First\\\",\\\"options\\\":[{\\\"label\\\":\\\"Wait\\\",\\\"description\\\":\\\"Keep waiting for an answer.\\\"},{\\\"label\\\":\\\"Continue\\\",\\\"description\\\":\\\"Continue after an answer.\\\"}]}]}\"}}\n\n"
  65. },
  66. {
  67. "offsetMs": 800,
  68. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  69. },
  70. {
  71. "offsetMs": 900,
  72. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":100,\"output_tokens\":20,\"service_tier\":\"standard\"}}\n\n"
  73. },
  74. {
  75. "offsetMs": 1000,
  76. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  77. }
  78. ]
  79. }
  80. },
  81. {
  82. "id": "upstream-ask-auto-resolution-setting-first-final",
  83. "description": "旧问题在重开后仍由人工回答收口。",
  84. "metadata": {
  85. "kind": "main",
  86. "timingPolicy": "fast-text",
  87. "source": "synthetic",
  88. "syntheticReason": "证明重开设置没有追溯恢复旧问题的 deadline。"
  89. },
  90. "maxMatches": 1,
  91. "match": {
  92. "method": "POST",
  93. "pathIncludes": "/messages",
  94. "bodyIncludes": [
  95. "E2E_ASK_AUTO_RESOLUTION_SETTING_FIRST",
  96. "E2E_ASK_AUTO_RESOLUTION_SETTING_FIRST_ANSWER",
  97. "toolu_e2e_ask_auto_resolution_first"
  98. ],
  99. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  100. },
  101. "response": {
  102. "statusCode": 200,
  103. "text": "E2E_ASK_AUTO_RESOLUTION_SETTING_FIRST_DONE"
  104. }
  105. },
  106. {
  107. "id": "upstream-ask-auto-resolution-setting-second-controlled-stream",
  108. "description": "重开后新问题以 controlled-stream 注册并重新取得计时资格。",
  109. "metadata": {
  110. "kind": "main",
  111. "timingPolicy": "controlled-stream",
  112. "source": "synthetic",
  113. "syntheticReason": "稳定证明重新开启只影响随后注册的新 AskUserQuestion。"
  114. },
  115. "maxMatches": 1,
  116. "match": {
  117. "method": "POST",
  118. "pathIncludes": "/messages",
  119. "lastUserMessageIncludes": ["E2E_ASK_AUTO_RESOLUTION_SETTING_SECOND"],
  120. "bodyIncludes": ["E2E_ASK_AUTO_RESOLUTION_SETTING_SECOND_AUTO_DONE"],
  121. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  122. },
  123. "response": {
  124. "statusCode": 200,
  125. "statusMessage": "OK",
  126. "headers": {
  127. "cache-control": "no-cache",
  128. "content-type": "text/event-stream; charset=utf-8"
  129. },
  130. "chunks": [
  131. {
  132. "offsetMs": 0,
  133. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_ask_auto_resolution_second\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":100,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  134. },
  135. {
  136. "offsetMs": 100,
  137. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_e2e_ask_auto_resolution_second\",\"name\":\"AskUserQuestion\",\"input\":{}}}\n\n"
  138. },
  139. {
  140. "offsetMs": 700,
  141. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"questions\\\":[{\\\"question\\\":\\\"E2E_ASK_AUTO_RESOLUTION_SETTING_SECOND: auto continue?\\\",\\\"header\\\":\\\"Second\\\",\\\"options\\\":[{\\\"label\\\":\\\"One\\\",\\\"description\\\":\\\"First option.\\\"},{\\\"label\\\":\\\"Two\\\",\\\"description\\\":\\\"Second option.\\\"}]}]}\"}}\n\n"
  142. },
  143. {
  144. "offsetMs": 800,
  145. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  146. },
  147. {
  148. "offsetMs": 900,
  149. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":100,\"output_tokens\":20,\"service_tier\":\"standard\"}}\n\n"
  150. },
  151. {
  152. "offsetMs": 1000,
  153. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  154. }
  155. ]
  156. }
  157. },
  158. {
  159. "id": "upstream-ask-auto-resolution-setting-second-final",
  160. "description": "新问题到达注入 deadline 后由空答案自动继续。",
  161. "metadata": {
  162. "kind": "main",
  163. "timingPolicy": "fast-text",
  164. "source": "synthetic",
  165. "syntheticReason": "最终回复只证明新注册问题恢复五分钟规则,详细计时由 fake-clock 单测覆盖。"
  166. },
  167. "maxMatches": 1,
  168. "match": {
  169. "method": "POST",
  170. "pathIncludes": "/messages",
  171. "bodyIncludes": [
  172. "E2E_ASK_AUTO_RESOLUTION_SETTING_SECOND",
  173. "toolu_e2e_ask_auto_resolution_second"
  174. ],
  175. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  176. },
  177. "response": {
  178. "statusCode": 200,
  179. "text": "E2E_ASK_AUTO_RESOLUTION_SETTING_SECOND_AUTO_DONE"
  180. }
  181. }
  182. ]
  183. }