conversation-session-ttft-local-logs.json 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ttft-local-logs",
  4. "spec": "./test/e2e/conversation-session/telemetry/conversation-session-ttft-local-logs.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "ttft-local-title",
  8. "description": "本例标题旁路响应,防止 strict replay 依赖 legacy fixture。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "固定辅助标题响应,隔离标题生成耗时;主用例只验证正文链路和本地日志。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"msg_ttft-stages-title-sidecar\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"E2E regression task\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"output_tokens\":8}}"
  26. }
  27. },
  28. {
  29. "id": "ttft-local-warmup",
  30. "metadata": {
  31. "kind": "main",
  32. "timingPolicy": "fast-text",
  33. "source": "synthetic",
  34. "syntheticReason": "先完成真实初始化轮,正向埋点样本使用已连接的 continuous 会话。"
  35. },
  36. "maxMatches": 1,
  37. "match": {
  38. "method": "POST",
  39. "pathIncludes": "/messages",
  40. "lastUserMessageIncludes": ["E2E_TTFT_LOCAL_WARMUP"],
  41. "bodyExcludes": ["Generate a concise title"]
  42. },
  43. "response": {
  44. "statusCode": 200,
  45. "text": {
  46. "id": "ttft-warmup",
  47. "inputTokens": 80,
  48. "outputTokens": 10,
  49. "text": "ttft-local-warmup-ready"
  50. }
  51. }
  52. },
  53. {
  54. "id": "ttft-local-text",
  55. "metadata": {
  56. "kind": "main",
  57. "timingPolicy": "controlled-stream",
  58. "source": "synthetic",
  59. "syntheticReason": "固定正文响应,核对真实 Enter 到本地日志及 DOM 的关联,不依赖云端。"
  60. },
  61. "maxMatches": 1,
  62. "match": {
  63. "method": "POST",
  64. "pathIncludes": "/messages",
  65. "lastUserMessageIncludes": ["E2E_TTFT_LOCAL_LOGS"],
  66. "bodyExcludes": ["Generate a concise title"]
  67. },
  68. "response": {
  69. "statusCode": 200,
  70. "text": {
  71. "id": "ttft-text",
  72. "inputTokens": 80,
  73. "outputTokens": 10,
  74. "text": "ttft-local-reply-private"
  75. }
  76. }
  77. }
  78. ]
  79. }