conversation-session-automation-cron-create.json 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-automation-cron-create",
  4. "spec": "./test/e2e/conversation-session/automations/conversation-session-automation-cron-create.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-conversation-automation-cron-create-title",
  8. "description": "定时任务创建 case 的标题生成固定响应,避免标题请求误命中主流程 fixture。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不属于定时任务产品语义,只需稳定返回,避免标题请求误命中主流程 fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_AUTOMATION_CRON_CREATE"]
  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-automation-cron-create-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Automation Cron Create 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\"}}"
  27. }
  28. },
  29. {
  30. "id": "upstream-conversation-automation-cron-create-tool",
  31. "description": "首段响应:返回 CronCreate tool_use,以 31 小时 interval carrier 创建任务,供聊天卡片、详情回显和合法兼容 cron 断言。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "真实 provider 不一定稳定选择 CronCreate;本响应固定触发工具,专门验证会话内创建→聊天卡片→按 automationId 直达任务详情。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "bodyIncludes": ["E2E_AUTOMATION_CRON_CREATE"],
  43. "bodyExcludes": [
  44. "Generate a concise title",
  45. "CRITICAL: Respond with TEXT ONLY",
  46. "E2E_CRON_STANDUP"
  47. ]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "toolUse": {
  52. "id": "toolu_e2e_automation_cron_create",
  53. "messageId": "msg_e2e_automation_cron_create",
  54. "name": "CronCreate",
  55. "input": {
  56. "cron": "49 * * * *",
  57. "intervalUnit": "hourly",
  58. "interval": 31,
  59. "title": "E2E_CRON_STANDUP",
  60. "prompt": "Remind the team to run the daily standup."
  61. }
  62. }
  63. }
  64. },
  65. {
  66. "id": "upstream-conversation-automation-cron-create-final",
  67. "description": "收尾响应:CronCreate tool_result 进入历史后返回结束文本,稳定完成 case。",
  68. "metadata": {
  69. "kind": "main",
  70. "timingPolicy": "fast-text",
  71. "source": "synthetic",
  72. "syntheticReason": "CronCreate tool_result 进入历史后结束 case,真实 provider 回复内容不影响产品语义。"
  73. },
  74. "match": {
  75. "method": "POST",
  76. "pathIncludes": "/messages",
  77. "bodyIncludes": ["E2E_AUTOMATION_CRON_CREATE", "E2E_CRON_STANDUP"],
  78. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  79. },
  80. "response": {
  81. "statusCode": 200,
  82. "statusMessage": "OK",
  83. "text": {
  84. "id": "upstream-e2e-automation-cron-create-final",
  85. "inputTokens": 200,
  86. "outputTokens": 12,
  87. "text": "upstream-e2e-ok"
  88. }
  89. }
  90. }
  91. ]
  92. }