conversation-session-fork.json 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-fork",
  4. "spec": "./test/e2e/conversation-session/conversation-session-fork.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-conversation-fork-basic-source-final",
  8. "description": "E01 基础 completed assistant fork 的 source turn 固定回复。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "基础 fork case 只需要稳定形成 completed assistant 消息;真实 provider 文案不影响 fork 边界语义。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": [
  20. "E2E_FORK_SOURCE"
  21. ],
  22. "bodyExcludes": [
  23. "Generate a concise title",
  24. "CRITICAL: Respond with TEXT ONLY"
  25. ],
  26. "lastUserMessageIncludes": [
  27. "E2E_FORK_SOURCE"
  28. ]
  29. },
  30. "response": {
  31. "statusCode": 200,
  32. "text": {
  33. "id": "upstream-e2e-conversation-fork-basic-source-final",
  34. "inputTokens": 128,
  35. "outputTokens": 12,
  36. "text": "upstream-e2e-ok"
  37. }
  38. }
  39. },
  40. {
  41. "id": "upstream-conversation-fork-goal-seed-final",
  42. "description": "E07 goal target 注入前 seed turn 固定回复。",
  43. "metadata": {
  44. "kind": "main",
  45. "timingPolicy": "fast-text",
  46. "source": "synthetic",
  47. "syntheticReason": "seed turn 只用于形成可 fork 的稳定 assistant 历史,后续 goal target 通过 sqlite 注入。"
  48. },
  49. "maxMatches": 1,
  50. "match": {
  51. "method": "POST",
  52. "pathIncludes": "/messages",
  53. "bodyIncludes": [
  54. "E2E_FORK_GOAL_SEED"
  55. ],
  56. "bodyExcludes": [
  57. "Generate a concise title",
  58. "CRITICAL: Respond with TEXT ONLY"
  59. ],
  60. "lastUserMessageIncludes": [
  61. "E2E_FORK_GOAL_SEED"
  62. ]
  63. },
  64. "response": {
  65. "statusCode": 200,
  66. "text": {
  67. "id": "upstream-e2e-conversation-fork-goal-seed-final",
  68. "inputTokens": 128,
  69. "outputTokens": 12,
  70. "text": "upstream-e2e-ok"
  71. }
  72. }
  73. },
  74. {
  75. "id": "upstream-conversation-fork-goal-source-final",
  76. "description": "E07 父 session 有 goal target 时的 source turn,用于让 renderer 同步已注入的 target。",
  77. "metadata": {
  78. "kind": "main",
  79. "timingPolicy": "fast-text",
  80. "source": "synthetic",
  81. "syntheticReason": "该 case 的核心语义是 fork child 继承父 target 且不复制父 queue;source turn 只负责完成一次 snapshot 同步,真实 provider 文案不影响断言。"
  82. },
  83. "maxMatches": 1,
  84. "match": {
  85. "method": "POST",
  86. "pathIncludes": "/messages",
  87. "bodyIncludes": [
  88. "E2E_FORK_GOAL_SOURCE"
  89. ],
  90. "bodyExcludes": [
  91. "Generate a concise title",
  92. "CRITICAL: Respond with TEXT ONLY"
  93. ],
  94. "lastUserMessageIncludes": [
  95. "E2E_FORK_GOAL_SOURCE"
  96. ]
  97. },
  98. "response": {
  99. "statusCode": 200,
  100. "text": {
  101. "id": "upstream-e2e-conversation-fork-goal-source-final",
  102. "inputTokens": 128,
  103. "outputTokens": 12,
  104. "text": "upstream-e2e-ok"
  105. }
  106. }
  107. },
  108. {
  109. "id": "upstream-conversation-fork-goal-held-queue-contract",
  110. "description": "E07 held queue marker 合同占位;fork 前父 session queue 不应立即发 provider。",
  111. "metadata": {
  112. "kind": "main",
  113. "timingPolicy": "fast-text",
  114. "source": "synthetic",
  115. "syntheticReason": "该 queued prompt 的产品语义是停留在父 session held queue,fork child 不复制它;运行时若命中该 fixture 反而说明 queue guard 失效。"
  116. },
  117. "maxMatches": 0,
  118. "match": {
  119. "method": "POST",
  120. "pathIncludes": "/messages",
  121. "bodyIncludes": [
  122. "E2E_FORK_GOAL_HELD_QUEUE"
  123. ],
  124. "bodyExcludes": [
  125. "Generate a concise title",
  126. "CRITICAL: Respond with TEXT ONLY"
  127. ],
  128. "lastUserMessageIncludes": [
  129. "E2E_FORK_GOAL_HELD_QUEUE"
  130. ]
  131. },
  132. "response": {
  133. "statusCode": 200,
  134. "text": {
  135. "id": "upstream-e2e-conversation-fork-goal-held-queue-should-not-send",
  136. "inputTokens": 128,
  137. "outputTokens": 12,
  138. "text": "upstream-e2e-ok"
  139. }
  140. }
  141. },
  142. {
  143. "id": "upstream-conversation-fork-edit-old-final",
  144. "description": "E09 edit fork 原始分支 source turn 固定回复。",
  145. "metadata": {
  146. "kind": "main",
  147. "timingPolicy": "fast-text",
  148. "source": "synthetic",
  149. "syntheticReason": "原始分支只用于随后 edit/rewind;真实 provider 文案不影响 active branch fork 断言。"
  150. },
  151. "maxMatches": 1,
  152. "match": {
  153. "method": "POST",
  154. "pathIncludes": "/messages",
  155. "bodyIncludes": [
  156. "E2E_FORK_EDIT_OLD"
  157. ],
  158. "bodyExcludes": [
  159. "Generate a concise title",
  160. "CRITICAL: Respond with TEXT ONLY"
  161. ],
  162. "lastUserMessageIncludes": [
  163. "E2E_FORK_EDIT_OLD"
  164. ]
  165. },
  166. "response": {
  167. "statusCode": 200,
  168. "text": {
  169. "id": "upstream-e2e-conversation-fork-edit-old-final",
  170. "inputTokens": 128,
  171. "outputTokens": 12,
  172. "text": "upstream-e2e-ok"
  173. }
  174. }
  175. },
  176. {
  177. "id": "upstream-conversation-fork-edit-active-final",
  178. "description": "E09 edit rerun 后 active branch 固定回复。",
  179. "metadata": {
  180. "kind": "main",
  181. "timingPolicy": "fast-text",
  182. "source": "synthetic",
  183. "syntheticReason": "该响应只需要稳定形成编辑后的 active assistant turn,用于证明 fork child 不复制旧分支。"
  184. },
  185. "maxMatches": 1,
  186. "match": {
  187. "method": "POST",
  188. "pathIncludes": "/messages",
  189. "bodyIncludes": [
  190. "E2E_FORK_EDIT_ACTIVE"
  191. ],
  192. "bodyExcludes": [
  193. "Generate a concise title",
  194. "CRITICAL: Respond with TEXT ONLY"
  195. ],
  196. "lastUserMessageIncludes": [
  197. "E2E_FORK_EDIT_ACTIVE"
  198. ]
  199. },
  200. "response": {
  201. "statusCode": 200,
  202. "text": {
  203. "id": "upstream-e2e-conversation-fork-edit-active-final",
  204. "inputTokens": 128,
  205. "outputTokens": 12,
  206. "text": "upstream-e2e-ok"
  207. }
  208. }
  209. }
  210. ]
  211. }