conversation-session-id-compatibility.json 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-id-compatibility",
  4. "spec": "./test/e2e/conversation-session/conversation-session-id-compatibility.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "sid-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyIncludes": ["Generate a concise title"]
  18. },
  19. "response": {
  20. "statusCode": 200,
  21. "text": "{\"title\":\"Session ID compatibility\"}"
  22. }
  23. },
  24. {
  25. "id": "sid-lite-0",
  26. "metadata": {
  27. "kind": "main",
  28. "source": "synthetic",
  29. "timingPolicy": "fast-text",
  30. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  31. },
  32. "match": {
  33. "method": "POST",
  34. "pathIncludes": "/messages",
  35. "bodyIncludes": [
  36. "You are the extraction model for the ReadSessionContext tool.",
  37. "E2E_SID_HISTORY_0"
  38. ]
  39. },
  40. "response": {
  41. "statusCode": 200,
  42. "text": "E2E_SID_HISTORY_0: keep the original session identity."
  43. }
  44. },
  45. {
  46. "id": "sid-tool-0",
  47. "metadata": {
  48. "kind": "main",
  49. "source": "synthetic",
  50. "timingPolicy": "fast-text",
  51. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  52. },
  53. "match": {
  54. "method": "POST",
  55. "pathIncludes": "/messages",
  56. "lastUserMessageIncludes": ["E2E_SID_REFERENCE_0"],
  57. "bodyExcludes": ["Generate a concise title", "You are the extraction model"]
  58. },
  59. "response": {
  60. "statusCode": 200,
  61. "toolUse": {
  62. "id": "toolu_e2e_sid_0",
  63. "name": "ReadSessionContext",
  64. "input": {
  65. "sessionId": "session_0123456789abcdef0123456789abcdef",
  66. "query": "E2E_SID_HISTORY_0",
  67. "strategy": "relevant",
  68. "maxTokens": 1200
  69. }
  70. }
  71. },
  72. "maxMatches": 1
  73. },
  74. {
  75. "id": "sid-reference-0",
  76. "metadata": {
  77. "kind": "main",
  78. "source": "synthetic",
  79. "timingPolicy": "fast-text",
  80. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  81. },
  82. "match": {
  83. "method": "POST",
  84. "pathIncludes": "/messages",
  85. "bodyIncludes": ["E2E_SID_REFERENCE_0", "E2E_SID_HISTORY_0"],
  86. "bodyExcludes": ["Generate a concise title", "You are the extraction model"]
  87. },
  88. "response": {
  89. "statusCode": 200,
  90. "text": "E2E_SID_REFERENCE_OK_0"
  91. }
  92. },
  93. {
  94. "id": "sid-follow-0",
  95. "metadata": {
  96. "kind": "main",
  97. "source": "synthetic",
  98. "timingPolicy": "fast-text",
  99. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  100. },
  101. "match": {
  102. "method": "POST",
  103. "pathIncludes": "/messages",
  104. "lastUserMessageIncludes": ["E2E_SID_FOLLOW_0"],
  105. "bodyExcludes": ["Generate a concise title"]
  106. },
  107. "response": {
  108. "statusCode": 200,
  109. "text": "E2E_SID_FOLLOW_OK_0"
  110. }
  111. },
  112. {
  113. "id": "sid-lite-1",
  114. "metadata": {
  115. "kind": "main",
  116. "source": "synthetic",
  117. "timingPolicy": "fast-text",
  118. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  119. },
  120. "match": {
  121. "method": "POST",
  122. "pathIncludes": "/messages",
  123. "bodyIncludes": [
  124. "You are the extraction model for the ReadSessionContext tool.",
  125. "E2E_SID_HISTORY_1"
  126. ]
  127. },
  128. "response": {
  129. "statusCode": 200,
  130. "text": "E2E_SID_HISTORY_1: keep the original session identity."
  131. }
  132. },
  133. {
  134. "id": "sid-tool-1",
  135. "metadata": {
  136. "kind": "main",
  137. "source": "synthetic",
  138. "timingPolicy": "fast-text",
  139. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  140. },
  141. "match": {
  142. "method": "POST",
  143. "pathIncludes": "/messages",
  144. "lastUserMessageIncludes": ["E2E_SID_REFERENCE_1"],
  145. "bodyExcludes": ["Generate a concise title", "You are the extraction model"]
  146. },
  147. "response": {
  148. "statusCode": 200,
  149. "toolUse": {
  150. "id": "toolu_e2e_sid_1",
  151. "name": "ReadSessionContext",
  152. "input": {
  153. "sessionId": "session_12345678-1234-4234-8234-123456789abc",
  154. "query": "E2E_SID_HISTORY_1",
  155. "strategy": "relevant",
  156. "maxTokens": 1200
  157. }
  158. }
  159. },
  160. "maxMatches": 1
  161. },
  162. {
  163. "id": "sid-reference-1",
  164. "metadata": {
  165. "kind": "main",
  166. "source": "synthetic",
  167. "timingPolicy": "fast-text",
  168. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  169. },
  170. "match": {
  171. "method": "POST",
  172. "pathIncludes": "/messages",
  173. "bodyIncludes": ["E2E_SID_REFERENCE_1", "E2E_SID_HISTORY_1"],
  174. "bodyExcludes": ["Generate a concise title", "You are the extraction model"]
  175. },
  176. "response": {
  177. "statusCode": 200,
  178. "text": "E2E_SID_REFERENCE_OK_1"
  179. }
  180. },
  181. {
  182. "id": "sid-follow-1",
  183. "metadata": {
  184. "kind": "main",
  185. "source": "synthetic",
  186. "timingPolicy": "fast-text",
  187. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  188. },
  189. "match": {
  190. "method": "POST",
  191. "pathIncludes": "/messages",
  192. "lastUserMessageIncludes": ["E2E_SID_FOLLOW_1"],
  193. "bodyExcludes": ["Generate a concise title"]
  194. },
  195. "response": {
  196. "statusCode": 200,
  197. "text": "E2E_SID_FOLLOW_OK_1"
  198. }
  199. },
  200. {
  201. "id": "sid-new",
  202. "metadata": {
  203. "kind": "main",
  204. "source": "synthetic",
  205. "timingPolicy": "fast-text",
  206. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  207. },
  208. "match": {
  209. "method": "POST",
  210. "pathIncludes": "/messages",
  211. "lastUserMessageIncludes": ["E2E_SID_NEW"],
  212. "bodyExcludes": ["Generate a concise title"]
  213. },
  214. "response": {
  215. "statusCode": 200,
  216. "text": "E2E_SID_NEW_OK"
  217. }
  218. },
  219. {
  220. "id": "sid-mobile-0",
  221. "metadata": {
  222. "kind": "main",
  223. "source": "synthetic",
  224. "timingPolicy": "fast-text",
  225. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  226. },
  227. "match": {
  228. "method": "POST",
  229. "pathIncludes": "/messages",
  230. "lastUserMessageIncludes": ["E2E_SID_MOBILE_0"],
  231. "bodyExcludes": ["Generate a concise title"]
  232. },
  233. "response": {
  234. "statusCode": 200,
  235. "text": "E2E_SID_MOBILE_OK_0"
  236. }
  237. },
  238. {
  239. "id": "sid-mobile-1",
  240. "metadata": {
  241. "kind": "main",
  242. "source": "synthetic",
  243. "timingPolicy": "fast-text",
  244. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  245. },
  246. "match": {
  247. "method": "POST",
  248. "pathIncludes": "/messages",
  249. "lastUserMessageIncludes": ["E2E_SID_MOBILE_1"],
  250. "bodyExcludes": ["Generate a concise title"]
  251. },
  252. "response": {
  253. "statusCode": 200,
  254. "text": "E2E_SID_MOBILE_OK_1"
  255. }
  256. },
  257. {
  258. "id": "sid-retry",
  259. "metadata": {
  260. "kind": "main",
  261. "source": "synthetic",
  262. "timingPolicy": "fast-text",
  263. "syntheticReason": "旧客户端重复、并发、重启重放及 admission 后退出、横幅确认重发使用真实 Host/CLI/SQLite,仅模型响应固定。"
  264. },
  265. "match": {
  266. "method": "POST",
  267. "pathIncludes": "/messages",
  268. "lastUserMessageIncludes": ["E2E_SID_RETRY"],
  269. "bodyExcludes": ["Generate a concise title"]
  270. },
  271. "response": {
  272. "statusCode": 200,
  273. "text": "E2E_SID_RETRY_OK"
  274. }
  275. }
  276. ]
  277. }