conversation-session-goal-interruptions.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-goal-interruptions",
  4. "spec": "./test/e2e/conversation-session/conversation-session-goal-interruptions.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-goal-verifier-stop-continuation",
  8. "description": "H09: goal continuation returns the target answer before entering verifier.",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "稳定让 /goal 进入 verifier 窗口,避免真实模型输出不满足 verifier 前置。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": [
  20. "E2E_GOAL_VERIFIER_STOP",
  21. "Continue working toward the active session goal"
  22. ],
  23. "bodyExcludes": [
  24. "Generate a concise title",
  25. "CRITICAL: Respond with TEXT ONLY",
  26. "Verify whether the active session goal"
  27. ]
  28. },
  29. "response": {
  30. "statusCode": 200,
  31. "text": {
  32. "id": "upstream-e2e-goal-verifier-stop-continuation",
  33. "inputTokens": 160,
  34. "outputTokens": 12,
  35. "text": "upstream-e2e-ok"
  36. }
  37. }
  38. },
  39. {
  40. "id": "upstream-goal-verifier-stop-delayed",
  41. "description": "H09: delayed verifier request to allow user stop.",
  42. "metadata": {
  43. "kind": "goal-verifier",
  44. "timingPolicy": "controlled-stream",
  45. "source": "synthetic",
  46. "syntheticReason": "goal verifier stop 需要稳定 running 窗口;真实 verifier 可能过快完成。"
  47. },
  48. "maxMatches": 1,
  49. "match": {
  50. "method": "POST",
  51. "pathIncludes": "/messages",
  52. "bodyIncludes": [
  53. "E2E_GOAL_VERIFIER_STOP",
  54. "Verify whether the active session goal"
  55. ],
  56. "bodyExcludes": [
  57. "E2E_GOAL_VERIFIER_STOP_NEXT",
  58. "Generate a concise title",
  59. "CRITICAL: Respond with TEXT ONLY"
  60. ]
  61. },
  62. "response": {
  63. "statusCode": 200,
  64. "delayMs": 60000,
  65. "headers": {
  66. "content-type": "application/json; charset=utf-8"
  67. },
  68. "body": "{\"id\":\"upstream-e2e-goal-verifier-stop-delayed\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"passed\\\":true,\\\"reason\\\":\\\"Delayed verifier should be stopped by the test.\\\",\\\"nextAction\\\":\\\"\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":220,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  69. }
  70. },
  71. {
  72. "id": "upstream-goal-verifier-stop-next",
  73. "description": "H09: normal prompt after stopping verifier completes.",
  74. "metadata": {
  75. "kind": "main",
  76. "timingPolicy": "fast-text",
  77. "source": "synthetic",
  78. "syntheticReason": "验证 stopped verifier 不阻塞下一条普通用户消息。"
  79. },
  80. "maxMatches": 1,
  81. "match": {
  82. "method": "POST",
  83. "pathIncludes": "/messages",
  84. "bodyIncludes": [
  85. "E2E_GOAL_VERIFIER_STOP_NEXT"
  86. ],
  87. "bodyExcludes": [
  88. "Generate a concise title",
  89. "CRITICAL: Respond with TEXT ONLY",
  90. "Verify whether the active session goal"
  91. ],
  92. "lastUserMessageIncludes": [
  93. "E2E_GOAL_VERIFIER_STOP_NEXT"
  94. ]
  95. },
  96. "response": {
  97. "statusCode": 200,
  98. "text": {
  99. "id": "upstream-e2e-goal-verifier-stop-next",
  100. "inputTokens": 180,
  101. "outputTokens": 12,
  102. "text": "upstream-e2e-ok"
  103. }
  104. }
  105. },
  106. {
  107. "id": "upstream-goal-verifier-stop-next-verifier-passed",
  108. "description": "H09: verifier after the next prompt passes so the test can settle idle.",
  109. "metadata": {
  110. "kind": "goal-verifier",
  111. "timingPolicy": "fast-json",
  112. "source": "synthetic",
  113. "syntheticReason": "普通下一轮完成后 active goal 可能再次 verifier;提供通过响应让 case 自然收口。"
  114. },
  115. "maxMatches": 1,
  116. "match": {
  117. "method": "POST",
  118. "pathIncludes": "/messages",
  119. "bodyIncludes": [
  120. "E2E_GOAL_VERIFIER_STOP",
  121. "E2E_GOAL_VERIFIER_STOP_NEXT",
  122. "Verify whether the active session goal"
  123. ],
  124. "bodyExcludes": [
  125. "Generate a concise title",
  126. "CRITICAL: Respond with TEXT ONLY"
  127. ]
  128. },
  129. "response": {
  130. "statusCode": 200,
  131. "headers": {
  132. "content-type": "application/json; charset=utf-8"
  133. },
  134. "body": "{\"id\":\"upstream-e2e-goal-verifier-stop-next-passed\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"passed\\\":true,\\\"reason\\\":\\\"The user was able to send the next prompt after stopping verifier.\\\",\\\"nextAction\\\":\\\"\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":240,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  135. }
  136. },
  137. {
  138. "id": "upstream-goal-verifier-compact-continuation",
  139. "description": "H10: goal continuation returns the target answer before entering verifier.",
  140. "metadata": {
  141. "kind": "main",
  142. "timingPolicy": "fast-text",
  143. "source": "synthetic",
  144. "syntheticReason": "稳定让 compact 分支进入 verifier stop 窗口。"
  145. },
  146. "maxMatches": 1,
  147. "match": {
  148. "method": "POST",
  149. "pathIncludes": "/messages",
  150. "bodyIncludes": [
  151. "E2E_GOAL_VERIFIER_COMPACT",
  152. "Continue working toward the active session goal"
  153. ],
  154. "bodyExcludes": [
  155. "Generate a concise title",
  156. "CRITICAL: Respond with TEXT ONLY",
  157. "Verify whether the active session goal"
  158. ]
  159. },
  160. "response": {
  161. "statusCode": 200,
  162. "text": {
  163. "id": "upstream-e2e-goal-verifier-compact-continuation",
  164. "inputTokens": 160,
  165. "outputTokens": 12,
  166. "text": "upstream-e2e-ok"
  167. }
  168. }
  169. },
  170. {
  171. "id": "upstream-goal-verifier-compact-delayed",
  172. "description": "H10: delayed verifier request to allow user stop before compact.",
  173. "metadata": {
  174. "kind": "goal-verifier",
  175. "timingPolicy": "controlled-stream",
  176. "source": "synthetic",
  177. "syntheticReason": "goal verifier compact 需要稳定 running 窗口;真实 verifier 可能过快完成。"
  178. },
  179. "maxMatches": 1,
  180. "match": {
  181. "method": "POST",
  182. "pathIncludes": "/messages",
  183. "bodyIncludes": [
  184. "E2E_GOAL_VERIFIER_COMPACT",
  185. "Verify whether the active session goal"
  186. ],
  187. "bodyExcludes": [
  188. "E2E_GOAL_VERIFIER_COMPACT_NEXT",
  189. "Generate a concise title",
  190. "CRITICAL: Respond with TEXT ONLY"
  191. ]
  192. },
  193. "response": {
  194. "statusCode": 200,
  195. "delayMs": 60000,
  196. "headers": {
  197. "content-type": "application/json; charset=utf-8"
  198. },
  199. "body": "{\"id\":\"upstream-e2e-goal-verifier-compact-delayed\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"passed\\\":true,\\\"reason\\\":\\\"Delayed verifier should be stopped before compact.\\\",\\\"nextAction\\\":\\\"\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":220,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  200. }
  201. },
  202. {
  203. "id": "upstream-goal-verifier-compact-summary",
  204. "description": "H10: manual compact after stopping verifier succeeds and preserves a summary marker.",
  205. "metadata": {
  206. "kind": "main",
  207. "timingPolicy": "fast-json",
  208. "source": "synthetic",
  209. "syntheticReason": "验证 stopped verifier 后允许 manual compact,并给后续请求一个可断言的 compact 摘要 marker。"
  210. },
  211. "maxMatches": 1,
  212. "match": {
  213. "method": "POST",
  214. "pathIncludes": "/messages",
  215. "bodyIncludes": [
  216. "CRITICAL: Respond with TEXT ONLY",
  217. "E2E_GOAL_VERIFIER_COMPACT",
  218. "\"stream\":true"
  219. ]
  220. },
  221. "response": {
  222. "statusCode": 200,
  223. "text": {
  224. "id": "upstream-e2e-goal-verifier-compact-summary",
  225. "inputTokens": 260,
  226. "outputTokens": 64,
  227. "text": "<analysis>Goal verifier was stopped, then the conversation was compacted.</analysis>\n\n<summary>E2E_GOAL_VERIFIER_COMPACT_SUMMARY_MARKER: compact preserved the stopped verifier setup and active goal context.</summary>"
  228. }
  229. }
  230. },
  231. {
  232. "id": "upstream-goal-verifier-compact-next",
  233. "description": "H10: normal prompt after compact completes.",
  234. "metadata": {
  235. "kind": "main",
  236. "timingPolicy": "fast-text",
  237. "source": "synthetic",
  238. "syntheticReason": "验证 stopped verifier compact 后普通用户消息能基于 compact 后摘要继续。"
  239. },
  240. "maxMatches": 1,
  241. "match": {
  242. "method": "POST",
  243. "pathIncludes": "/messages",
  244. "bodyIncludes": [
  245. "E2E_GOAL_VERIFIER_COMPACT_NEXT",
  246. "E2E_GOAL_VERIFIER_COMPACT_SUMMARY_MARKER"
  247. ],
  248. "bodyExcludes": [
  249. "Generate a concise title",
  250. "CRITICAL: Respond with TEXT ONLY",
  251. "Verify whether the active session goal"
  252. ],
  253. "lastUserMessageIncludes": [
  254. "E2E_GOAL_VERIFIER_COMPACT_NEXT"
  255. ]
  256. },
  257. "response": {
  258. "statusCode": 200,
  259. "text": {
  260. "id": "upstream-e2e-goal-verifier-compact-next",
  261. "inputTokens": 180,
  262. "outputTokens": 12,
  263. "text": "upstream-e2e-ok"
  264. }
  265. }
  266. },
  267. {
  268. "id": "upstream-goal-verifier-compact-next-verifier-passed",
  269. "description": "H10: verifier after compact next prompt passes so the test can settle idle.",
  270. "metadata": {
  271. "kind": "goal-verifier",
  272. "timingPolicy": "fast-json",
  273. "source": "synthetic",
  274. "syntheticReason": "compact 后下一轮完成后 active goal 可能再次 verifier;提供通过响应让 case 自然收口。"
  275. },
  276. "maxMatches": 1,
  277. "match": {
  278. "method": "POST",
  279. "pathIncludes": "/messages",
  280. "bodyIncludes": [
  281. "E2E_GOAL_VERIFIER_COMPACT",
  282. "E2E_GOAL_VERIFIER_COMPACT_NEXT",
  283. "Verify whether the active session goal"
  284. ],
  285. "bodyExcludes": [
  286. "Generate a concise title",
  287. "CRITICAL: Respond with TEXT ONLY"
  288. ]
  289. },
  290. "response": {
  291. "statusCode": 200,
  292. "headers": {
  293. "content-type": "application/json; charset=utf-8"
  294. },
  295. "body": "{\"id\":\"upstream-e2e-goal-verifier-compact-next-passed\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"passed\\\":true,\\\"reason\\\":\\\"The user compacted and then continued after stopping verifier.\\\",\\\"nextAction\\\":\\\"\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":240,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  296. }
  297. }
  298. ]
  299. }