{ "version": 1, "caseName": "conversation-session-compact-timeline-projection", "spec": "./test/e2e/conversation-session/context/conversation-session-compact-timeline-projection.test.ts", "fixtures": [ { "id": "conversation-session-compact-timeline-projection-title-sidecar", "description": "本例标题旁路响应。", "metadata": { "kind": "common", "source": "synthetic", "timingPolicy": "fast-text", "syntheticReason": "运行时证据显示标题旁路缺少响应;在本例显式登记固定标题,避免依赖 legacy fixture 或触发后台网络重试。" }, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "application/json; charset=utf-8" }, "body": "{\"id\":\"upstream-e2e-title-fixture\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}" } }, { "id": "upstream-compact-timeline-projection-seed", "description": "两轮已完成历史提供可压缩前缀与高 usage。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "TP 的核心断言是 auto compact marker 的 UI 投影位置,真实模型 token usage 不稳定;DeepSeek v4 可能是 1M context,需要合成足够高的 provider usage。" }, "maxMatches": 2, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_COMPACT_TIMELINE_PROJECTION_SEED"], "bodyIncludes": ["E2E_COMPACT_TIMELINE_PROJECTION_SEED"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "upstream-e2e-compact-timeline-projection-seed", "inputTokens": 950000, "outputTokens": 12, "text": "upstream-e2e-seed-ok" } } }, { "id": "upstream-compact-timeline-projection-pending", "description": "TP auto compact 完成后继续 pending 主请求的固定回复。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "该响应只需要稳定产出 pending assistant,核心断言在 compact marker 是否折进同一工作块。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_COMPACT_TIMELINE_PROJECTION_PENDING"], "bodyIncludes": ["E2E_COMPACT_TIMELINE_PROJECTION_PENDING"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "upstream-e2e-compact-timeline-projection-pending", "inputTokens": 96, "outputTokens": 12, "text": "upstream-e2e-pending-ok" } } }, { "id": "upstream-compact-timeline-projection-manual-split-seed", "description": "TP manual failed 投影样本前置真实 task 的固定回复。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "创建真实会话后,在进程退出期间写入原生失败 compact part,用正式冷恢复验证投影。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_COMPACT_TIMELINE_PROJECTION_MANUAL_SPLIT_SEED"], "bodyIncludes": ["E2E_COMPACT_TIMELINE_PROJECTION_MANUAL_SPLIT_SEED"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "upstream-e2e-compact-timeline-projection-manual-split-seed", "inputTokens": 96, "outputTokens": 12, "text": "upstream-e2e-seed-ok" } } }, { "id": "compact-timeline-projection-controlled-compact", "description": "auto compact 的受控摘要,测试验证重复命令后显式放行。", "metadata": { "kind": "main", "timingPolicy": "controlled-stream", "source": "synthetic", "syntheticReason": "固定 auto compact busy 窗口,不以模型耗时决定重复命令是否发生在压缩中。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["CRITICAL: Respond with TEXT ONLY", "E2E_COMPACT_TIMELINE_PROJECTION"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "cache-control": "no-cache", "content-type": "text/event-stream; charset=utf-8" }, "releaseAfterChunks": 3, "chunks": [ { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-sidebar-stop-status-race\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" }, { "offsetMs": 0, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" }, { "offsetMs": 0, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_COMPACT_TIMELINE_SUMMARY\"}}\n\n" }, { "offsetMs": 0, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" done\"}}\n\n" }, { "offsetMs": 0, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" }, { "offsetMs": 0, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n" }, { "offsetMs": 0, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" } ] } } ] }