conversation-session-silent-reminder-timed.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-silent-reminder-timed",
  4. "spec": "./test/e2e/conversation-session/context/conversation-session-silent-reminder-timed.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "silent-reminder-slow-title",
  8. "description": "为本 case 的 session title generation 提供固定辅助响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成与静默提醒无关,但必须独立收口,避免抢占或阻塞主链路 fixture。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "lastUserMessageIncludes": ["E2E_SILENT_REMINDER_SLOW"],
  20. "bodyIncludes": ["Generate a concise title"]
  21. },
  22. "response": {
  23. "statusCode": 200,
  24. "statusMessage": "OK",
  25. "headers": {
  26. "content-type": "application/json; charset=utf-8"
  27. },
  28. "body": "{\"id\":\"e2e-silent-reminder-slow-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"e2e-model\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\": \\\"Silent Reminder E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":32,\"output_tokens\":8}}"
  29. }
  30. },
  31. {
  32. "id": "silent-reminder-slow-1",
  33. "description": "首个响应 31 秒后返回静默的 Bash 调用。",
  34. "metadata": {
  35. "kind": "main",
  36. "timingPolicy": "delayed-tool-use",
  37. "source": "synthetic",
  38. "syntheticReason": "每次响应延迟 31 秒,第二次工具批次后距本轮 prompt 满 60 秒;真实模型的响应时间不可控。"
  39. },
  40. "maxMatches": 1,
  41. "match": {
  42. "method": "POST",
  43. "pathIncludes": "/messages",
  44. "lastUserMessageIncludes": ["E2E_SILENT_REMINDER_SLOW"],
  45. "bodyExcludes": [
  46. "toolu_e2e_silent_slow_1",
  47. "E2E_SILENT_REMINDER_COLD_REPLAY",
  48. "Generate a concise title",
  49. "CRITICAL: Respond with TEXT ONLY"
  50. ]
  51. },
  52. "response": {
  53. "statusCode": 200,
  54. "delayMs": 31000,
  55. "toolUse": {
  56. "id": "toolu_e2e_silent_slow_1",
  57. "name": "Bash",
  58. "input": {
  59. "command": "true",
  60. "description": "E2E silent step 1"
  61. }
  62. }
  63. }
  64. },
  65. {
  66. "id": "silent-reminder-slow-2",
  67. "description": "第二个响应再过 31 秒返回静默的 Bash 调用;这个请求还没有提醒。",
  68. "metadata": {
  69. "kind": "main",
  70. "timingPolicy": "delayed-tool-use",
  71. "source": "synthetic",
  72. "syntheticReason": "每次响应延迟 31 秒,第二次工具批次后距本轮 prompt 满 60 秒;真实模型的响应时间不可控。"
  73. },
  74. "maxMatches": 1,
  75. "match": {
  76. "method": "POST",
  77. "pathIncludes": "/messages",
  78. "bodyIncludes": ["E2E_SILENT_REMINDER_SLOW", "toolu_e2e_silent_slow_1"],
  79. "bodyExcludes": [
  80. "toolu_e2e_silent_slow_2",
  81. "E2E_SILENT_REMINDER_COLD_REPLAY",
  82. "Generate a concise title",
  83. "CRITICAL: Respond with TEXT ONLY"
  84. ]
  85. },
  86. "response": {
  87. "statusCode": 200,
  88. "delayMs": 31000,
  89. "toolUse": {
  90. "id": "toolu_e2e_silent_slow_2",
  91. "name": "Bash",
  92. "input": {
  93. "command": "true",
  94. "description": "E2E silent step 2"
  95. }
  96. }
  97. }
  98. },
  99. {
  100. "id": "silent-reminder-slow-3",
  101. "description": "满 60 秒后的请求带静默提醒,固定文字收口。",
  102. "metadata": {
  103. "kind": "main",
  104. "timingPolicy": "fast-text",
  105. "source": "synthetic",
  106. "syntheticReason": "响应正文只用于稳定结束本轮;核心证据是请求里的静默提醒。"
  107. },
  108. "maxMatches": 1,
  109. "match": {
  110. "method": "POST",
  111. "pathIncludes": "/messages",
  112. "bodyIncludes": ["E2E_SILENT_REMINDER_SLOW", "toolu_e2e_silent_slow_2"],
  113. "bodyExcludes": [
  114. "E2E_SILENT_REMINDER_COLD_REPLAY",
  115. "Generate a concise title",
  116. "CRITICAL: Respond with TEXT ONLY"
  117. ]
  118. },
  119. "response": {
  120. "statusCode": 200,
  121. "text": {
  122. "id": "e2e-silent-reminder-slow-done",
  123. "inputTokens": 128,
  124. "outputTokens": 12,
  125. "text": "E2E_SILENT_REMINDER_SLOW_DONE"
  126. }
  127. }
  128. },
  129. {
  130. "id": "silent-reminder-cold-followup",
  131. "description": "完整 CLI cold restart 后发送下一轮,捕获 hydration 后的 provider history。",
  132. "metadata": {
  133. "kind": "main",
  134. "timingPolicy": "fast-text",
  135. "source": "synthetic",
  136. "syntheticReason": "响应正文只用于稳定结束 cold follow-up;核心证据是提醒按原位置原字节回放。"
  137. },
  138. "maxMatches": 1,
  139. "match": {
  140. "method": "POST",
  141. "pathIncludes": "/messages",
  142. "lastUserMessageIncludes": ["E2E_SILENT_REMINDER_COLD_REPLAY"],
  143. "bodyIncludes": ["toolu_e2e_silent_slow_2"],
  144. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  145. },
  146. "response": {
  147. "statusCode": 200,
  148. "text": {
  149. "id": "e2e-silent-reminder-cold",
  150. "inputTokens": 128,
  151. "outputTokens": 12,
  152. "text": "E2E_SILENT_REMINDER_COLD_OK"
  153. }
  154. }
  155. },
  156. {
  157. "id": "silent-reminder-fast-title",
  158. "description": "为本 case 的 session title generation 提供固定辅助响应。",
  159. "metadata": {
  160. "kind": "common",
  161. "timingPolicy": "fast-text",
  162. "source": "synthetic",
  163. "syntheticReason": "标题生成与静默提醒无关,但必须独立收口,避免抢占或阻塞主链路 fixture。"
  164. },
  165. "maxMatches": 1,
  166. "match": {
  167. "method": "POST",
  168. "pathIncludes": "/messages",
  169. "lastUserMessageIncludes": ["E2E_SILENT_REMINDER_FAST"],
  170. "bodyIncludes": ["Generate a concise title"]
  171. },
  172. "response": {
  173. "statusCode": 200,
  174. "statusMessage": "OK",
  175. "headers": {
  176. "content-type": "application/json; charset=utf-8"
  177. },
  178. "body": "{\"id\":\"e2e-silent-reminder-fast-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"e2e-model\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\": \\\"Silent Reminder E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":32,\"output_tokens\":8}}"
  179. }
  180. },
  181. {
  182. "id": "silent-reminder-fast-1",
  183. "description": "第 1 次快速静默响应。",
  184. "metadata": {
  185. "kind": "main",
  186. "timingPolicy": "fast-tool-use",
  187. "source": "synthetic",
  188. "syntheticReason": "六次快速静默响应:按次数计时会在第 5 次后提醒,按时间计时不提醒;真实模型不一定连续调用工具。"
  189. },
  190. "maxMatches": 1,
  191. "match": {
  192. "method": "POST",
  193. "pathIncludes": "/messages",
  194. "lastUserMessageIncludes": ["E2E_SILENT_REMINDER_FAST"],
  195. "bodyExcludes": [
  196. "toolu_e2e_silent_fast_1",
  197. "Generate a concise title",
  198. "CRITICAL: Respond with TEXT ONLY"
  199. ]
  200. },
  201. "response": {
  202. "statusCode": 200,
  203. "toolUse": {
  204. "id": "toolu_e2e_silent_fast_1",
  205. "name": "Bash",
  206. "input": {
  207. "command": "true",
  208. "description": "E2E silent step 1"
  209. }
  210. }
  211. }
  212. },
  213. {
  214. "id": "silent-reminder-fast-2",
  215. "description": "第 2 次快速静默响应。",
  216. "metadata": {
  217. "kind": "main",
  218. "timingPolicy": "fast-tool-use",
  219. "source": "synthetic",
  220. "syntheticReason": "六次快速静默响应:按次数计时会在第 5 次后提醒,按时间计时不提醒;真实模型不一定连续调用工具。"
  221. },
  222. "maxMatches": 1,
  223. "match": {
  224. "method": "POST",
  225. "pathIncludes": "/messages",
  226. "bodyIncludes": ["E2E_SILENT_REMINDER_FAST", "toolu_e2e_silent_fast_1"],
  227. "bodyExcludes": [
  228. "toolu_e2e_silent_fast_2",
  229. "Generate a concise title",
  230. "CRITICAL: Respond with TEXT ONLY"
  231. ]
  232. },
  233. "response": {
  234. "statusCode": 200,
  235. "toolUse": {
  236. "id": "toolu_e2e_silent_fast_2",
  237. "name": "Bash",
  238. "input": {
  239. "command": "true",
  240. "description": "E2E silent step 2"
  241. }
  242. }
  243. }
  244. },
  245. {
  246. "id": "silent-reminder-fast-3",
  247. "description": "第 3 次快速静默响应。",
  248. "metadata": {
  249. "kind": "main",
  250. "timingPolicy": "fast-tool-use",
  251. "source": "synthetic",
  252. "syntheticReason": "六次快速静默响应:按次数计时会在第 5 次后提醒,按时间计时不提醒;真实模型不一定连续调用工具。"
  253. },
  254. "maxMatches": 1,
  255. "match": {
  256. "method": "POST",
  257. "pathIncludes": "/messages",
  258. "bodyIncludes": ["E2E_SILENT_REMINDER_FAST", "toolu_e2e_silent_fast_2"],
  259. "bodyExcludes": [
  260. "toolu_e2e_silent_fast_3",
  261. "Generate a concise title",
  262. "CRITICAL: Respond with TEXT ONLY"
  263. ]
  264. },
  265. "response": {
  266. "statusCode": 200,
  267. "toolUse": {
  268. "id": "toolu_e2e_silent_fast_3",
  269. "name": "Bash",
  270. "input": {
  271. "command": "true",
  272. "description": "E2E silent step 3"
  273. }
  274. }
  275. }
  276. },
  277. {
  278. "id": "silent-reminder-fast-4",
  279. "description": "第 4 次快速静默响应。",
  280. "metadata": {
  281. "kind": "main",
  282. "timingPolicy": "fast-tool-use",
  283. "source": "synthetic",
  284. "syntheticReason": "六次快速静默响应:按次数计时会在第 5 次后提醒,按时间计时不提醒;真实模型不一定连续调用工具。"
  285. },
  286. "maxMatches": 1,
  287. "match": {
  288. "method": "POST",
  289. "pathIncludes": "/messages",
  290. "bodyIncludes": ["E2E_SILENT_REMINDER_FAST", "toolu_e2e_silent_fast_3"],
  291. "bodyExcludes": [
  292. "toolu_e2e_silent_fast_4",
  293. "Generate a concise title",
  294. "CRITICAL: Respond with TEXT ONLY"
  295. ]
  296. },
  297. "response": {
  298. "statusCode": 200,
  299. "toolUse": {
  300. "id": "toolu_e2e_silent_fast_4",
  301. "name": "Bash",
  302. "input": {
  303. "command": "true",
  304. "description": "E2E silent step 4"
  305. }
  306. }
  307. }
  308. },
  309. {
  310. "id": "silent-reminder-fast-5",
  311. "description": "第 5 次快速静默响应。",
  312. "metadata": {
  313. "kind": "main",
  314. "timingPolicy": "fast-tool-use",
  315. "source": "synthetic",
  316. "syntheticReason": "六次快速静默响应:按次数计时会在第 5 次后提醒,按时间计时不提醒;真实模型不一定连续调用工具。"
  317. },
  318. "maxMatches": 1,
  319. "match": {
  320. "method": "POST",
  321. "pathIncludes": "/messages",
  322. "bodyIncludes": ["E2E_SILENT_REMINDER_FAST", "toolu_e2e_silent_fast_4"],
  323. "bodyExcludes": [
  324. "toolu_e2e_silent_fast_5",
  325. "Generate a concise title",
  326. "CRITICAL: Respond with TEXT ONLY"
  327. ]
  328. },
  329. "response": {
  330. "statusCode": 200,
  331. "toolUse": {
  332. "id": "toolu_e2e_silent_fast_5",
  333. "name": "Bash",
  334. "input": {
  335. "command": "true",
  336. "description": "E2E silent step 5"
  337. }
  338. }
  339. }
  340. },
  341. {
  342. "id": "silent-reminder-fast-6",
  343. "description": "第 6 次快速静默响应。",
  344. "metadata": {
  345. "kind": "main",
  346. "timingPolicy": "fast-tool-use",
  347. "source": "synthetic",
  348. "syntheticReason": "六次快速静默响应:按次数计时会在第 5 次后提醒,按时间计时不提醒;真实模型不一定连续调用工具。"
  349. },
  350. "maxMatches": 1,
  351. "match": {
  352. "method": "POST",
  353. "pathIncludes": "/messages",
  354. "bodyIncludes": ["E2E_SILENT_REMINDER_FAST", "toolu_e2e_silent_fast_5"],
  355. "bodyExcludes": [
  356. "toolu_e2e_silent_fast_6",
  357. "Generate a concise title",
  358. "CRITICAL: Respond with TEXT ONLY"
  359. ]
  360. },
  361. "response": {
  362. "statusCode": 200,
  363. "toolUse": {
  364. "id": "toolu_e2e_silent_fast_6",
  365. "name": "Bash",
  366. "input": {
  367. "command": "true",
  368. "description": "E2E silent step 6"
  369. }
  370. }
  371. }
  372. },
  373. {
  374. "id": "silent-reminder-fast-7",
  375. "description": "六次快速静默响应之后固定文字收口。",
  376. "metadata": {
  377. "kind": "main",
  378. "timingPolicy": "fast-text",
  379. "source": "synthetic",
  380. "syntheticReason": "响应正文只用于稳定结束本轮;核心证据是七个请求都没有静默提醒。"
  381. },
  382. "maxMatches": 1,
  383. "match": {
  384. "method": "POST",
  385. "pathIncludes": "/messages",
  386. "bodyIncludes": ["E2E_SILENT_REMINDER_FAST", "toolu_e2e_silent_fast_6"],
  387. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  388. },
  389. "response": {
  390. "statusCode": 200,
  391. "text": {
  392. "id": "e2e-silent-reminder-fast-done",
  393. "inputTokens": 128,
  394. "outputTokens": 12,
  395. "text": "E2E_SILENT_REMINDER_FAST_DONE"
  396. }
  397. }
  398. }
  399. ]
  400. }