conversation-session-plan-approval-primary-submit.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-plan-approval-primary-submit",
  4. "spec": "./test/e2e/conversation-session/planning/conversation-session-plan-approval-primary-submit.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-plan-approval-primary-submit-enter-plan-call",
  8. "description": "首轮请求稳定返回 EnterPlanMode 工具调用,制造计划审批前置状态。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "需要稳定制造 plan mode 状态,避免依赖真实模型是否选择 EnterPlanMode。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "lastUserMessageIncludes": ["E2E_PLAN_APPROVAL_PRIMARY_SUBMIT"],
  20. "bodyIncludes": [
  21. "E2E_PLAN_APPROVAL_PRIMARY_SUBMIT",
  22. "E2E_PLAN_APPROVAL_PRIMARY_SUBMIT_ENTER_PLAN",
  23. "E2E_PLAN_APPROVAL_PRIMARY_SUBMIT_EXIT_PLAN"
  24. ],
  25. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  26. },
  27. "response": {
  28. "statusCode": 200,
  29. "toolUse": {
  30. "id": "toolu_e2e_plan_approval_primary_submit_enter",
  31. "name": "EnterPlanMode",
  32. "input": {}
  33. }
  34. }
  35. },
  36. {
  37. "id": "upstream-plan-approval-primary-submit-exit-plan-call",
  38. "description": "进入 plan mode 后返回 ExitPlanMode 工具调用,触发只有批准选项的审批弹窗。",
  39. "metadata": {
  40. "kind": "main",
  41. "timingPolicy": "fast-text",
  42. "source": "synthetic",
  43. "syntheticReason": "需要稳定触发 ExitPlanMode 审批弹窗,确保 E2E 只验证 footer 主提交路径。"
  44. },
  45. "maxMatches": 1,
  46. "match": {
  47. "method": "POST",
  48. "pathIncludes": "/messages",
  49. "bodyIncludes": [
  50. "E2E_PLAN_APPROVAL_PRIMARY_SUBMIT_EXIT_PLAN",
  51. "toolu_e2e_plan_approval_primary_submit_enter"
  52. ],
  53. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  54. },
  55. "response": {
  56. "statusCode": 200,
  57. "toolUse": {
  58. "id": "toolu_e2e_plan_approval_primary_submit_exit",
  59. "name": "ExitPlanMode",
  60. "input": {
  61. "plan": "E2E_PLAN_APPROVAL_PRIMARY_SUBMIT_PLAN_BODY: verify footer submit approves an unchanged plan."
  62. }
  63. }
  64. }
  65. },
  66. {
  67. "id": "upstream-plan-approval-primary-submit-auto-compact",
  68. "description": "审批通过后的 mid-turn auto compact 返回稳定摘要,让主 turn 继续。",
  69. "metadata": {
  70. "kind": "main",
  71. "timingPolicy": "fast-text",
  72. "source": "synthetic",
  73. "syntheticReason": "E2E 模型使用极小 context window,ExitPlanMode 批准后会稳定触发 mid-turn auto compact;本响应只用于让审批主路径继续。"
  74. },
  75. "maxMatches": 1,
  76. "match": {
  77. "method": "POST",
  78. "pathIncludes": "/messages",
  79. "bodyIncludes": [
  80. "CRITICAL: Respond with TEXT ONLY",
  81. "E2E_PLAN_APPROVAL_PRIMARY_SUBMIT_ENTER_PLAN",
  82. "\"stream\":true"
  83. ],
  84. "bodyExcludes": ["Generate a concise title"]
  85. },
  86. "response": {
  87. "statusCode": 200,
  88. "statusMessage": "OK",
  89. "text": {
  90. "id": "upstream-e2e-plan-approval-primary-submit-auto-compact",
  91. "inputTokens": 192,
  92. "outputTokens": 48,
  93. "text": "<analysis>Summarized the approved plan transition.</analysis>\n\n<summary>User has approved your plan. E2E_PLAN_APPROVAL_PRIMARY_SUBMIT_PLAN_BODY: verify footer submit approves an unchanged plan.</summary>"
  94. }
  95. }
  96. },
  97. {
  98. "id": "upstream-plan-approval-primary-submit-final",
  99. "description": "footer 主提交批准计划后返回固定文本,让审批轮稳定完成。",
  100. "metadata": {
  101. "kind": "main",
  102. "timingPolicy": "fast-text",
  103. "source": "synthetic",
  104. "syntheticReason": "核心合同是主提交产生 approved tool result;最终回复只需稳定结束当前轮。"
  105. },
  106. "maxMatches": 1,
  107. "match": {
  108. "method": "POST",
  109. "pathIncludes": "/messages",
  110. "bodyIncludes": [
  111. "toolu_e2e_plan_approval_primary_submit_exit",
  112. "E2E_PLAN_APPROVAL_PRIMARY_SUBMIT_PLAN_BODY",
  113. "User has approved your plan"
  114. ],
  115. "bodyExcludes": [
  116. "The plan was not approved by the user.",
  117. "Generate a concise title",
  118. "CRITICAL: Respond with TEXT ONLY"
  119. ]
  120. },
  121. "response": {
  122. "statusCode": 200,
  123. "text": "upstream-e2e-ok"
  124. }
  125. }
  126. ]
  127. }