conversation-session-plan-approval-feedback-user-message.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-plan-approval-feedback-user-message",
  4. "spec": "./test/e2e/conversation-session/planning/conversation-session-plan-approval-feedback-user-message.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-plan-approval-feedback-user-message-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": "upstream-conversation-plan-approval-enter-plan-call",
  31. "description": "首轮请求稳定返回 EnterPlanMode 工具调用,制造 plan mode 审批前置状态。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "需要稳定制造 plan mode 状态,避免依赖真实模型是否选择 EnterPlanMode。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_PLAN_APPROVAL_FEEDBACK_USER_MESSAGE"],
  43. "bodyIncludes": [
  44. "E2E_PLAN_APPROVAL_FEEDBACK_USER_MESSAGE",
  45. "E2E_PLAN_APPROVAL_ENTER_PLAN",
  46. "E2E_PLAN_APPROVAL_EXIT_PLAN"
  47. ],
  48. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "toolUse": {
  53. "id": "toolu_e2e_plan_approval_enter_plan_mode",
  54. "name": "EnterPlanMode",
  55. "input": {}
  56. }
  57. }
  58. },
  59. {
  60. "id": "upstream-conversation-plan-approval-exit-plan-call",
  61. "description": "进入 plan mode 后返回 ExitPlanMode 工具调用,触发审批弹窗。",
  62. "metadata": {
  63. "kind": "main",
  64. "timingPolicy": "fast-text",
  65. "source": "synthetic",
  66. "syntheticReason": "需要稳定触发 ExitPlanMode 审批弹窗,避免模型输出文本而跳过工具。"
  67. },
  68. "maxMatches": 1,
  69. "match": {
  70. "method": "POST",
  71. "pathIncludes": "/messages",
  72. "bodyIncludes": ["E2E_PLAN_APPROVAL_EXIT_PLAN", "toolu_e2e_plan_approval_enter_plan_mode"],
  73. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  74. },
  75. "response": {
  76. "statusCode": 200,
  77. "toolUse": {
  78. "id": "toolu_e2e_plan_approval_exit_plan_mode",
  79. "name": "ExitPlanMode",
  80. "input": {
  81. "plan": "E2E_PLAN_APPROVAL_PLAN_BODY: 1. Add runtime bridge. 2. Add UI regression coverage."
  82. }
  83. }
  84. }
  85. },
  86. {
  87. "id": "upstream-conversation-plan-approval-feedback-final",
  88. "description": "审批 custom feedback 被续作用户消息后返回最终文本。",
  89. "metadata": {
  90. "kind": "main",
  91. "timingPolicy": "fast-text",
  92. "source": "synthetic",
  93. "syntheticReason": "需要断言 custom feedback 出现在下一轮用户消息,而不是被塞回 ExitPlanMode tool_result。"
  94. },
  95. "maxMatches": 1,
  96. "match": {
  97. "method": "POST",
  98. "pathIncludes": "/messages",
  99. "lastUserMessageIncludes": ["E2E_PLAN_APPROVAL_FEEDBACK"],
  100. "bodyIncludes": [
  101. "E2E_PLAN_APPROVAL_FEEDBACK",
  102. "E2E_PLAN_APPROVAL_EXIT_PLAN",
  103. "toolu_e2e_plan_approval_exit_plan_mode",
  104. "The plan was not approved by the user."
  105. ],
  106. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  107. },
  108. "response": {
  109. "statusCode": 200,
  110. "text": "upstream-e2e-ok"
  111. }
  112. }
  113. ]
  114. }