{ "version": 1, "caseName": "conversation-session-empty-completion-retry", "spec": "./test/e2e/conversation-session/conversation-session-empty-completion-retry.test.ts", "fixtures": [ { "id": "empty-completion-retry-title", "description": "空 completion retry case 的标题 sidecar 固定响应。", "metadata": { "kind": "common", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "标题不是空 completion retry 的产品语义;固定响应避免 title sidecar 依赖共享 legacy fixture。" }, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": [ "Generate a concise title", "E2E_EMPTY_COMPLETION_RETRY_STREAM" ] }, "response": { "statusCode": 200, "text": { "id": "empty-completion-retry-title", "inputTokens": 64, "outputTokens": 8, "text": "{\"title\":\"Empty Completion Retry E2E\"}" } } }, { "id": "empty-completion-retry-stream-first-empty", "description": "首个主请求正常 EOF 收口,但 finish=other 且 text/reasoning/tool/usage 全为空。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定制造 provider 正常 EOF + finish=other 的零输出 completion,验证 adapter 隐藏首个 attempt 并只重试一次。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": [ "E2E_EMPTY_COMPLETION_RETRY_STREAM" ], "bodyExcludes": [ "Generate a concise title", "CRITICAL: Respond with TEXT ONLY" ] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "cache-control": "no-cache", "content-type": "text/event-stream; charset=utf-8" }, "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"empty-completion-retry-first-empty\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":0,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0}}}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"other\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":0,\"output_tokens\":0}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" } }, { "id": "empty-completion-retry-stream-second-success", "description": "第二个主请求返回正常文本,作为唯一一次 retry 的成功结果。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "固定 retry 后的成功文本,证明首个空 attempt 没有泄漏到 UI 且逻辑 turn 正常收口。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": [ "E2E_EMPTY_COMPLETION_RETRY_STREAM" ], "bodyExcludes": [ "Generate a concise title", "CRITICAL: Respond with TEXT ONLY" ] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "cache-control": "no-cache", "content-type": "text/event-stream; charset=utf-8" }, "text": { "id": "empty-completion-retry-stream-second-success", "inputTokens": 96, "outputTokens": 8, "text": "EMPTY_COMPLETION_RETRY_OK" } } } ] }