conversation-session-offpeak-create.json 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-offpeak-create",
  4. "spec": "./test/e2e/conversation-session/automations/conversation-session-offpeak-create.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-conversation-offpeak-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_OFFPEAK_CHAT_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-offpeak-create-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"OffPeak Chat 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-offpeak-create-tool",
  31. "description": "首段响应:返回 OffPeakCreate tool_use,只给 title/prompt,让 permissionMode/model/thoughtLevel 走 D49-4 缺省(yolo / 白名单末位 / 最高档)。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "真实 provider 不一定稳定选择 OffPeakCreate;本响应固定触发工具,专门验证会话内创建→轮尾卡→按 offPeakTaskId 直达闲时编辑表单。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "bodyIncludes": ["E2E_OFFPEAK_CHAT_CREATE"],
  43. "bodyExcludes": [
  44. "Generate a concise title",
  45. "CRITICAL: Respond with TEXT ONLY",
  46. "E2E_OFFPEAK_DIGEST"
  47. ]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "toolUse": {
  52. "id": "toolu_e2e_offpeak_create",
  53. "messageId": "msg_e2e_offpeak_create",
  54. "name": "OffPeakCreate",
  55. "input": {
  56. "title": "E2E_OFFPEAK_DIGEST",
  57. "prompt": "Summarize today's changed files in this workspace and write a short digest to DIGEST.md."
  58. }
  59. }
  60. }
  61. },
  62. {
  63. "id": "upstream-conversation-offpeak-create-final",
  64. "description": "收尾响应:OffPeakCreate tool_result 进入历史后返回简短确认文本,稳定完成 case。",
  65. "metadata": {
  66. "kind": "main",
  67. "timingPolicy": "fast-text",
  68. "source": "synthetic",
  69. "syntheticReason": "OffPeakCreate tool_result 进入历史后结束 case,真实 provider 回复内容不影响产品语义。"
  70. },
  71. "match": {
  72. "method": "POST",
  73. "pathIncludes": "/messages",
  74. "bodyIncludes": ["E2E_OFFPEAK_CHAT_CREATE", "E2E_OFFPEAK_DIGEST"],
  75. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  76. },
  77. "response": {
  78. "statusCode": 200,
  79. "statusMessage": "OK",
  80. "text": {
  81. "id": "upstream-e2e-offpeak-create-final",
  82. "inputTokens": 200,
  83. "outputTokens": 12,
  84. "text": "upstream-e2e-ok"
  85. }
  86. }
  87. }
  88. ]
  89. }