conversation-session-v4-goal.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-goal",
  4. "spec": "./test/e2e/conversation-session/goals/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": ["Generate a concise title", "E2E_V4_GOAL_SEED"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "v4-goal-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"V4 Goal E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "v4-goal-seed",
  32. "description": "M4 /goal 门禁:首轮固定回复,建立可设目标的 session。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "goal slash 需要一个已存在 session;首轮文案固定。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_V4_GOAL_SEED"],
  44. "bodyExcludes": [
  45. "Generate a concise title",
  46. "CRITICAL: Respond with TEXT ONLY",
  47. "Continue working toward the active session goal"
  48. ]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "text": {
  53. "id": "v4-goal-seed",
  54. "inputTokens": 80,
  55. "outputTokens": 8,
  56. "text": "V4_GOAL_SEED_OK"
  57. }
  58. }
  59. },
  60. {
  61. "id": "v4-goal-continuation-slow",
  62. "description": "M4 /goal continuation 首个输出投影后挂起,由真实暂停操作中止请求。",
  63. "metadata": {
  64. "kind": "main",
  65. "timingPolicy": "controlled-stream",
  66. "source": "synthetic",
  67. "syntheticReason": "首个输出新增行会递增 revision;先等待输出投影,再在显式关卡内验证暂停 ACK 与 paused,避免固定慢流的竞争窗口。"
  68. },
  69. "maxMatches": 1,
  70. "match": {
  71. "method": "POST",
  72. "pathIncludes": "/messages",
  73. "bodyIncludes": [
  74. "E2E_V4_GOAL_OBJECTIVE",
  75. "Continue working toward the active session goal"
  76. ],
  77. "bodyExcludes": [
  78. "Generate a concise title",
  79. "CRITICAL: Respond with TEXT ONLY",
  80. "Verify whether the active session goal"
  81. ]
  82. },
  83. "response": {
  84. "statusCode": 200,
  85. "statusMessage": "OK",
  86. "headers": {
  87. "cache-control": "no-cache",
  88. "content-type": "text/event-stream; charset=utf-8"
  89. },
  90. "chunks": [
  91. {
  92. "offsetMs": 0,
  93. "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"
  94. },
  95. {
  96. "offsetMs": 0,
  97. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  98. },
  99. {
  100. "offsetMs": 0,
  101. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_GOAL_STREAMING \"}}\n\n"
  102. },
  103. {
  104. "offsetMs": 0,
  105. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  106. },
  107. {
  108. "offsetMs": 0,
  109. "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"
  110. },
  111. {
  112. "offsetMs": 0,
  113. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  114. }
  115. ],
  116. "text": {
  117. "id": "v4-goal-continuation-slow",
  118. "inputTokens": 120,
  119. "outputTokens": 4,
  120. "text": "V4_GOAL_STREAMING"
  121. },
  122. "releaseAfterChunks": 3
  123. }
  124. }
  125. ]
  126. }