| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- {
- "version": 1,
- "caseName": "conversation-session-r3-remote-hooks",
- "spec": "./test/e2e/conversation-session/remote/configuration/conversation-session-r3-remote-hooks.test.ts",
- "fixtures": [
- {
- "id": "r3-hooks-local-title",
- "description": "在真实本机回合触发 UserPromptSubmit,验证远端 hook 不会在本机执行,也不会给远端 marker 追加记录。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "在真实本机回合触发 UserPromptSubmit,验证远端 hook 不会在本机执行,也不会给远端 marker 追加记录。"
- },
- "maxMatches": 2,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_R3_REMOTE_HOOKS_LOCAL_CONTROL"],
- "bodyIncludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"r3-hooks-local-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"R3 hook local control\\\"}\"}],\"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": "r3-hooks-local-reply",
- "description": "在真实本机回合触发 UserPromptSubmit,验证远端 hook 不会在本机执行,也不会给远端 marker 追加记录。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "在真实本机回合触发 UserPromptSubmit,验证远端 hook 不会在本机执行,也不会给远端 marker 追加记录。"
- },
- "maxMatches": 2,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_R3_REMOTE_HOOKS_LOCAL_CONTROL"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "r3-hooks-local-reply",
- "inputTokens": 64,
- "outputTokens": 8,
- "text": "R3_HOOKS_LOCAL_REPLY"
- }
- }
- },
- {
- "id": "r3-hooks-reconnect-title",
- "description": "R3 remote hooks task 标题辅助响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "标题不属于冷恢复断言。"
- },
- "maxMatches": 4,
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "bodyIncludes": ["Generate a concise title", "E2E_R3_REMOTE_HOOKS"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"r3-hooks-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"R3 remote hooks\\\"}\"},\"finish_reason\":\"stop\"}]}"
- }
- },
- {
- "id": "r3-hooks-reconnect-main",
- "description": "R3 remote hooks 首发和续发的通用响应。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "slow-stream",
- "source": "synthetic",
- "syntheticReason": "首发与冷恢复续发都只需要稳定完成,用 task history 断言路由。"
- },
- "maxMatches": 10,
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "bodyIncludes": ["E2E_R3_REMOTE_HOOKS_"],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "delayMs": 1200,
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "body": "data: {\"id\":\"r3-hooks-main\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"R3_REMOTE_HOOKS_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"r3-hooks-main\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
- }
- }
- ]
- }
|