|
|
@@ -1,434 +0,0 @@
|
|
|
-{
|
|
|
- "version": 1,
|
|
|
- "caseName": "conversation-session-runtime-communication-performance",
|
|
|
- "spec": "./test/e2e/conversation-session/conversation-session-runtime-communication-performance.test.ts",
|
|
|
- "fixtures": [
|
|
|
- {
|
|
|
- "id": "runtime-perf-title",
|
|
|
- "description": "PERF02 标题生成固定响应,避免 title sidecar 抢占业务 fixture。",
|
|
|
- "metadata": {
|
|
|
- "kind": "common",
|
|
|
- "timingPolicy": "fast-text",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "标题生成不是本性能复现的通信压力来源,只需稳定返回。"
|
|
|
- },
|
|
|
- "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\":\"runtime-perf-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Runtime Perf Repro\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":96,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":16,\"service_tier\":\"standard\"}}"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-tool-a",
|
|
|
- "description": "lane A 父请求触发 Agent tool_use。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "fast-text",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "PERF02 需要稳定触发子智能体,父请求只负责产生 Agent tool。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_A"],
|
|
|
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
|
|
|
- },
|
|
|
- "response": {
|
|
|
- "statusCode": 200,
|
|
|
- "toolUse": {
|
|
|
- "id": "toolu_runtime_perf_a_agent",
|
|
|
- "name": "Agent",
|
|
|
- "input": {
|
|
|
- "description": "PERF02 lane A child stream",
|
|
|
- "prompt": "E2E_RUNTIME_PERF_CHILD_A: stream child result and finish with PERF_CHILD_DONE_A.",
|
|
|
- "subagent_type": "general-purpose"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-child-stream-a",
|
|
|
- "description": "lane A child subagent recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要稳定的 child subagent streaming 窗口。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_CHILD_A"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-child-a\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_STREAM_A_START\\n\\n| lane | phase | status |\\n| --- | --- | --- |\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 4000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"| A | child-stream | receiving tool context |\\n```ts\\nexport const laneA = 'child-stream-mid';\\n```\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 8000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Lane A child stream is still active with markdown, code, and table updates.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 12000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_DONE_A\"}}\n\n" },
|
|
|
- { "offsetMs": 12200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 12300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":128,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 12400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-final-a",
|
|
|
- "description": "lane A 父会话收到 child tool_result 后的 recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要父会话 continuation 也保持 streaming。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "bodyIncludes": ["E2E_RUNTIME_PERF_A", "PERF_CHILD_DONE_A"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-parent-a\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":192,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_STREAM_A_START after Agent tool result.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 3500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Parent lane A continuation renders while other panes are active.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 7000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"More lane A markdown updates to keep React work alive.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 10000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_DONE_A\"}}\n\n" },
|
|
|
- { "offsetMs": 10200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 10300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":192,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 10400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-tool-b",
|
|
|
- "description": "lane B 父请求触发 Agent tool_use。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "fast-text",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "PERF02 需要稳定触发子智能体,父请求只负责产生 Agent tool。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_B"],
|
|
|
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
|
|
|
- },
|
|
|
- "response": {
|
|
|
- "statusCode": 200,
|
|
|
- "toolUse": {
|
|
|
- "id": "toolu_runtime_perf_b_agent",
|
|
|
- "name": "Agent",
|
|
|
- "input": {
|
|
|
- "description": "PERF02 lane B child stream",
|
|
|
- "prompt": "E2E_RUNTIME_PERF_CHILD_B: stream child result and finish with PERF_CHILD_DONE_B.",
|
|
|
- "subagent_type": "general-purpose"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-child-stream-b",
|
|
|
- "description": "lane B child subagent recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要稳定的 child subagent streaming 窗口。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_CHILD_B"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-child-b\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_STREAM_B_START\\n\\n| lane | phase | status |\\n| --- | --- | --- |\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 4000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"| B | child-stream | receiving tool context |\\n```ts\\nexport const laneB = 'child-stream-mid';\\n```\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 8000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Lane B child stream is still active with markdown, code, and table updates.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 12000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_DONE_B\"}}\n\n" },
|
|
|
- { "offsetMs": 12200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 12300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":128,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 12400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-final-b",
|
|
|
- "description": "lane B 父会话收到 child tool_result 后的 recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要父会话 continuation 也保持 streaming。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "bodyIncludes": ["E2E_RUNTIME_PERF_B", "PERF_CHILD_DONE_B"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-parent-b\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":192,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_STREAM_B_START after Agent tool result.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 3500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Parent lane B continuation renders while other panes are active.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 7000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"More lane B markdown updates to keep React work alive.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 10000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_DONE_B\"}}\n\n" },
|
|
|
- { "offsetMs": 10200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 10300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":192,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 10400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-tool-c",
|
|
|
- "description": "lane C 父请求触发 Agent tool_use。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "fast-text",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "PERF02 需要稳定触发子智能体,父请求只负责产生 Agent tool。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_C"],
|
|
|
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
|
|
|
- },
|
|
|
- "response": {
|
|
|
- "statusCode": 200,
|
|
|
- "toolUse": {
|
|
|
- "id": "toolu_runtime_perf_c_agent",
|
|
|
- "name": "Agent",
|
|
|
- "input": {
|
|
|
- "description": "PERF02 lane C child stream",
|
|
|
- "prompt": "E2E_RUNTIME_PERF_CHILD_C: stream child result and finish with PERF_CHILD_DONE_C.",
|
|
|
- "subagent_type": "general-purpose"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-child-stream-c",
|
|
|
- "description": "lane C child subagent recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要稳定的 child subagent streaming 窗口。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_CHILD_C"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-child-c\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_STREAM_C_START\\n\\n| lane | phase | status |\\n| --- | --- | --- |\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 4000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"| C | child-stream | receiving tool context |\\n```ts\\nexport const laneC = 'child-stream-mid';\\n```\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 8000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Lane C child stream is still active with markdown, code, and table updates.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 12000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_DONE_C\"}}\n\n" },
|
|
|
- { "offsetMs": 12200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 12300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":128,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 12400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-final-c",
|
|
|
- "description": "lane C 父会话收到 child tool_result 后的 recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要父会话 continuation 也保持 streaming。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "bodyIncludes": ["E2E_RUNTIME_PERF_C", "PERF_CHILD_DONE_C"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-parent-c\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":192,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_STREAM_C_START after Agent tool result.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 3500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Parent lane C continuation renders while other panes are active.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 7000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"More lane C markdown updates to keep React work alive.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 10000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_DONE_C\"}}\n\n" },
|
|
|
- { "offsetMs": 10200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 10300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":192,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 10400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-tool-d",
|
|
|
- "description": "lane D 父请求触发 Agent tool_use。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "fast-text",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "PERF02 需要稳定触发子智能体,父请求只负责产生 Agent tool。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_D"],
|
|
|
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
|
|
|
- },
|
|
|
- "response": {
|
|
|
- "statusCode": 200,
|
|
|
- "toolUse": {
|
|
|
- "id": "toolu_runtime_perf_d_agent",
|
|
|
- "name": "Agent",
|
|
|
- "input": {
|
|
|
- "description": "PERF02 lane D child stream",
|
|
|
- "prompt": "E2E_RUNTIME_PERF_CHILD_D: stream child result and finish with PERF_CHILD_DONE_D.",
|
|
|
- "subagent_type": "general-purpose"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-child-stream-d",
|
|
|
- "description": "lane D child subagent recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要稳定的 child subagent streaming 窗口。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "lastUserMessageIncludes": ["E2E_RUNTIME_PERF_CHILD_D"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-child-d\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_STREAM_D_START\\n\\n| lane | phase | status |\\n| --- | --- | --- |\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 4000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"| D | child-stream | receiving tool context |\\n```ts\\nexport const laneD = 'child-stream-mid';\\n```\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 8000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Lane D child stream is still active with markdown, code, and table updates.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 12000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_CHILD_DONE_D\"}}\n\n" },
|
|
|
- { "offsetMs": 12200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 12300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":128,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 12400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "id": "runtime-perf-parent-final-d",
|
|
|
- "description": "lane D 父会话收到 child tool_result 后的 recorded stream。",
|
|
|
- "metadata": {
|
|
|
- "kind": "main",
|
|
|
- "timingPolicy": "recorded-stream",
|
|
|
- "source": "synthetic",
|
|
|
- "syntheticReason": "性能复现需要父会话 continuation 也保持 streaming。"
|
|
|
- },
|
|
|
- "maxMatches": 1,
|
|
|
- "match": {
|
|
|
- "method": "POST",
|
|
|
- "pathIncludes": "/messages",
|
|
|
- "bodyIncludes": ["E2E_RUNTIME_PERF_D", "PERF_CHILD_DONE_D"],
|
|
|
- "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"
|
|
|
- },
|
|
|
- "chunks": [
|
|
|
- { "offsetMs": 0, "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"runtime-perf-parent-d\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":192,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n" },
|
|
|
- { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" },
|
|
|
- { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_STREAM_D_START after Agent tool result.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 3500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"Parent lane D continuation renders while other panes are active.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 7000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"More lane D markdown updates to keep React work alive.\\n\"}}\n\n" },
|
|
|
- { "offsetMs": 10000, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"PERF_PARENT_DONE_D\"}}\n\n" },
|
|
|
- { "offsetMs": 10200, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" },
|
|
|
- { "offsetMs": 10300, "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":192,\"output_tokens\":96,\"service_tier\":\"standard\"}}\n\n" },
|
|
|
- { "offsetMs": 10400, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" }
|
|
|
- ]
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
-}
|