conversation-session-v4-rewind-queue-background.json 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-rewind-queue-background",
  4. "spec": "./test/e2e/conversation-session/editing/conversation-session-v4-rewind-queue-background.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "pv4-20-title",
  8. "description": "PV4-20 held queue case-local 标题。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题不参与 queue 守恒。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_PV4_20_ORIGINAL"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "pv4-20-title",
  24. "inputTokens": 48,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"PV4 20 Queue Rewind\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "pv4-20-original",
  32. "description": "PV4-20 compact 覆盖前 latest query 回复。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "编辑后应退出 active branch。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_PV4_20_ORIGINAL"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "text": {
  49. "id": "pv4-20-original",
  50. "inputTokens": 56,
  51. "outputTokens": 8,
  52. "text": "PV4_20_ORIGINAL_REPLY"
  53. }
  54. }
  55. },
  56. {
  57. "id": "pv4-20-compact-interrupted",
  58. "description": "PV4-20 首次 compact 保持 running,期间排入 future intents 与第二个 compact。",
  59. "metadata": {
  60. "kind": "main",
  61. "timingPolicy": "controlled-stream",
  62. "source": "synthetic",
  63. "syntheticReason": "固定运行窗口后 stop,建立当前产品可达的 held queue。"
  64. },
  65. "maxMatches": 1,
  66. "match": {
  67. "method": "POST",
  68. "pathIncludes": "/messages",
  69. "bodyIncludes": [
  70. "E2E_PV4_20_ORIGINAL",
  71. "PV4_20_ORIGINAL_REPLY",
  72. "CRITICAL: Respond with TEXT ONLY",
  73. "\"stream\":true"
  74. ],
  75. "bodyExcludes": ["Generate a concise title"]
  76. },
  77. "response": {
  78. "statusCode": 200,
  79. "delayMs": 30000,
  80. "text": {
  81. "id": "pv4-20-compact-interrupted",
  82. "inputTokens": 128,
  83. "outputTokens": 24,
  84. "text": "<summary>PV4_20_INTERRUPTED_COMPACT_SHOULD_NOT_APPLY</summary>"
  85. }
  86. }
  87. },
  88. {
  89. "id": "pv4-20-compact-stable",
  90. "description": "PV4-20 held queue 中 send-now 的第二个 compact 成功覆盖 latest query。",
  91. "metadata": {
  92. "kind": "main",
  93. "timingPolicy": "fast-text",
  94. "source": "synthetic",
  95. "syntheticReason": "验证 stable compact 后 edit 仍保留另外两个 held future intents。"
  96. },
  97. "maxMatches": 1,
  98. "match": {
  99. "method": "POST",
  100. "pathIncludes": "/messages",
  101. "bodyIncludes": [
  102. "E2E_PV4_20_ORIGINAL",
  103. "PV4_20_ORIGINAL_REPLY",
  104. "CRITICAL: Respond with TEXT ONLY",
  105. "\"stream\":true"
  106. ],
  107. "bodyExcludes": ["Generate a concise title"]
  108. },
  109. "response": {
  110. "statusCode": 200,
  111. "text": {
  112. "id": "pv4-20-compact-stable",
  113. "inputTokens": 128,
  114. "outputTokens": 24,
  115. "text": "<summary>PV4_20_COMPACT_SUMMARY</summary>"
  116. }
  117. }
  118. },
  119. {
  120. "id": "pv4-20-edited",
  121. "description": "PV4-20 queue 保持后 edited intent 回复。",
  122. "metadata": {
  123. "kind": "main",
  124. "timingPolicy": "fast-text",
  125. "source": "synthetic",
  126. "syntheticReason": "新请求只消费 edited intent,不 drain held queue。"
  127. },
  128. "maxMatches": 1,
  129. "match": {
  130. "method": "POST",
  131. "pathIncludes": "/messages",
  132. "lastUserMessageIncludes": ["E2E_PV4_20_EDITED"],
  133. "bodyExcludes": ["Generate a concise title"]
  134. },
  135. "response": {
  136. "statusCode": 200,
  137. "text": {
  138. "id": "pv4-20-edited",
  139. "inputTokens": 64,
  140. "outputTokens": 8,
  141. "text": "PV4_20_EDITED_REPLY"
  142. }
  143. }
  144. },
  145. {
  146. "id": "pv4-20-queue-one",
  147. "description": "PV4-20 rewind 后显式消费保留的第一条 queue item。",
  148. "metadata": {
  149. "kind": "main",
  150. "timingPolicy": "fast-text",
  151. "source": "synthetic",
  152. "syntheticReason": "验证 queue 身份和顺序保留后只消费一次。"
  153. },
  154. "maxMatches": 1,
  155. "match": {
  156. "method": "POST",
  157. "pathIncludes": "/messages",
  158. "lastUserMessageIncludes": ["E2E_PV4_20_QUEUE_ONE"],
  159. "bodyExcludes": ["Generate a concise title"]
  160. },
  161. "response": {
  162. "statusCode": 200,
  163. "text": {
  164. "id": "pv4-20-queue-one",
  165. "inputTokens": 72,
  166. "outputTokens": 8,
  167. "text": "PV4_20_QUEUE_ONE_REPLY"
  168. }
  169. }
  170. },
  171. {
  172. "id": "pv4-20-queue-two",
  173. "description": "PV4-20 rewind 后显式消费保留的第二条 queue item。",
  174. "metadata": {
  175. "kind": "main",
  176. "timingPolicy": "fast-text",
  177. "source": "synthetic",
  178. "syntheticReason": "验证 queue 身份和顺序保留后只消费一次。"
  179. },
  180. "maxMatches": 1,
  181. "match": {
  182. "method": "POST",
  183. "pathIncludes": "/messages",
  184. "lastUserMessageIncludes": ["E2E_PV4_20_QUEUE_TWO"],
  185. "bodyExcludes": ["Generate a concise title"]
  186. },
  187. "response": {
  188. "statusCode": 200,
  189. "text": {
  190. "id": "pv4-20-queue-two",
  191. "inputTokens": 80,
  192. "outputTokens": 8,
  193. "text": "PV4_20_QUEUE_TWO_REPLY"
  194. }
  195. }
  196. },
  197. {
  198. "id": "pv4-23-title",
  199. "description": "PV4-23 background generation case-local 标题。",
  200. "metadata": {
  201. "kind": "common",
  202. "timingPolicy": "fast-text",
  203. "source": "synthetic",
  204. "syntheticReason": "标题不参与后台 task generation。"
  205. },
  206. "match": {
  207. "method": "POST",
  208. "pathIncludes": "/messages",
  209. "bodyIncludes": ["Generate a concise title", "E2E_PV4_23_BACKGROUND_ORIGINAL"]
  210. },
  211. "response": {
  212. "statusCode": 200,
  213. "text": {
  214. "id": "pv4-23-title",
  215. "inputTokens": 48,
  216. "outputTokens": 8,
  217. "text": "{\"title\":\"PV4 23 Background Rewind\"}"
  218. }
  219. }
  220. },
  221. {
  222. "id": "pv4-23-background-tool",
  223. "description": "PV4-23 原 turn 启动长时后台 Bash。",
  224. "metadata": {
  225. "kind": "main",
  226. "timingPolicy": "controlled-stream",
  227. "source": "synthetic",
  228. "syntheticReason": "保持 running 直到 edit 的 stop barrier 取消它。"
  229. },
  230. "maxMatches": 1,
  231. "match": {
  232. "method": "POST",
  233. "pathIncludes": "/messages",
  234. "lastUserMessageIncludes": ["E2E_PV4_23_BACKGROUND_ORIGINAL"],
  235. "bodyExcludes": ["Generate a concise title", "Command running in background"]
  236. },
  237. "response": {
  238. "statusCode": 200,
  239. "toolUse": {
  240. "id": "toolu_pv4_23_background",
  241. "messageId": "msg_pv4_23_background",
  242. "name": "Bash",
  243. "input": {
  244. "command": "sleep 300",
  245. "run_in_background": true,
  246. "description": "PV4-23 rewind fence"
  247. }
  248. }
  249. }
  250. },
  251. {
  252. "id": "pv4-23-background-final",
  253. "description": "PV4-23 后台分离后原 turn 结束回复。",
  254. "metadata": {
  255. "kind": "main",
  256. "timingPolicy": "fast-text",
  257. "source": "synthetic",
  258. "syntheticReason": "主轮稳定后仍保留 running task,供 edit 取消。"
  259. },
  260. "maxMatches": 1,
  261. "match": {
  262. "method": "POST",
  263. "pathIncludes": "/messages",
  264. "bodyIncludes": ["E2E_PV4_23_BACKGROUND_ORIGINAL", "Command running in background"],
  265. "bodyExcludes": ["Generate a concise title"]
  266. },
  267. "response": {
  268. "statusCode": 200,
  269. "text": {
  270. "id": "pv4-23-background-final",
  271. "inputTokens": 96,
  272. "outputTokens": 8,
  273. "text": "PV4_23_BACKGROUND_ORIGINAL_REPLY"
  274. }
  275. }
  276. },
  277. {
  278. "id": "pv4-23-background-edited",
  279. "description": "PV4-23 旧 Bash 取消后的 edited intent 回复。",
  280. "metadata": {
  281. "kind": "main",
  282. "timingPolicy": "fast-text",
  283. "source": "synthetic",
  284. "syntheticReason": "新 branch 只启动一次 provider request。"
  285. },
  286. "maxMatches": 1,
  287. "match": {
  288. "method": "POST",
  289. "pathIncludes": "/messages",
  290. "lastUserMessageIncludes": ["E2E_PV4_23_BACKGROUND_EDITED"],
  291. "bodyExcludes": ["Generate a concise title"]
  292. },
  293. "response": {
  294. "statusCode": 200,
  295. "text": {
  296. "id": "pv4-23-background-edited",
  297. "inputTokens": 64,
  298. "outputTokens": 8,
  299. "text": "PV4_23_BACKGROUND_EDITED_REPLY"
  300. }
  301. }
  302. }
  303. ]
  304. }