conversation-session-r3-mobile.json 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-r3-mobile",
  4. "spec": "./test/e2e/conversation-session/remote/mobile/conversation-session-r3-mobile.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "r3-mob-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_MOBILE"],
  20. "bodyExcludes": ["E2E_R3_MOBILE_PERMISSION"]
  21. },
  22. "response": {
  23. "statusCode": 200,
  24. "text": {
  25. "id": "r3-mob-title",
  26. "inputTokens": 64,
  27. "outputTokens": 8,
  28. "text": "{\"title\":\"R3 mobile\"}"
  29. }
  30. }
  31. },
  32. {
  33. "id": "r3-mob-slow",
  34. "description": "手机断网期间桌面独立持续、完成后手机恢复回放",
  35. "metadata": {
  36. "kind": "main",
  37. "timingPolicy": "controlled-stream",
  38. "source": "synthetic",
  39. "syntheticReason": "手机离线15秒仍保持桌面流;显式释放后桌面完成,手机恢复才 replay 最终独立标记。"
  40. },
  41. "maxMatches": 1,
  42. "match": {
  43. "method": "POST",
  44. "pathIncludes": "/messages",
  45. "lastUserMessageIncludes": ["E2E_R3_MOBILE_SLOW"],
  46. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  47. },
  48. "response": {
  49. "statusCode": 200,
  50. "statusMessage": "OK",
  51. "headers": {
  52. "cache-control": "no-cache",
  53. "content-type": "text/event-stream; charset=utf-8"
  54. },
  55. "chunks": [
  56. {
  57. "offsetMs": 0,
  58. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"r3-mob-slow\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  59. },
  60. {
  61. "offsetMs": 250,
  62. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  63. },
  64. {
  65. "offsetMs": 500,
  66. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"R3_MOBILE_STREAMING \"}}\n\n"
  67. },
  68. {
  69. "offsetMs": 600,
  70. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"R3_MOBILE_STREAM_DONE\"}}\n\n"
  71. },
  72. {
  73. "offsetMs": 700,
  74. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  75. },
  76. {
  77. "offsetMs": 800,
  78. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
  79. },
  80. {
  81. "offsetMs": 900,
  82. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  83. }
  84. ],
  85. "releaseAfterChunks": 3
  86. }
  87. },
  88. {
  89. "id": "r3-mob-from-mobile",
  90. "description": "手机运行时桌面输入排队,释放手机回合后按FIFO消费",
  91. "metadata": {
  92. "kind": "main",
  93. "timingPolicy": "controlled-stream",
  94. "source": "synthetic",
  95. "syntheticReason": "用闸门保证桌面输入发生在手机回合running窗口内,验证统一队列。"
  96. },
  97. "maxMatches": 1,
  98. "match": {
  99. "method": "POST",
  100. "pathIncludes": "/messages",
  101. "lastUserMessageIncludes": ["E2E_R3_MOBILE_FROM_MOBILE"],
  102. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  103. },
  104. "response": {
  105. "statusCode": 200,
  106. "statusMessage": "OK",
  107. "headers": {
  108. "cache-control": "no-cache",
  109. "content-type": "text/event-stream; charset=utf-8"
  110. },
  111. "chunks": [
  112. {
  113. "offsetMs": 0,
  114. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"r3-mob-from-mobile\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  115. },
  116. {
  117. "offsetMs": 250,
  118. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  119. },
  120. {
  121. "offsetMs": 500,
  122. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"R3_MOBILE_FROM_MOBILE_RUNNING \"}}\n\n"
  123. },
  124. {
  125. "offsetMs": 600,
  126. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"R3_MOBILE_FROM_MOBILE_REPLY\"}}\n\n"
  127. },
  128. {
  129. "offsetMs": 700,
  130. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  131. },
  132. {
  133. "offsetMs": 800,
  134. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
  135. },
  136. {
  137. "offsetMs": 900,
  138. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  139. }
  140. ],
  141. "releaseAfterChunks": 3
  142. }
  143. },
  144. {
  145. "id": "r3-mob-from-desktop",
  146. "description": "桌面排队回合的独立完成标记",
  147. "metadata": {
  148. "kind": "main",
  149. "timingPolicy": "fast-text",
  150. "source": "synthetic",
  151. "syntheticReason": "区分两端输入的实际回复,防止旧首发回复使断言提前通过。"
  152. },
  153. "maxMatches": 1,
  154. "match": {
  155. "method": "POST",
  156. "pathIncludes": "/messages",
  157. "lastUserMessageIncludes": ["E2E_R3_MOBILE_FROM_DESKTOP"],
  158. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  159. },
  160. "response": {
  161. "statusCode": 200,
  162. "text": {
  163. "id": "r3-mob-from-desktop",
  164. "inputTokens": 64,
  165. "outputTokens": 8,
  166. "text": "R3_MOBILE_FROM_DESKTOP_REPLY"
  167. }
  168. }
  169. },
  170. {
  171. "id": "r3-mob-main",
  172. "description": "其它",
  173. "metadata": {
  174. "kind": "main",
  175. "timingPolicy": "fast-text",
  176. "source": "synthetic",
  177. "syntheticReason": "首发/fork/edit/手机 ACK 丢失恢复"
  178. },
  179. "maxMatches": 20,
  180. "match": {
  181. "method": "POST",
  182. "pathIncludes": "/messages",
  183. "bodyIncludes": ["E2E_R3_MOBILE_"],
  184. "bodyExcludes": [
  185. "Generate a concise title",
  186. "CRITICAL: Respond with TEXT ONLY",
  187. "E2E_R3_MOBILE_PERMISSION"
  188. ]
  189. },
  190. "response": {
  191. "statusCode": 200,
  192. "text": {
  193. "id": "r3-mob-main",
  194. "inputTokens": 64,
  195. "outputTokens": 8,
  196. "text": "R3_MOBILE_REPLY"
  197. }
  198. }
  199. }
  200. ]
  201. }