| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- {
- "version": 1,
- "caseName": "conversation-session-queued-command-restart",
- "spec": "./test/e2e/conversation-session/queue/conversation-session-queued-command-restart.test.ts",
- "fixtures": [
- {
- "id": "queued-command-restart-title",
- "description": "PV4-25Q running session 的 case-local 标题响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "稳定创建任务列表行,供整进程重启后显式恢复原 session。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_QUEUED_COMMAND_RESTART_RUNNING"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"queued-command-restart-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Queued Command Restart 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": "queued-command-restart-running-turn",
- "description": "PV4-25Q controlled stream:保持首轮 running,让第二条输入真实进入 CLI queue。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "只有 running 窗口才能形成 delivery=queue 的 durable session_input;随后由整进程重启真实转成 discarded。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_QUEUED_COMMAND_RESTART_RUNNING"],
- "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\":\"queued-command-restart-running\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"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\":\"QUEUED_COMMAND_RESTART_STREAMING \"}}\n\n"
- },
- {
- "offsetMs": 45000,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 45100,
- "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
- },
- {
- "offsetMs": 45200,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ],
- "text": {
- "id": "queued-command-restart-running",
- "inputTokens": 80,
- "outputTokens": 4,
- "text": "QUEUED_COMMAND_RESTART_STREAMING"
- }
- }
- }
- ]
- }
|