conversation-session-v4-load-older.json 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-load-older",
  4. "spec": "./test/e2e/conversation-session/history/conversation-session-v4-load-older.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-load-older-title",
  8. "description": "E2E_V4_OLDER_HISTORY_001 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_V4_OLDER_HISTORY_001 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_V4_OLDER_HISTORY_001"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "v4-load-older-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"V4 Load Older E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "v4-load-older-turn1-long-history",
  32. "description": "M5④ R-06 loadOlder 门禁:25 个 completed turn → 75 条 raw projection rows(> 快照尾窗 60),重开会话后顶部历史需经 rows/range 补页可达。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "游标分页断言需要确定的 completed turn 数、raw row 数和可滚动高度;真实 provider 无法稳定复现该窗口边界。"
  38. },
  39. "maxMatches": 25,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_V4_OLDER_HISTORY_"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "cache-control": "no-cache",
  51. "content-type": "text/event-stream; charset=utf-8"
  52. },
  53. "chunks": [
  54. {
  55. "offsetMs": 0,
  56. "text": "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"v4-load-older-turn1\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"deepseek-v4-flash\", \"content\": [], \"stop_reason\": null, \"stop_sequence\": null, \"usage\": {\"input_tokens\": 64, \"cache_creation_input_tokens\": 0, \"cache_read_input_tokens\": 0, \"output_tokens\": 0, \"service_tier\": \"standard\"}}}\n\n"
  57. },
  58. {
  59. "offsetMs": 5,
  60. "text": "event: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}\n\n"
  61. },
  62. {
  63. "offsetMs": 10,
  64. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4 loadOlder completed turn response:此段保持足够长度以形成稳定的 turn 高度,验证 snapshot 尾窗、rows/range prepend 与顶部历史可达;输入 marker 用于区分每一轮持久历史。\"}}\n\n"
  65. },
  66. {
  67. "offsetMs": 15,
  68. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  69. },
  70. {
  71. "offsetMs": 20,
  72. "text": "event: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 900}}\n\n"
  73. },
  74. {
  75. "offsetMs": 25,
  76. "text": "event: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  77. }
  78. ]
  79. }
  80. }
  81. ]
  82. }