conversation-session-offpeak-create-existing-session.json 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-offpeak-create-existing-session",
  4. "spec": "./test/e2e/conversation-session/conversation-session-offpeak-create-existing-session.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-conversation-session-offpeak-create-existing-session-title",
  8. "description": "标题生成固定响应,避免标题请求误命中主流程 fixture。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不属于闲时任务产品语义,只需稳定返回。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": [
  19. "Generate a concise title",
  20. "E2E_OFFPEAK_EXISTING_WARMUP"
  21. ]
  22. },
  23. "response": {
  24. "statusCode": 200,
  25. "statusMessage": "OK",
  26. "headers": {
  27. "content-type": "application/json; charset=utf-8"
  28. },
  29. "body": "{\"id\": \"upstream-e2e-conversation-session-offpeak-create-existing-session-title\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"deepseek-v4-flash\", \"content\": [{\"type\": \"text\", \"text\": \"{\\\"title\\\": \\\"OffPeak Existing Session E2E\\\"}\"}], \"stop_reason\": \"end_turn\", \"stop_sequence\": null, \"usage\": {\"input_tokens\": 120, \"cache_creation_input_tokens\": 0, \"cache_read_input_tokens\": 0, \"output_tokens\": 20, \"service_tier\": \"standard\"}}"
  30. }
  31. },
  32. {
  33. "id": "upstream-conversation-session-offpeak-create-existing-session-warmup",
  34. "description": "重启前的普通一轮:纯文本回复,让会话成为有历史的已持久化会话。",
  35. "metadata": {
  36. "kind": "main",
  37. "timingPolicy": "fast-text",
  38. "source": "synthetic",
  39. "syntheticReason": "只需要一条稳定的已完成历史,回复内容不影响产品语义。"
  40. },
  41. "match": {
  42. "method": "POST",
  43. "pathIncludes": "/messages",
  44. "bodyIncludes": [
  45. "E2E_OFFPEAK_EXISTING_WARMUP"
  46. ],
  47. "bodyExcludes": [
  48. "Generate a concise title",
  49. "CRITICAL: Respond with TEXT ONLY",
  50. "E2E_OFFPEAK_EXISTING_CREATE"
  51. ]
  52. },
  53. "response": {
  54. "statusCode": 200,
  55. "statusMessage": "OK",
  56. "text": {
  57. "id": "upstream-e2e-conversation-session-offpeak-create-existing-session-warmup",
  58. "inputTokens": 200,
  59. "outputTokens": 12,
  60. "text": "E2E_OFFPEAK_EXISTING_WARMUP_OK"
  61. }
  62. }
  63. },
  64. {
  65. "id": "upstream-conversation-session-offpeak-create-existing-session-tool",
  66. "description": "冷恢复后的第二轮:返回 OffPeakCreate tool_use(只给 title/prompt,缺省走 D49-4)。",
  67. "metadata": {
  68. "kind": "main",
  69. "timingPolicy": "fast-text",
  70. "source": "synthetic",
  71. "syntheticReason": "真实 provider 不一定稳定选择 OffPeakCreate;固定触发工具,专门验证 v4 冷恢复会话仍有工具面并可直达编辑。"
  72. },
  73. "maxMatches": 1,
  74. "match": {
  75. "method": "POST",
  76. "pathIncludes": "/messages",
  77. "bodyIncludes": [
  78. "E2E_OFFPEAK_EXISTING_CREATE"
  79. ],
  80. "bodyExcludes": [
  81. "Generate a concise title",
  82. "CRITICAL: Respond with TEXT ONLY",
  83. "E2E_OFFPEAK_EXISTING_TASK"
  84. ]
  85. },
  86. "response": {
  87. "statusCode": 200,
  88. "toolUse": {
  89. "id": "toolu_e2e_conversation_session_offpeak_create_existing_session",
  90. "messageId": "msg_e2e_conversation_session_offpeak_create_existing_session",
  91. "name": "OffPeakCreate",
  92. "input": {
  93. "title": "E2E_OFFPEAK_EXISTING_TASK",
  94. "prompt": "E2E_OFFPEAK_SUBAGENT_CHILD_INHERIT: Review the open TODO comments in this workspace and draft a cleanup plan in TODO-PLAN.md."
  95. }
  96. }
  97. }
  98. },
  99. {
  100. "id": "upstream-conversation-session-offpeak-create-existing-session-final",
  101. "description": "OffPeakCreate tool_result 进入历史后的收尾文本。",
  102. "metadata": {
  103. "kind": "main",
  104. "timingPolicy": "fast-text",
  105. "source": "synthetic",
  106. "syntheticReason": "tool_result 进入历史后结束 case,真实回复内容不影响产品语义。"
  107. },
  108. "match": {
  109. "method": "POST",
  110. "pathIncludes": "/messages",
  111. "bodyIncludes": [
  112. "E2E_OFFPEAK_EXISTING_CREATE",
  113. "E2E_OFFPEAK_EXISTING_TASK"
  114. ],
  115. "bodyExcludes": [
  116. "Generate a concise title",
  117. "CRITICAL: Respond with TEXT ONLY"
  118. ]
  119. },
  120. "response": {
  121. "statusCode": 200,
  122. "statusMessage": "OK",
  123. "text": {
  124. "id": "upstream-e2e-conversation-session-offpeak-create-existing-session-final",
  125. "inputTokens": 200,
  126. "outputTokens": 12,
  127. "text": "upstream-e2e-ok"
  128. }
  129. }
  130. }
  131. ]
  132. }