conversation-session-v4-goal.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-goal",
  4. "spec": "./test/e2e/conversation-session/conversation-session-v4-goal.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-goal-title",
  8. "description": "E2E_V4_GOAL_SEED 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_V4_GOAL_SEED 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": [
  19. "Generate a concise title",
  20. "E2E_V4_GOAL_SEED"
  21. ]
  22. },
  23. "response": {
  24. "statusCode": 200,
  25. "text": {
  26. "id": "v4-goal-title",
  27. "inputTokens": 64,
  28. "outputTokens": 8,
  29. "text": "{\"title\":\"V4 Goal E2E\"}"
  30. }
  31. }
  32. },
  33. {
  34. "id": "v4-goal-seed",
  35. "description": "M4 /goal 门禁:首轮固定回复,建立可设目标的 session。",
  36. "metadata": {
  37. "kind": "main",
  38. "timingPolicy": "fast-text",
  39. "source": "synthetic",
  40. "syntheticReason": "goal slash 需要一个已存在 session;首轮文案固定。"
  41. },
  42. "maxMatches": 1,
  43. "match": {
  44. "method": "POST",
  45. "pathIncludes": "/messages",
  46. "lastUserMessageIncludes": ["E2E_V4_GOAL_SEED"],
  47. "bodyExcludes": [
  48. "Generate a concise title",
  49. "CRITICAL: Respond with TEXT ONLY",
  50. "Continue working toward the active session goal"
  51. ]
  52. },
  53. "response": {
  54. "statusCode": 200,
  55. "text": {
  56. "id": "v4-goal-seed",
  57. "inputTokens": 80,
  58. "outputTokens": 8,
  59. "text": "V4_GOAL_SEED_OK"
  60. }
  61. }
  62. },
  63. {
  64. "id": "v4-goal-continuation-slow",
  65. "description": "M4 /goal 设置后的 continuation 慢流,保持 active target 窗口以断言 goal 横幅。",
  66. "metadata": {
  67. "kind": "main",
  68. "timingPolicy": "controlled-stream",
  69. "source": "synthetic",
  70. "syntheticReason": "goal 设置后需要一段 streaming 窗口稳定验证 active 目标横幅,真实模型可能过快完成或触发验证。"
  71. },
  72. "maxMatches": 1,
  73. "match": {
  74. "method": "POST",
  75. "pathIncludes": "/messages",
  76. "bodyIncludes": [
  77. "E2E_V4_GOAL_OBJECTIVE",
  78. "Continue working toward the active session goal"
  79. ],
  80. "bodyExcludes": [
  81. "Generate a concise title",
  82. "CRITICAL: Respond with TEXT ONLY",
  83. "Verify whether the active session goal"
  84. ]
  85. },
  86. "response": {
  87. "statusCode": 200,
  88. "statusMessage": "OK",
  89. "headers": {
  90. "cache-control": "no-cache",
  91. "content-type": "text/event-stream; charset=utf-8"
  92. },
  93. "chunks": [
  94. {
  95. "offsetMs": 0,
  96. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"v4-goal-continuation-slow\",\"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"
  97. },
  98. {
  99. "offsetMs": 250,
  100. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  101. },
  102. {
  103. "offsetMs": 500,
  104. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_GOAL_STREAMING \"}}\n\n"
  105. },
  106. {
  107. "offsetMs": 45000,
  108. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  109. },
  110. {
  111. "offsetMs": 45100,
  112. "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"
  113. },
  114. {
  115. "offsetMs": 45200,
  116. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  117. }
  118. ],
  119. "text": {
  120. "id": "v4-goal-continuation-slow",
  121. "inputTokens": 120,
  122. "outputTokens": 4,
  123. "text": "V4_GOAL_STREAMING"
  124. }
  125. }
  126. }
  127. ]
  128. }