conversation-session-ssh-remote-task-lifecycle.json 5.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ssh-remote-task-lifecycle",
  4. "spec": "./test/e2e/conversation-session/conversation-session-ssh-remote-task-lifecycle.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "ssh-task-lifecycle-title",
  8. "description": "SSH task lifecycle 标题辅助响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题内容不属于 lifecycle 断言,只需稳定 task row。"
  14. },
  15. "maxMatches": 4,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/chat/completions",
  19. "bodyIncludes": ["Generate a concise title", "E2E_SSH_P0_TASK_LIFECYCLE"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "headers": { "content-type": "text/event-stream; charset=utf-8" },
  24. "body": "data: {\"id\":\"ssh-task-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"SSH lifecycle\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"ssh-task-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  25. }
  26. },
  27. {
  28. "id": "ssh-task-lifecycle-a-first",
  29. "description": "workspace A 首发响应。",
  30. "metadata": { "kind": "main", "timingPolicy": "slow-stream", "source": "synthetic", "syntheticReason": "稳定验证 A 首发和 task 创建。" },
  31. "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_A_FIRST_PROMPT"], "bodyExcludes": ["Generate a concise title"] },
  32. "response": { "statusCode": 200, "delayMs": 1200, "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"ssh-task-a-first\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"SSH_P0_TASK_LIFECYCLE_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"ssh-task-a-first\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" }
  33. },
  34. {
  35. "id": "ssh-task-lifecycle-b-first",
  36. "description": "workspace B 首发响应。",
  37. "metadata": { "kind": "main", "timingPolicy": "slow-stream", "source": "synthetic", "syntheticReason": "稳定验证 B 首发和 task 创建。" },
  38. "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_B_FIRST_PROMPT"], "bodyExcludes": ["Generate a concise title"] },
  39. "response": { "statusCode": 200, "delayMs": 1200, "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"ssh-task-b-first\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"SSH_P0_TASK_LIFECYCLE_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"ssh-task-b-first\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" }
  40. },
  41. {
  42. "id": "ssh-task-lifecycle-a-follow",
  43. "description": "workspace A 重开后的续发响应。",
  44. "metadata": { "kind": "main", "timingPolicy": "slow-stream", "source": "synthetic", "syntheticReason": "稳定验证 A 重开后仍命中原 task。" },
  45. "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_A_FOLLOW_PROMPT"], "bodyExcludes": ["Generate a concise title"] },
  46. "response": { "statusCode": 200, "delayMs": 1200, "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"ssh-task-a-follow\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"SSH_P0_TASK_LIFECYCLE_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"ssh-task-a-follow\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" }
  47. },
  48. {
  49. "id": "ssh-task-lifecycle-b-follow",
  50. "description": "workspace B 续发响应。",
  51. "metadata": { "kind": "main", "timingPolicy": "slow-stream", "source": "synthetic", "syntheticReason": "稳定验证 A 关闭期间 B 仍可继续工作。" },
  52. "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_B_FOLLOW_PROMPT"], "bodyExcludes": ["Generate a concise title"] },
  53. "response": { "statusCode": 200, "delayMs": 1200, "headers": { "content-type": "text/event-stream; charset=utf-8" }, "body": "data: {\"id\":\"ssh-task-b-follow\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"SSH_P0_TASK_LIFECYCLE_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"ssh-task-b-follow\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n" }
  54. }
  55. ]
  56. }