conversation-session-changes-group-unresolved-path.json 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-changes-group-unresolved-path",
  4. "spec": "./test/e2e/conversation-session/conversation-session-changes-group-unresolved-path.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "tge07-title",
  8. "description": "TGE07 title sidecar response.",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "标题不参与 Changes 流式路径语义;case-local 固定响应保证 strict replay 不依赖 legacy fixture 池。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_CHANGES_GROUP_UNRESOLVED_PATH"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "tge07-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"Changes Unresolved Path E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "tge07-write-controlled-stream",
  32. "description": "TGE07 streams Write content before file_path.",
  33. "metadata": {
  34. "kind": "main",
  35. "source": "synthetic",
  36. "timingPolicy": "controlled-stream",
  37. "syntheticReason": "稳定保留 file_path 尚未到达的观察窗口,验证 Changes 不显示 0 files 且展开保留 Writing。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/messages",
  43. "lastUserMessageIncludes": ["E2E_CHANGES_GROUP_UNRESOLVED_PATH"],
  44. "bodyExcludes": ["Generate a concise title", "toolu_tge07_write"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "cache-control": "no-cache",
  51. "content-type": "text/event-stream; charset=utf-8"
  52. },
  53. "chunks": [
  54. {
  55. "offsetMs": 0,
  56. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_tge07_write\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":100,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  57. },
  58. {
  59. "offsetMs": 100,
  60. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_tge07_write\",\"name\":\"Write\",\"input\":{}}}\n\n"
  61. },
  62. {
  63. "offsetMs": 300,
  64. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"content\\\":\\\"export const app = true;\\\\n\\\"\"}}\n\n"
  65. },
  66. {
  67. "offsetMs": 10000,
  68. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"file_path\\\":\\\"{{e2eRuntimeRoot}}/conversation-session-changes-group-unresolved-path/App.tsx\\\"}\"}}\n\n"
  69. },
  70. {
  71. "offsetMs": 10400,
  72. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  73. },
  74. {
  75. "offsetMs": 10500,
  76. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":100,\"output_tokens\":24,\"service_tier\":\"standard\"}}\n\n"
  77. },
  78. {
  79. "offsetMs": 10600,
  80. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  81. }
  82. ]
  83. }
  84. },
  85. {
  86. "id": "tge07-final",
  87. "description": "TGE07 closes the single-file Changes stage.",
  88. "metadata": {
  89. "kind": "main",
  90. "source": "synthetic",
  91. "timingPolicy": "fast-text",
  92. "syntheticReason": "固定终态文本,验证单文件完成折叠摘要省略 1 file。"
  93. },
  94. "maxMatches": 1,
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "bodyIncludes": [
  99. "E2E_CHANGES_GROUP_UNRESOLVED_PATH",
  100. "toolu_tge07_write"
  101. ],
  102. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  103. },
  104. "response": { "statusCode": 200, "text": "upstream-e2e-ok" }
  105. },
  106. {
  107. "id": "tge07-compact-after-write",
  108. "description": "TGE07 compact sidecar after Write.",
  109. "metadata": {
  110. "kind": "main",
  111. "source": "synthetic",
  112. "timingPolicy": "fast-text",
  113. "syntheticReason": "E2E 极小 context window 在 Write 后触发自动 compact;摘要保留 marker 与 tool id,使终态 matcher 可继续命中。"
  114. },
  115. "maxMatches": 1,
  116. "match": {
  117. "method": "POST",
  118. "pathIncludes": "/messages",
  119. "bodyIncludes": ["E2E_CHANGES_GROUP_UNRESOLVED_PATH", "toolu_tge07_write", "CRITICAL: Respond with TEXT ONLY"],
  120. "bodyExcludes": ["Generate a concise title"]
  121. },
  122. "response": {
  123. "statusCode": 200,
  124. "text": {
  125. "id": "tge07-compact-after-write",
  126. "inputTokens": 128,
  127. "outputTokens": 24,
  128. "text": "<summary>E2E_CHANGES_GROUP_UNRESOLVED_PATH completed Write toolu_tge07_write. Return upstream-e2e-ok.</summary>"
  129. }
  130. }
  131. }
  132. ]
  133. }