conversation-session-v4-cold-failed-edit.json 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-cold-failed-edit",
  4. "spec": "./test/e2e/conversation-session/editing/conversation-session-v4-cold-failed-edit.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-cold-failed-edit-before-first-token",
  8. "description": "首轮请求在任何 assistant SSE token 前返回 non-retryable 400,留下只有真实 user message 的失败 turn。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fault-stream",
  12. "source": "synthetic",
  13. "syntheticReason": "必须稳定制造 provider 首 token 前失败,才能验证 CLI 重启后的 cold hydration messageId 与 canEdit/command target。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "lastUserMessageIncludes": ["E2E_V4_COLD_FAILED_EDIT_SOURCE"],
  19. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  20. },
  21. "response": {
  22. "statusCode": 400,
  23. "statusMessage": "Bad Request",
  24. "headers": {
  25. "content-type": "application/json; charset=utf-8"
  26. },
  27. "body": "{\"error\":{\"message\":\"synthetic failure before first assistant token\",\"type\":\"invalid_request_error\",\"code\":\"e2e_before_first_token\"}}"
  28. }
  29. },
  30. {
  31. "id": "v4-cold-failed-edit-rerun-success",
  32. "description": "cold hydrated latest user edit 提交后的固定成功回复。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "用固定回复证明 edit command 命中 transcript messageId 并真正发起重跑。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_V4_COLD_FAILED_EDIT_RERUN"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "text": {
  50. "id": "v4-cold-failed-edit-rerun-success",
  51. "inputTokens": 96,
  52. "outputTokens": 8,
  53. "text": "E2E_V4_COLD_FAILED_EDIT_OK"
  54. }
  55. }
  56. }
  57. ]
  58. }