conversation-session-goal-resume-stale-target.json 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-goal-resume-stale-target",
  4. "spec": "./test/e2e/conversation-session/goals/conversation-session-goal-resume-stale-target.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-goal-resume-stale-target-title-sidecar",
  8. "description": "本例标题旁路响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy fixture 或触发后台网络重试。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"upstream-e2e-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "goal-resume-stale-controlled-goal",
  31. "description": "真实 Goal 运行期间入队,随后通过 Stop 暂停目标并保留队列。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "controlled-stream",
  35. "source": "synthetic",
  36. "syntheticReason": "用受控流维持真实 active Goal,测试通过 UI Stop 取消,不写 renderer 状态。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "bodyIncludes": ["E2E_GOAL_RESUME_STALE_OBJECTIVE"],
  43. "bodyExcludes": [
  44. "E2E_GOAL_RESUME_STALE_SEND_NOW",
  45. "Generate a concise title",
  46. "Verify whether the active session goal",
  47. "CRITICAL: Respond with TEXT ONLY"
  48. ]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "statusMessage": "OK",
  53. "headers": {
  54. "cache-control": "no-cache",
  55. "content-type": "text/event-stream; charset=utf-8"
  56. },
  57. "releaseAfterChunks": 3,
  58. "chunks": [
  59. {
  60. "offsetMs": 0,
  61. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-sidebar-stop-status-race\",\"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"
  62. },
  63. {
  64. "offsetMs": 0,
  65. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  66. },
  67. {
  68. "offsetMs": 0,
  69. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\n"
  70. },
  71. {
  72. "offsetMs": 0,
  73. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek-e2e-ok\"}}\n\n"
  74. },
  75. {
  76. "offsetMs": 0,
  77. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  78. },
  79. {
  80. "offsetMs": 0,
  81. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n"
  82. },
  83. {
  84. "offsetMs": 0,
  85. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  86. }
  87. ]
  88. }
  89. },
  90. {
  91. "id": "upstream-goal-resume-stale-send-now-final",
  92. "description": "M07k stale active meta 下队列 item 点立即发送后的固定回复。",
  93. "metadata": {
  94. "kind": "main",
  95. "timingPolicy": "fast-text",
  96. "source": "synthetic",
  97. "syntheticReason": "真实队列项立即发送后必须只产生一次新请求并完成,不恢复 Goal verifier。"
  98. },
  99. "maxMatches": 1,
  100. "match": {
  101. "method": "POST",
  102. "pathIncludes": "/messages",
  103. "bodyIncludes": ["E2E_GOAL_RESUME_STALE_SEND_NOW"],
  104. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  105. "lastUserMessageIncludes": ["E2E_GOAL_RESUME_STALE_SEND_NOW"]
  106. },
  107. "response": {
  108. "statusCode": 200,
  109. "text": {
  110. "id": "upstream-e2e-goal-resume-stale-send-now-final",
  111. "inputTokens": 128,
  112. "outputTokens": 12,
  113. "text": "upstream-e2e-ok"
  114. }
  115. }
  116. }
  117. ]
  118. }