conversation-session-v4-plan-shortcut.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-plan-shortcut",
  4. "spec": "./test/e2e/conversation-session/conversation-session-v4-plan-shortcut.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-plan-shortcut-title",
  8. "description": "E2E_V4_PLAN_SHORTCUT_SEED 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "Plan shortcut 任务需要一个已有 session;固定 seed 的 title sidecar,避免回退到共享 provider fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_V4_PLAN_SHORTCUT_SEED"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "v4-plan-shortcut-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"V4 Plan Shortcut E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "v4-plan-shortcut-seed",
  32. "description": "Plan shortcut seed:建立可发送普通 follow-up 的已有 session。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "空命令和附件拒绝不需要 provider;任务组合需要稳定的已有 session。"
  38. },
  39. "maxMatches": 2,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_V4_PLAN_SHORTCUT_SEED"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "text": {
  49. "id": "v4-plan-shortcut-seed",
  50. "inputTokens": 80,
  51. "outputTokens": 8,
  52. "text": "V4_PLAN_SHORTCUT_SEED_OK"
  53. }
  54. }
  55. },
  56. {
  57. "id": "v4-plan-shortcut-task-one",
  58. "description": "`/plan <task>` 首次切换 Plan 后的普通任务响应。",
  59. "metadata": {
  60. "kind": "main",
  61. "timingPolicy": "fast-text",
  62. "source": "synthetic",
  63. "syntheticReason": "验证 mode CAS 后 sendText 的 provider 正文只包含任务,不包含 `/plan` 前缀。"
  64. },
  65. "maxMatches": 1,
  66. "match": {
  67. "method": "POST",
  68. "pathIncludes": "/messages",
  69. "lastUserMessageIncludes": ["E2E_V4_PLAN_SHORTCUT_TASK_ONE"],
  70. "lastUserMessageExcludes": ["/plan"],
  71. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  72. },
  73. "response": {
  74. "statusCode": 200,
  75. "text": {
  76. "id": "v4-plan-shortcut-task-one",
  77. "inputTokens": 96,
  78. "outputTokens": 8,
  79. "text": "V4_PLAN_SHORTCUT_TASK_ONE_OK"
  80. }
  81. }
  82. },
  83. {
  84. "id": "v4-plan-shortcut-task-two",
  85. "description": "已处于 Plan 模式时 `/plan <task>` noop 后继续发送的普通任务响应。",
  86. "metadata": {
  87. "kind": "main",
  88. "timingPolicy": "fast-text",
  89. "source": "synthetic",
  90. "syntheticReason": "验证重复 Plan mode CAS 收敛为 noop 后仍进入普通 sendText。"
  91. },
  92. "maxMatches": 1,
  93. "match": {
  94. "method": "POST",
  95. "pathIncludes": "/messages",
  96. "lastUserMessageIncludes": ["E2E_V4_PLAN_SHORTCUT_TASK_TWO"],
  97. "lastUserMessageExcludes": ["/plan"],
  98. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  99. },
  100. "response": {
  101. "statusCode": 200,
  102. "text": {
  103. "id": "v4-plan-shortcut-task-two",
  104. "inputTokens": 112,
  105. "outputTokens": 8,
  106. "text": "V4_PLAN_SHORTCUT_TASK_TWO_OK"
  107. }
  108. }
  109. }
  110. ]
  111. }