conversation-session-v4-compact.json 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-compact",
  4. "spec": "./test/e2e/conversation-session/conversation-session-v4-compact.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-compact-title",
  8. "description": "E2E_V4_COMPACT_SEED 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_V4_COMPACT_SEED 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": [
  19. "Generate a concise title",
  20. "E2E_V4_COMPACT_SEED"
  21. ]
  22. },
  23. "response": {
  24. "statusCode": 200,
  25. "text": {
  26. "id": "v4-compact-title",
  27. "inputTokens": 64,
  28. "outputTokens": 8,
  29. "text": "{\"title\":\"V4 Compact E2E\"}"
  30. }
  31. }
  32. },
  33. {
  34. "id": "v4-compact-seed",
  35. "description": "M4 /compact 门禁:首轮固定文本回复,形成待压缩的历史。",
  36. "metadata": {
  37. "kind": "main",
  38. "timingPolicy": "fast-text",
  39. "source": "synthetic",
  40. "syntheticReason": "compact 需要一段已完成历史;首轮只需稳定产出可被压缩的 assistant 文本。"
  41. },
  42. "maxMatches": 1,
  43. "match": {
  44. "method": "POST",
  45. "pathIncludes": "/messages",
  46. "lastUserMessageIncludes": ["E2E_V4_COMPACT_SEED"],
  47. "bodyExcludes": [
  48. "Generate a concise title",
  49. "CRITICAL: Respond with TEXT ONLY"
  50. ]
  51. },
  52. "response": {
  53. "statusCode": 200,
  54. "text": {
  55. "id": "v4-compact-seed",
  56. "inputTokens": 80,
  57. "outputTokens": 8,
  58. "text": "V4_COMPACT_SEED_OK"
  59. }
  60. }
  61. },
  62. {
  63. "id": "v4-compact-success",
  64. "description": "M4 /compact 门禁:手动 compact 的 streaming summary 成功响应。",
  65. "metadata": {
  66. "kind": "main",
  67. "timingPolicy": "fast-text",
  68. "source": "synthetic",
  69. "syntheticReason": "手动 compact 的核心断言是 v4 投影产出 [compact] · completed marker;summary 文案固定即可。"
  70. },
  71. "maxMatches": 1,
  72. "match": {
  73. "method": "POST",
  74. "pathIncludes": "/messages",
  75. "bodyIncludes": [
  76. "E2E_V4_COMPACT_SEED",
  77. "CRITICAL: Respond with TEXT ONLY",
  78. "V4_COMPACT_SEED_OK",
  79. "\"stream\":true"
  80. ],
  81. "bodyExcludes": ["Generate a concise title"]
  82. },
  83. "response": {
  84. "statusCode": 200,
  85. "statusMessage": "OK",
  86. "delayMs": 300,
  87. "text": {
  88. "id": "v4-compact-success",
  89. "inputTokens": 256,
  90. "outputTokens": 64,
  91. "text": "<analysis>V4 manual compact e2e summarized the existing session without tools.</analysis>\n\n<summary>Conversation so far: the user asked the assistant to reply with V4_COMPACT_SEED_OK for the initial verification turn, and the assistant did. No files or tools were required.</summary>"
  92. }
  93. }
  94. }
  95. ]
  96. }