conversation-session-v4-vertical-slice.json 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-vertical-slice",
  4. "spec": "./test/e2e/conversation-session/smoke/conversation-session-v4-vertical-slice.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-vertical-slice-title",
  8. "description": "E2E_V4_SLICE_TURN1 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_V4_SLICE_TURN1 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_V4_SLICE_TURN1"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "v4-vertical-slice-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"V4 Vertical Slice E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "v4-slice-turn1-controlled-stream",
  32. "description": "M3 竖切门禁 turn1:可控慢流,制造「agent 输出中刷新」窗口(首 delta 0.5s,完流 12s)。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "controlled-stream",
  36. "source": "synthetic",
  37. "syntheticReason": "刷新恢复断言需要稳定的 streaming 窗口;真实 provider 完流时间不可控。"
  38. },
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_V4_SLICE_TURN1"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "statusMessage": "OK",
  48. "headers": {
  49. "cache-control": "no-cache",
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "chunks": [
  53. {
  54. "offsetMs": 0,
  55. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"v4-slice-turn1\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  56. },
  57. {
  58. "offsetMs": 250,
  59. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  60. },
  61. {
  62. "offsetMs": 500,
  63. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_TURN1_STREAMING \"}}\n\n"
  64. },
  65. {
  66. "offsetMs": 3000,
  67. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"part-two \"}}\n\n"
  68. },
  69. {
  70. "offsetMs": 6000,
  71. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"part-three \"}}\n\n"
  72. },
  73. {
  74. "offsetMs": 9000,
  75. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"part-four \"}}\n\n"
  76. },
  77. {
  78. "offsetMs": 12000,
  79. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_TURN1_DONE\"}}\n\n"
  80. },
  81. {
  82. "offsetMs": 12200,
  83. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  84. },
  85. {
  86. "offsetMs": 12300,
  87. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":64,\"output_tokens\":24,\"service_tier\":\"standard\"}}\n\n"
  88. },
  89. {
  90. "offsetMs": 12400,
  91. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  92. }
  93. ],
  94. "text": {
  95. "id": "v4-slice-turn1",
  96. "inputTokens": 64,
  97. "outputTokens": 24,
  98. "text": "V4_TURN1_STREAMING part-two part-three part-four V4_TURN1_DONE"
  99. }
  100. }
  101. },
  102. {
  103. "id": "v4-slice-turn2-controlled-stream",
  104. "description": "M3 竖切门禁 turn2:长尾慢流(45s 才完流),留出点 stop 的窗口;stop 后客户端 abort。",
  105. "metadata": {
  106. "kind": "main",
  107. "timingPolicy": "controlled-stream",
  108. "source": "synthetic",
  109. "syntheticReason": "stop 断言需要 running 窗口远大于点击耗时,避免时序抖动误报。"
  110. },
  111. "match": {
  112. "method": "POST",
  113. "pathIncludes": "/messages",
  114. "lastUserMessageIncludes": ["E2E_V4_SLICE_TURN2"],
  115. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  116. },
  117. "response": {
  118. "statusCode": 200,
  119. "statusMessage": "OK",
  120. "headers": {
  121. "cache-control": "no-cache",
  122. "content-type": "text/event-stream; charset=utf-8"
  123. },
  124. "chunks": [
  125. {
  126. "offsetMs": 0,
  127. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"v4-slice-turn2\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":96,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  128. },
  129. {
  130. "offsetMs": 250,
  131. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  132. },
  133. {
  134. "offsetMs": 500,
  135. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_TURN2_STREAMING \"}}\n\n"
  136. },
  137. {
  138. "offsetMs": 5000,
  139. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"turn2-part-two \"}}\n\n"
  140. },
  141. {
  142. "offsetMs": 45000,
  143. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  144. },
  145. {
  146. "offsetMs": 45100,
  147. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":96,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n"
  148. },
  149. {
  150. "offsetMs": 45200,
  151. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  152. }
  153. ],
  154. "text": {
  155. "id": "v4-slice-turn2",
  156. "inputTokens": 96,
  157. "outputTokens": 12,
  158. "text": "V4_TURN2_STREAMING turn2-part-two"
  159. }
  160. }
  161. }
  162. ]
  163. }