conversation-session-id-compatibility.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-id-compatibility",
  4. "spec": "./test/e2e/conversation-session/runtime/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-tool-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. "lastUserMessageIncludes": ["E2E_SID_REFERENCE_0"],
  36. "bodyExcludes": ["Generate a concise title"]
  37. },
  38. "response": {
  39. "statusCode": 200,
  40. "toolUse": {
  41. "id": "toolu_e2e_sid_0",
  42. "name": "ReadSession",
  43. "input": {
  44. "sessionId": "session_0123456789abcdef0123456789abcdef",
  45. "view": "messages",
  46. "limit": 20
  47. }
  48. }
  49. },
  50. "maxMatches": 1
  51. },
  52. {
  53. "id": "sid-reference-0",
  54. "metadata": {
  55. "kind": "main",
  56. "source": "synthetic",
  57. "timingPolicy": "fast-text",
  58. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  59. },
  60. "match": {
  61. "method": "POST",
  62. "pathIncludes": "/messages",
  63. "bodyIncludes": ["E2E_SID_REFERENCE_0", "E2E_SID_HISTORY_0"],
  64. "bodyExcludes": ["Generate a concise title"]
  65. },
  66. "response": {
  67. "statusCode": 200,
  68. "text": "E2E_SID_REFERENCE_OK_0"
  69. }
  70. },
  71. {
  72. "id": "sid-follow-0",
  73. "metadata": {
  74. "kind": "main",
  75. "source": "synthetic",
  76. "timingPolicy": "fast-text",
  77. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  78. },
  79. "match": {
  80. "method": "POST",
  81. "pathIncludes": "/messages",
  82. "lastUserMessageIncludes": ["E2E_SID_FOLLOW_0"],
  83. "bodyExcludes": ["Generate a concise title"]
  84. },
  85. "response": {
  86. "statusCode": 200,
  87. "text": "E2E_SID_FOLLOW_OK_0"
  88. }
  89. },
  90. {
  91. "id": "sid-tool-1",
  92. "metadata": {
  93. "kind": "main",
  94. "source": "synthetic",
  95. "timingPolicy": "fast-text",
  96. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  97. },
  98. "match": {
  99. "method": "POST",
  100. "pathIncludes": "/messages",
  101. "lastUserMessageIncludes": ["E2E_SID_REFERENCE_1"],
  102. "bodyExcludes": ["Generate a concise title"]
  103. },
  104. "response": {
  105. "statusCode": 200,
  106. "toolUse": {
  107. "id": "toolu_e2e_sid_1",
  108. "name": "ReadSession",
  109. "input": {
  110. "sessionId": "session_12345678-1234-4234-8234-123456789abc",
  111. "view": "messages",
  112. "limit": 20
  113. }
  114. }
  115. },
  116. "maxMatches": 1
  117. },
  118. {
  119. "id": "sid-reference-1",
  120. "metadata": {
  121. "kind": "main",
  122. "source": "synthetic",
  123. "timingPolicy": "fast-text",
  124. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  125. },
  126. "match": {
  127. "method": "POST",
  128. "pathIncludes": "/messages",
  129. "bodyIncludes": ["E2E_SID_REFERENCE_1", "E2E_SID_HISTORY_1"],
  130. "bodyExcludes": ["Generate a concise title"]
  131. },
  132. "response": {
  133. "statusCode": 200,
  134. "text": "E2E_SID_REFERENCE_OK_1"
  135. }
  136. },
  137. {
  138. "id": "sid-follow-1",
  139. "metadata": {
  140. "kind": "main",
  141. "source": "synthetic",
  142. "timingPolicy": "fast-text",
  143. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  144. },
  145. "match": {
  146. "method": "POST",
  147. "pathIncludes": "/messages",
  148. "lastUserMessageIncludes": ["E2E_SID_FOLLOW_1"],
  149. "bodyExcludes": ["Generate a concise title"]
  150. },
  151. "response": {
  152. "statusCode": 200,
  153. "text": "E2E_SID_FOLLOW_OK_1"
  154. }
  155. },
  156. {
  157. "id": "sid-new",
  158. "metadata": {
  159. "kind": "main",
  160. "source": "synthetic",
  161. "timingPolicy": "fast-text",
  162. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  163. },
  164. "match": {
  165. "method": "POST",
  166. "pathIncludes": "/messages",
  167. "lastUserMessageIncludes": ["E2E_SID_NEW"],
  168. "bodyExcludes": ["Generate a concise title"]
  169. },
  170. "response": {
  171. "statusCode": 200,
  172. "text": "E2E_SID_NEW_OK"
  173. }
  174. },
  175. {
  176. "id": "sid-mobile-0",
  177. "metadata": {
  178. "kind": "main",
  179. "source": "synthetic",
  180. "timingPolicy": "fast-text",
  181. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  182. },
  183. "match": {
  184. "method": "POST",
  185. "pathIncludes": "/messages",
  186. "lastUserMessageIncludes": ["E2E_SID_MOBILE_0"],
  187. "bodyExcludes": ["Generate a concise title"]
  188. },
  189. "response": {
  190. "statusCode": 200,
  191. "text": "E2E_SID_MOBILE_OK_0"
  192. }
  193. },
  194. {
  195. "id": "sid-mobile-1",
  196. "metadata": {
  197. "kind": "main",
  198. "source": "synthetic",
  199. "timingPolicy": "fast-text",
  200. "syntheticReason": "验证原会话 ID 的持久化、完整重启与引用读取,模型只产生固定响应和精确工具调用。"
  201. },
  202. "match": {
  203. "method": "POST",
  204. "pathIncludes": "/messages",
  205. "lastUserMessageIncludes": ["E2E_SID_MOBILE_1"],
  206. "bodyExcludes": ["Generate a concise title"]
  207. },
  208. "response": {
  209. "statusCode": 200,
  210. "text": "E2E_SID_MOBILE_OK_1"
  211. }
  212. },
  213. {
  214. "id": "sid-retry",
  215. "metadata": {
  216. "kind": "main",
  217. "source": "synthetic",
  218. "timingPolicy": "fast-text",
  219. "syntheticReason": "旧客户端重复、并发、重启重放及 admission 后退出、横幅确认重发使用真实 Host/CLI/SQLite,仅模型响应固定。"
  220. },
  221. "match": {
  222. "method": "POST",
  223. "pathIncludes": "/messages",
  224. "lastUserMessageIncludes": ["E2E_SID_RETRY"],
  225. "bodyExcludes": ["Generate a concise title"]
  226. },
  227. "response": {
  228. "statusCode": 200,
  229. "text": "E2E_SID_RETRY_OK"
  230. }
  231. }
  232. ]
  233. }