| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- {
- "version": 1,
- "caseName": "conversation-session-changes-group-unresolved-path",
- "spec": "./test/e2e/conversation-session/conversation-session-changes-group-unresolved-path.test.ts",
- "fixtures": [
- {
- "id": "tge07-title",
- "description": "TGE07 title sidecar response.",
- "metadata": {
- "kind": "common",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "标题不参与 Changes 流式路径语义;case-local 固定响应保证 strict replay 不依赖 legacy fixture 池。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_CHANGES_GROUP_UNRESOLVED_PATH"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "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\"}}"
- }
- },
- {
- "id": "tge07-write-controlled-stream",
- "description": "两个连续 Write 先发送 content 再发送同一 file_path,覆盖当前 Changes 父分组门槛与单文件摘要。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "controlled-stream",
- "syntheticReason": "在无路径预览与完整工具输入结束两个语义边界显式放行;输入结束刷新合法节流缓冲,最终 message_stop 仍被阻塞,父组仍处于进行中。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_CHANGES_GROUP_UNRESOLVED_PATH"],
- "bodyExcludes": ["Generate a concise title", "toolu_tge07_write"]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "cache-control": "no-cache",
- "content-type": "text/event-stream; charset=utf-8"
- },
- "chunks": [
- {
- "offsetMs": 0,
- "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"
- },
- {
- "offsetMs": 1,
- "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
- },
- {
- "offsetMs": 2,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_CHANGES_GROUP_PREVIEW\"}}\n\n"
- },
- {
- "offsetMs": 3,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 4,
- "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"
- },
- {
- "offsetMs": 5,
- "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"
- },
- {
- "offsetMs": 6,
- "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"
- },
- {
- "offsetMs": 7,
- "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"
- },
- {
- "offsetMs": 8,
- "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"
- },
- {
- "offsetMs": 9,
- "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"
- },
- {
- "offsetMs": 10,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1}\n\n"
- },
- {
- "offsetMs": 11,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":2}\n\n"
- },
- {
- "offsetMs": 12,
- "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"
- },
- {
- "offsetMs": 13,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ],
- "releaseAfterChunks": [8, 12]
- }
- },
- {
- "id": "tge07-final",
- "description": "TGE07 closes the single-file Changes stage.",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定终态文本,验证单文件完成折叠摘要省略 1 file。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_CHANGES_GROUP_UNRESOLVED_PATH", "toolu_tge07_write"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": "upstream-e2e-ok"
- }
- },
- {
- "id": "tge07-compact-after-write",
- "description": "TGE07 compact sidecar after Write.",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "E2E 极小 context window 在 Write 后触发自动 compact;摘要保留 marker 与 tool id,使终态 matcher 可继续命中。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "E2E_CHANGES_GROUP_UNRESOLVED_PATH",
- "toolu_tge07_write",
- "CRITICAL: Respond with TEXT ONLY"
- ],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "tge07-compact-after-write",
- "inputTokens": 128,
- "outputTokens": 24,
- "text": "<summary>E2E_CHANGES_GROUP_UNRESOLVED_PATH completed Write toolu_tge07_write. Return upstream-e2e-ok.</summary>"
- }
- }
- }
- ]
- }
|