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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"tge07-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Changes Unresolved Path 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": "tge07-write-controlled-stream",
  30. "description": "两个连续 Write 先发送 content 再发送同一 file_path,覆盖当前 Changes 父分组门槛与单文件摘要。",
  31. "metadata": {
  32. "kind": "main",
  33. "source": "synthetic",
  34. "timingPolicy": "controlled-stream",
  35. "syntheticReason": "在无路径预览与完整工具输入结束两个语义边界显式放行;输入结束刷新合法节流缓冲,最终 message_stop 仍被阻塞,父组仍处于进行中。"
  36. },
  37. "maxMatches": 1,
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/messages",
  41. "lastUserMessageIncludes": ["E2E_CHANGES_GROUP_UNRESOLVED_PATH"],
  42. "bodyExcludes": ["Generate a concise title", "toolu_tge07_write"]
  43. },
  44. "response": {
  45. "statusCode": 200,
  46. "statusMessage": "OK",
  47. "headers": {
  48. "cache-control": "no-cache",
  49. "content-type": "text/event-stream; charset=utf-8"
  50. },
  51. "chunks": [
  52. {
  53. "offsetMs": 0,
  54. "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"
  55. },
  56. {
  57. "offsetMs": 1,
  58. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  59. },
  60. {
  61. "offsetMs": 2,
  62. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_CHANGES_GROUP_PREVIEW\"}}\n\n"
  63. },
  64. {
  65. "offsetMs": 3,
  66. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  67. },
  68. {
  69. "offsetMs": 4,
  70. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":1,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_tge07_write\",\"name\":\"Write\",\"input\":{}}}\n\n"
  71. },
  72. {
  73. "offsetMs": 5,
  74. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"content\\\":\\\"export const app = true;\\\\n\\\"\"}}\n\n"
  75. },
  76. {
  77. "offsetMs": 6,
  78. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":2,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_tge07_write_second\",\"name\":\"Write\",\"input\":{}}}\n\n"
  79. },
  80. {
  81. "offsetMs": 7,
  82. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":2,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"content\\\":\\\"export const app = true;\\\\n\\\"\"}}\n\n"
  83. },
  84. {
  85. "offsetMs": 8,
  86. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"file_path\\\":\\\"{{e2eRuntimeRoot}}/conversation-session-changes-group-unresolved-path/App.tsx\\\"}\\n\"}}\n\n"
  87. },
  88. {
  89. "offsetMs": 9,
  90. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":2,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\",\\\"file_path\\\":\\\"{{e2eRuntimeRoot}}/conversation-session-changes-group-unresolved-path/App.tsx\\\"}\\n\"}}\n\n"
  91. },
  92. {
  93. "offsetMs": 10,
  94. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1}\n\n"
  95. },
  96. {
  97. "offsetMs": 11,
  98. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":2}\n\n"
  99. },
  100. {
  101. "offsetMs": 12,
  102. "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"
  103. },
  104. {
  105. "offsetMs": 13,
  106. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  107. }
  108. ],
  109. "releaseAfterChunks": [8, 12]
  110. }
  111. },
  112. {
  113. "id": "tge07-final",
  114. "description": "TGE07 closes the single-file Changes stage.",
  115. "metadata": {
  116. "kind": "main",
  117. "source": "synthetic",
  118. "timingPolicy": "fast-text",
  119. "syntheticReason": "固定终态文本,验证单文件完成折叠摘要省略 1 file。"
  120. },
  121. "maxMatches": 1,
  122. "match": {
  123. "method": "POST",
  124. "pathIncludes": "/messages",
  125. "bodyIncludes": ["E2E_CHANGES_GROUP_UNRESOLVED_PATH", "toolu_tge07_write"],
  126. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  127. },
  128. "response": {
  129. "statusCode": 200,
  130. "text": "upstream-e2e-ok"
  131. }
  132. },
  133. {
  134. "id": "tge07-compact-after-write",
  135. "description": "TGE07 compact sidecar after Write.",
  136. "metadata": {
  137. "kind": "main",
  138. "source": "synthetic",
  139. "timingPolicy": "fast-text",
  140. "syntheticReason": "E2E 极小 context window 在 Write 后触发自动 compact;摘要保留 marker 与 tool id,使终态 matcher 可继续命中。"
  141. },
  142. "maxMatches": 1,
  143. "match": {
  144. "method": "POST",
  145. "pathIncludes": "/messages",
  146. "bodyIncludes": [
  147. "E2E_CHANGES_GROUP_UNRESOLVED_PATH",
  148. "toolu_tge07_write",
  149. "CRITICAL: Respond with TEXT ONLY"
  150. ],
  151. "bodyExcludes": ["Generate a concise title"]
  152. },
  153. "response": {
  154. "statusCode": 200,
  155. "text": {
  156. "id": "tge07-compact-after-write",
  157. "inputTokens": 128,
  158. "outputTokens": 24,
  159. "text": "<summary>E2E_CHANGES_GROUP_UNRESOLVED_PATH completed Write toolu_tge07_write. Return upstream-e2e-ok.</summary>"
  160. }
  161. }
  162. }
  163. ]
  164. }