conversation-session-r3-compact-goal.json 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-r3-compact-goal",
  4. "spec": "./test/e2e/conversation-session/remote/execution/conversation-session-r3-compact-goal.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "r3-cg-title",
  8. "description": "标题",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题不属于断言"
  14. },
  15. "maxMatches": 8,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["Generate a concise title", "E2E_R3_COMPACT_GOAL"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"r3-cg-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"R3 stale generation\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "r3-cg-compact",
  31. "description": "M4 /compact 门禁:手动 compact 的 streaming summary 成功响应。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "手动 compact 的核心断言是 v4 投影产出 [compact] · completed marker;summary 文案固定即可。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "bodyIncludes": ["E2E_R3_COMPACT_GOAL", "CRITICAL: Respond with TEXT ONLY"],
  43. "bodyExcludes": ["Generate a concise title"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "statusMessage": "OK",
  48. "delayMs": 300,
  49. "text": {
  50. "id": "v4-compact-success",
  51. "inputTokens": 256,
  52. "outputTokens": 64,
  53. "text": "<analysis>R3 compact</analysis>\n<summary>R3_COMPACT_SUMMARY: the user sent E2E_R3_COMPACT_GOAL_A_FIRST_PROMPT and got a fixed reply.</summary>"
  54. }
  55. }
  56. },
  57. {
  58. "id": "r3-cg-goal-continuation",
  59. "description": "M4 /goal 设置后的 continuation 慢流,保持 active target 窗口以断言 goal 横幅。",
  60. "metadata": {
  61. "kind": "main",
  62. "timingPolicy": "controlled-stream",
  63. "source": "synthetic",
  64. "syntheticReason": "goal 设置后需要一段 streaming 窗口稳定验证 active 目标横幅,真实模型可能过快完成或触发验证。"
  65. },
  66. "maxMatches": 3,
  67. "match": {
  68. "method": "POST",
  69. "pathIncludes": "/messages",
  70. "bodyIncludes": [
  71. "E2E_R3_COMPACT_GOAL_OBJECTIVE",
  72. "Continue working toward the active session goal"
  73. ],
  74. "bodyExcludes": [
  75. "Generate a concise title",
  76. "CRITICAL: Respond with TEXT ONLY",
  77. "Verify whether the active session goal"
  78. ]
  79. },
  80. "response": {
  81. "statusCode": 200,
  82. "statusMessage": "OK",
  83. "headers": {
  84. "cache-control": "no-cache",
  85. "content-type": "text/event-stream; charset=utf-8"
  86. },
  87. "chunks": [
  88. {
  89. "offsetMs": 0,
  90. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"r3-cg-goal-continuation\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  91. },
  92. {
  93. "offsetMs": 250,
  94. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  95. },
  96. {
  97. "offsetMs": 500,
  98. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"R3_GOAL_STREAMING \"}}\n\n"
  99. },
  100. {
  101. "offsetMs": 45000,
  102. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  103. },
  104. {
  105. "offsetMs": 45100,
  106. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
  107. },
  108. {
  109. "offsetMs": 45200,
  110. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  111. }
  112. ],
  113. "text": {
  114. "id": "r3-cg-goal-continuation",
  115. "inputTokens": 120,
  116. "outputTokens": 4,
  117. "text": "R3_GOAL_STREAMING"
  118. }
  119. }
  120. },
  121. {
  122. "id": "r3-cg-goal-verifier",
  123. "description": "自然完成 goal 的 verifier pass。",
  124. "metadata": {
  125. "kind": "main",
  126. "source": "synthetic",
  127. "timingPolicy": "fast-text",
  128. "syntheticReason": "固定 passed 结果,稳定制造 completed goal。"
  129. },
  130. "match": {
  131. "method": "POST",
  132. "pathIncludes": "/messages",
  133. "bodyIncludes": ["E2E_R3_COMPACT_GOAL_OBJECTIVE", "Verify whether the active session goal"],
  134. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  135. },
  136. "response": {
  137. "statusCode": 200,
  138. "body": "{\"id\":\"r3-cg-goal-verifier\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"passed\\\":true,\\\"reason\\\":\\\"fixture response matched objective\\\",\\\"nextAction\\\":\\\"\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":20,\"output_tokens\":12}}"
  139. },
  140. "maxMatches": 4
  141. },
  142. {
  143. "id": "r3-cg-main",
  144. "description": "其它",
  145. "metadata": {
  146. "kind": "main",
  147. "timingPolicy": "fast-text",
  148. "source": "synthetic",
  149. "syntheticReason": "首发/fork/edit"
  150. },
  151. "maxMatches": 10,
  152. "match": {
  153. "method": "POST",
  154. "pathIncludes": "/messages",
  155. "bodyIncludes": ["E2E_R3_COMPACT_GOAL_"],
  156. "bodyExcludes": [
  157. "Generate a concise title",
  158. "CRITICAL: Respond with TEXT ONLY",
  159. "Continue working toward the active session goal",
  160. "Verify whether the active session goal"
  161. ]
  162. },
  163. "response": {
  164. "statusCode": 200,
  165. "text": {
  166. "id": "r3-cg-main",
  167. "inputTokens": 64,
  168. "outputTokens": 8,
  169. "text": "R3_COMPACT_GOAL_REPLY"
  170. }
  171. }
  172. }
  173. ]
  174. }