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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ssh-remote-task-lifecycle",
  4. "spec": "./test/e2e/conversation-session/remote/execution/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": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"ssh-task-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"SSH lifecycle\\\"}\"},\"finish_reason\":\"stop\"}]}"
  27. }
  28. },
  29. {
  30. "id": "ssh-task-lifecycle-a-first",
  31. "description": "workspace A 首发响应。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "slow-stream",
  35. "source": "synthetic",
  36. "syntheticReason": "稳定验证 A 首发和 task 创建。"
  37. },
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/chat/completions",
  41. "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_A_FIRST_PROMPT"],
  42. "bodyExcludes": ["Generate a concise title"]
  43. },
  44. "response": {
  45. "statusCode": 200,
  46. "delayMs": 1200,
  47. "headers": {
  48. "content-type": "text/event-stream; charset=utf-8"
  49. },
  50. "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"
  51. }
  52. },
  53. {
  54. "id": "ssh-task-lifecycle-b-first",
  55. "description": "workspace B 首发响应。",
  56. "metadata": {
  57. "kind": "main",
  58. "timingPolicy": "slow-stream",
  59. "source": "synthetic",
  60. "syntheticReason": "稳定验证 B 首发和 task 创建。"
  61. },
  62. "match": {
  63. "method": "POST",
  64. "pathIncludes": "/chat/completions",
  65. "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_B_FIRST_PROMPT"],
  66. "bodyExcludes": ["Generate a concise title"]
  67. },
  68. "response": {
  69. "statusCode": 200,
  70. "delayMs": 1200,
  71. "headers": {
  72. "content-type": "text/event-stream; charset=utf-8"
  73. },
  74. "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"
  75. }
  76. },
  77. {
  78. "id": "ssh-task-lifecycle-a-follow",
  79. "description": "workspace A 重开后的续发响应。",
  80. "metadata": {
  81. "kind": "main",
  82. "timingPolicy": "slow-stream",
  83. "source": "synthetic",
  84. "syntheticReason": "稳定验证 A 重开后仍命中原 task。"
  85. },
  86. "match": {
  87. "method": "POST",
  88. "pathIncludes": "/chat/completions",
  89. "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_A_FOLLOW_PROMPT"],
  90. "bodyExcludes": ["Generate a concise title"]
  91. },
  92. "response": {
  93. "statusCode": 200,
  94. "delayMs": 1200,
  95. "headers": {
  96. "content-type": "text/event-stream; charset=utf-8"
  97. },
  98. "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"
  99. }
  100. },
  101. {
  102. "id": "ssh-task-lifecycle-b-follow",
  103. "description": "workspace B 续发响应。",
  104. "metadata": {
  105. "kind": "main",
  106. "timingPolicy": "slow-stream",
  107. "source": "synthetic",
  108. "syntheticReason": "稳定验证 A 关闭期间 B 仍可继续工作。"
  109. },
  110. "match": {
  111. "method": "POST",
  112. "pathIncludes": "/chat/completions",
  113. "lastUserMessageIncludes": ["E2E_SSH_P0_TASK_LIFECYCLE_B_FOLLOW_PROMPT"],
  114. "bodyExcludes": ["Generate a concise title"]
  115. },
  116. "response": {
  117. "statusCode": 200,
  118. "delayMs": 1200,
  119. "headers": {
  120. "content-type": "text/event-stream; charset=utf-8"
  121. },
  122. "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"
  123. }
  124. }
  125. ]
  126. }