conversation-session-compact-manual-queue.json 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-compact-manual-queue",
  4. "spec": "./test/e2e/conversation-session/conversation-session-compact-manual-queue.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-compact-manual-queue-prep-one",
  8. "description": "manual compact held queue 第一轮预置纯文本回复。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "第一轮只用于形成可 compact 的普通历史,真实 provider 文案不影响 held queue 语义。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": [
  20. "E2E_COMPACT_PREP_ONE"
  21. ],
  22. "bodyExcludes": [
  23. "Generate a concise title",
  24. "CRITICAL: Respond with TEXT ONLY"
  25. ],
  26. "lastUserMessageIncludes": [
  27. "E2E_COMPACT_PREP_ONE"
  28. ]
  29. },
  30. "response": {
  31. "statusCode": 200,
  32. "text": {
  33. "id": "upstream-e2e-compact-manual-queue-prep-one",
  34. "inputTokens": 128,
  35. "outputTokens": 12,
  36. "text": "upstream-e2e-ok"
  37. }
  38. }
  39. },
  40. {
  41. "id": "upstream-compact-manual-queue-readonly-final",
  42. "description": "manual compact held queue 第二轮 Read tool_result 后最终回复。",
  43. "metadata": {
  44. "kind": "main",
  45. "timingPolicy": "fast-text",
  46. "source": "synthetic",
  47. "syntheticReason": "第二轮只用于构造含 readonly tool_result 的 compact 历史,工具业务由本地文件 fixture 决定。"
  48. },
  49. "maxMatches": 1,
  50. "match": {
  51. "method": "POST",
  52. "pathIncludes": "/messages",
  53. "bodyIncludes": [
  54. "E2E_COMPACT_PREP_TWO",
  55. "E2E_READONLY_TOOL_FILE_CONTENT"
  56. ],
  57. "bodyExcludes": [
  58. "Generate a concise title",
  59. "CRITICAL: Respond with TEXT ONLY"
  60. ]
  61. },
  62. "response": {
  63. "statusCode": 200,
  64. "text": {
  65. "id": "upstream-e2e-compact-manual-queue-readonly-final",
  66. "inputTokens": 190,
  67. "outputTokens": 12,
  68. "text": "upstream-e2e-ok"
  69. }
  70. }
  71. },
  72. {
  73. "id": "upstream-compact-manual-queue-summary-success",
  74. "description": "held queue 存在时手动 /compact 成功的 summary 响应。",
  75. "metadata": {
  76. "kind": "main",
  77. "timingPolicy": "fast-text",
  78. "source": "synthetic",
  79. "syntheticReason": "该响应只用于证明 manual compact marker 完成且 held queue 未被消费,不依赖真实 summary 内容。"
  80. },
  81. "maxMatches": 1,
  82. "match": {
  83. "method": "POST",
  84. "pathIncludes": "/messages",
  85. "bodyIncludes": [
  86. "E2E_COMPACT_PREP_ONE",
  87. "CRITICAL: Respond with TEXT ONLY",
  88. "Do NOT call any tools",
  89. "\"stream\":true"
  90. ],
  91. "bodyExcludes": [
  92. "E2E_AUTO_COMPACT",
  93. "E2E_AUTO_ACTIONS"
  94. ]
  95. },
  96. "response": {
  97. "statusCode": 200,
  98. "statusMessage": "OK",
  99. "delayMs": 650,
  100. "text": {
  101. "id": "upstream-e2e-compact-manual-queue-summary-success",
  102. "inputTokens": 256,
  103. "outputTokens": 64,
  104. "text": "<analysis>Manual compact e2e replay summarized the existing main session without tools.</analysis>\n\n<summary>Conversation so far: the user asked the assistant to reply with exactly upstream-e2e-ok for the initial verification turns. The assistant replied with upstream-e2e-ok. A held queue item existed during manual compact and was intentionally not consumed.</summary>"
  105. }
  106. }
  107. },
  108. {
  109. "id": "upstream-compact-manual-queue-held-contract",
  110. "description": "manual compact held queue marker 合同占位;不应被 provider 消费。",
  111. "metadata": {
  112. "kind": "main",
  113. "timingPolicy": "fast-text",
  114. "source": "synthetic",
  115. "syntheticReason": "held queue 在 manual compact 前后都必须保留;fixture 只覆盖 marker 合同。"
  116. },
  117. "maxMatches": 0,
  118. "match": {
  119. "method": "POST",
  120. "pathIncludes": "/messages",
  121. "bodyIncludes": [
  122. "E2E_COMPACT_QUEUE_HELD"
  123. ],
  124. "bodyExcludes": [
  125. "Generate a concise title",
  126. "CRITICAL: Respond with TEXT ONLY"
  127. ],
  128. "lastUserMessageIncludes": [
  129. "E2E_COMPACT_QUEUE_HELD"
  130. ]
  131. },
  132. "response": {
  133. "statusCode": 200,
  134. "text": {
  135. "id": "upstream-e2e-compact-manual-queue-held-should-not-send",
  136. "inputTokens": 128,
  137. "outputTokens": 12,
  138. "text": "upstream-e2e-ok"
  139. }
  140. }
  141. },
  142. {
  143. "id": "upstream-compact-manual-queue-append-contract",
  144. "description": "manual compact 完成后追加 held queue marker 合同占位;不应立即发送。",
  145. "metadata": {
  146. "kind": "main",
  147. "timingPolicy": "fast-text",
  148. "source": "synthetic",
  149. "syntheticReason": "manual compact 完成后 queue 仍 held,追加文本应入队而不是触发 provider。"
  150. },
  151. "maxMatches": 0,
  152. "match": {
  153. "method": "POST",
  154. "pathIncludes": "/messages",
  155. "bodyIncludes": [
  156. "E2E_COMPACT_QUEUE_APPEND_AFTER_SUCCESS"
  157. ],
  158. "bodyExcludes": [
  159. "Generate a concise title",
  160. "CRITICAL: Respond with TEXT ONLY"
  161. ],
  162. "lastUserMessageIncludes": [
  163. "E2E_COMPACT_QUEUE_APPEND_AFTER_SUCCESS"
  164. ]
  165. },
  166. "response": {
  167. "statusCode": 200,
  168. "text": {
  169. "id": "upstream-e2e-compact-manual-queue-append-should-not-send",
  170. "inputTokens": 128,
  171. "outputTokens": 12,
  172. "text": "upstream-e2e-ok"
  173. }
  174. }
  175. }
  176. ]
  177. }