conversation-session-reply-language.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-reply-language",
  4. "spec": "./test/e2e/conversation-session/context/conversation-session-reply-language.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "rl-title-default",
  8. "description": "RL01 首轮结束后的标题请求:默认规则。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "首轮结束后异步触发 title sidecar;用任务首轮 marker 隔离并固定标题响应;语言规则由 spec 断言。"
  14. },
  15. "maxMatches": 2,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["Generate a concise title", "E2E_RL_DEFAULT"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "text": {
  24. "id": "rl-title-default",
  25. "inputTokens": 64,
  26. "outputTokens": 8,
  27. "text": "{\"title\": \"Reply Language\"}"
  28. }
  29. }
  30. },
  31. {
  32. "id": "rl-title-new-task",
  33. "description": "RL07 新任务首轮结束后的标题请求:按公告语言。",
  34. "metadata": {
  35. "kind": "common",
  36. "timingPolicy": "fast-text",
  37. "source": "synthetic",
  38. "syntheticReason": "首轮结束后异步触发 title sidecar;用任务首轮 marker 隔离并固定标题响应;语言规则由 spec 断言。"
  39. },
  40. "maxMatches": 2,
  41. "match": {
  42. "method": "POST",
  43. "pathIncludes": "/messages",
  44. "bodyIncludes": ["Generate a concise title", "E2E_RL_NEWTASK"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "text": {
  49. "id": "rl-title-new-task",
  50. "inputTokens": 64,
  51. "outputTokens": 8,
  52. "text": "{\"title\": \"Reply Language\"}"
  53. }
  54. }
  55. },
  56. {
  57. "id": "rl-default",
  58. "description": "RL01 默认留空的首轮:不公告。",
  59. "metadata": {
  60. "kind": "main",
  61. "timingPolicy": "fast-text",
  62. "source": "synthetic",
  63. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  64. },
  65. "maxMatches": 2,
  66. "match": {
  67. "method": "POST",
  68. "pathIncludes": "/messages",
  69. "lastUserMessageIncludes": ["E2E_RL_DEFAULT"],
  70. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  71. },
  72. "response": {
  73. "statusCode": 200,
  74. "text": {
  75. "id": "rl-default",
  76. "inputTokens": 80,
  77. "outputTokens": 8,
  78. "text": "RL_A_DEFAULT"
  79. }
  80. }
  81. },
  82. {
  83. "id": "rl-set",
  84. "description": "RL02 输入 简体中文 后的一轮:首次公告。",
  85. "metadata": {
  86. "kind": "main",
  87. "timingPolicy": "fast-text",
  88. "source": "synthetic",
  89. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  90. },
  91. "maxMatches": 2,
  92. "match": {
  93. "method": "POST",
  94. "pathIncludes": "/messages",
  95. "lastUserMessageIncludes": ["E2E_RL_SET"],
  96. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  97. },
  98. "response": {
  99. "statusCode": 200,
  100. "text": {
  101. "id": "rl-set",
  102. "inputTokens": 80,
  103. "outputTokens": 8,
  104. "text": "RL_A_SET"
  105. }
  106. }
  107. },
  108. {
  109. "id": "rl-same",
  110. "description": "RL03 值不变的一轮:不再公告。",
  111. "metadata": {
  112. "kind": "main",
  113. "timingPolicy": "fast-text",
  114. "source": "synthetic",
  115. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  116. },
  117. "maxMatches": 2,
  118. "match": {
  119. "method": "POST",
  120. "pathIncludes": "/messages",
  121. "lastUserMessageIncludes": ["E2E_RL_SAME"],
  122. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  123. },
  124. "response": {
  125. "statusCode": 200,
  126. "text": {
  127. "id": "rl-same",
  128. "inputTokens": 80,
  129. "outputTokens": 8,
  130. "text": "RL_A_SAME"
  131. }
  132. }
  133. },
  134. {
  135. "id": "rl-changed",
  136. "description": "RL04 改成 日本語 后的一轮:追加一条公告。",
  137. "metadata": {
  138. "kind": "main",
  139. "timingPolicy": "fast-text",
  140. "source": "synthetic",
  141. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  142. },
  143. "maxMatches": 2,
  144. "match": {
  145. "method": "POST",
  146. "pathIncludes": "/messages",
  147. "lastUserMessageIncludes": ["E2E_RL_CHANGED"],
  148. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  149. },
  150. "response": {
  151. "statusCode": 200,
  152. "text": {
  153. "id": "rl-changed",
  154. "inputTokens": 80,
  155. "outputTokens": 8,
  156. "text": "RL_A_CHANGED"
  157. }
  158. }
  159. },
  160. {
  161. "id": "rl-compact-summary",
  162. "description": "RL05 手动 /compact 的 summary 请求。",
  163. "metadata": {
  164. "kind": "main",
  165. "timingPolicy": "fast-text",
  166. "source": "synthetic",
  167. "syntheticReason": "手动 compact 需要固定 summary;summary 文案不参与断言。"
  168. },
  169. "maxMatches": 2,
  170. "match": {
  171. "method": "POST",
  172. "pathIncludes": "/messages",
  173. "bodyIncludes": ["E2E_RL_CHANGED", "CRITICAL: Respond with TEXT ONLY"],
  174. "bodyExcludes": ["Generate a concise title"]
  175. },
  176. "response": {
  177. "statusCode": 200,
  178. "text": {
  179. "id": "rl-compact-summary",
  180. "inputTokens": 256,
  181. "outputTokens": 64,
  182. "text": "<analysis>The user sent three short messages and asked for fixed replies.</analysis>\n\n<summary>1. Primary Request and Intent:\n The user asked for fixed replies. The assistant replied with the fixed text each time.\n</summary>"
  183. }
  184. }
  185. },
  186. {
  187. "id": "rl-compacted",
  188. "description": "RL05 compact 后的第一轮:重述 日本語 公告。",
  189. "metadata": {
  190. "kind": "main",
  191. "timingPolicy": "fast-text",
  192. "source": "synthetic",
  193. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  194. },
  195. "maxMatches": 2,
  196. "match": {
  197. "method": "POST",
  198. "pathIncludes": "/messages",
  199. "lastUserMessageIncludes": ["E2E_RL_COMPACTED"],
  200. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  201. },
  202. "response": {
  203. "statusCode": 200,
  204. "text": {
  205. "id": "rl-compacted",
  206. "inputTokens": 80,
  207. "outputTokens": 8,
  208. "text": "RL_A_COMPACTED"
  209. }
  210. }
  211. },
  212. {
  213. "id": "rl-resumed",
  214. "description": "RL06 重启 App 冷恢复后的一轮:不再公告。",
  215. "metadata": {
  216. "kind": "main",
  217. "timingPolicy": "fast-text",
  218. "source": "synthetic",
  219. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  220. },
  221. "maxMatches": 2,
  222. "match": {
  223. "method": "POST",
  224. "pathIncludes": "/messages",
  225. "lastUserMessageIncludes": ["E2E_RL_RESUMED"],
  226. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  227. },
  228. "response": {
  229. "statusCode": 200,
  230. "text": {
  231. "id": "rl-resumed",
  232. "inputTokens": 80,
  233. "outputTokens": 8,
  234. "text": "RL_A_RESUMED"
  235. }
  236. }
  237. },
  238. {
  239. "id": "rl-new-task",
  240. "description": "RL07 新任务首轮:公告当前设置。",
  241. "metadata": {
  242. "kind": "main",
  243. "timingPolicy": "fast-text",
  244. "source": "synthetic",
  245. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  246. },
  247. "maxMatches": 2,
  248. "match": {
  249. "method": "POST",
  250. "pathIncludes": "/messages",
  251. "lastUserMessageIncludes": ["E2E_RL_NEWTASK"],
  252. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  253. },
  254. "response": {
  255. "statusCode": 200,
  256. "text": {
  257. "id": "rl-new-task",
  258. "inputTokens": 80,
  259. "outputTokens": 8,
  260. "text": "RL_A_NEWTASK"
  261. }
  262. }
  263. },
  264. {
  265. "id": "rl-cleared",
  266. "description": "RL08 清空设置后的一轮:发一次清除公告。",
  267. "metadata": {
  268. "kind": "main",
  269. "timingPolicy": "fast-text",
  270. "source": "synthetic",
  271. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  272. },
  273. "maxMatches": 2,
  274. "match": {
  275. "method": "POST",
  276. "pathIncludes": "/messages",
  277. "lastUserMessageIncludes": ["E2E_RL_CLEARED"],
  278. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  279. },
  280. "response": {
  281. "statusCode": 200,
  282. "text": {
  283. "id": "rl-cleared",
  284. "inputTokens": 80,
  285. "outputTokens": 8,
  286. "text": "RL_A_CLEARED"
  287. }
  288. }
  289. },
  290. {
  291. "id": "rl-after-clear",
  292. "description": "RL08 清除后的第二轮:不再公告。",
  293. "metadata": {
  294. "kind": "main",
  295. "timingPolicy": "fast-text",
  296. "source": "synthetic",
  297. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  298. },
  299. "maxMatches": 2,
  300. "match": {
  301. "method": "POST",
  302. "pathIncludes": "/messages",
  303. "lastUserMessageIncludes": ["E2E_RL_AFTERCLEAR"],
  304. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  305. },
  306. "response": {
  307. "statusCode": 200,
  308. "text": {
  309. "id": "rl-after-clear",
  310. "inputTokens": 80,
  311. "outputTokens": 8,
  312. "text": "RL_A_AFTERCLEAR"
  313. }
  314. }
  315. },
  316. {
  317. "id": "rl-other-window",
  318. "description": "RL09 在第二个窗口改设置后,第一个窗口的一轮:追加 Deutsch 公告。",
  319. "metadata": {
  320. "kind": "main",
  321. "timingPolicy": "fast-text",
  322. "source": "synthetic",
  323. "syntheticReason": "以本轮 marker 匹配最后一条 user 消息,固定回复;语言公告的形态由 spec 读取请求体断言,不在 matcher 里门禁。"
  324. },
  325. "maxMatches": 2,
  326. "match": {
  327. "method": "POST",
  328. "pathIncludes": "/messages",
  329. "lastUserMessageIncludes": ["E2E_RL_OTHERWINDOW"],
  330. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  331. },
  332. "response": {
  333. "statusCode": 200,
  334. "text": {
  335. "id": "rl-other-window",
  336. "inputTokens": 80,
  337. "outputTokens": 8,
  338. "text": "RL_A_OTHERWINDOW"
  339. }
  340. }
  341. }
  342. ]
  343. }