conversation-session-sidebar-stop-status-race.json 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-sidebar-stop-status-race",
  4. "spec": "./test/e2e/conversation-session/task-management/conversation-session-sidebar-stop-status-race.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "sidebar-stop-status-race-title",
  8. "description": "TSL18 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "首发会触发默认 title sidecar;固定 marker 响应避免回退共享 provider fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_SIDEBAR_STOP_STATUS_RACE"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"sidebar-stop-status-race-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Sidebar Stop Race E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  26. }
  27. },
  28. {
  29. "id": "sidebar-stop-status-race-controlled-stream",
  30. "description": "稳定制造 running spinner 与 Stop 窗口;测试侧暂挂真实 project.readTree 回包。",
  31. "metadata": {
  32. "kind": "main",
  33. "timingPolicy": "controlled-stream",
  34. "source": "synthetic",
  35. "syntheticReason": "TSL18 必须在项目目录读取在途时触发 Stop;用受控响应维持 running,Stop 取消流,不依赖固定延时。"
  36. },
  37. "maxMatches": 1,
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/messages",
  41. "lastUserMessageIncludes": ["E2E_SIDEBAR_STOP_STATUS_RACE"],
  42. "bodyIncludes": ["E2E_SLOW_STREAM", "E2E_SIDEBAR_STOP_STATUS_RACE"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "statusMessage": "OK",
  48. "headers": {
  49. "cache-control": "no-cache",
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "releaseAfterChunks": 3,
  53. "chunks": [
  54. {
  55. "offsetMs": 0,
  56. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-sidebar-stop-status-race\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  57. },
  58. {
  59. "offsetMs": 0,
  60. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  61. },
  62. {
  63. "offsetMs": 0,
  64. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\n"
  65. },
  66. {
  67. "offsetMs": 0,
  68. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek-e2e-ok\"}}\n\n"
  69. },
  70. {
  71. "offsetMs": 0,
  72. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  73. },
  74. {
  75. "offsetMs": 0,
  76. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n"
  77. },
  78. {
  79. "offsetMs": 0,
  80. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  81. }
  82. ]
  83. }
  84. }
  85. ]
  86. }