{
  "case": "a02",
  "checks": {
    "主线路命中本地 429": true,
    "备用模型收到请求": true,
    "备用结果返回": true
  },
  "commands": [
    {
      "command": "openclaw agent --local --agent main --session-id qr-local-test --message 'Reply with only QR-FIXTURE-OK.' --thinking off --timeout 18 --json",
      "exit": 0,
      "stdout": "{\n  \"payloads\": [\n    {\n      \"text\": \"QR-FIXTURE-OK\",\n      \"mediaUrl\": null\n    }\n  ],\n  \"meta\": {\n    \"durationMs\": 1034,\n    \"agentMeta\": {\n      \"sessionId\": \"qr-local-test\",\n      \"sessionFile\": \"/private<LAB>/claw/agents/main/sessions/qr-local-test.jsonl\",\n      \"provider\": \"qrfixture\",\n      \"model\": \"deepseek-v4.1-flash\",\n      \"contextTokens\": 200000,\n      \"agentHarnessId\": \"pi\",\n      \"usage\": {\n        \"input\": 9,\n        \"output\": 4,\n        \"total\": 13\n      },\n      \"lastCallUsage\": {\n        \"input\": 9,\n        \"output\": 4,\n        \"cacheRead\": 0,\n        \"cacheWrite\": 0,\n        \"total\": 13\n      },\n      \"promptTokens\": 9,\n      \"fallbackAttempts\": [\n        {\n          \"provider\": \"qrlimited\",\n          \"model\": \"qwen3.8-flash\",\n          \"error\": \"429 local fixture 429\",\n          \"reason\": \"rate_limit\",\n          \"status\": 429\n        }\n      ]\n    },\n    \"aborted\": false,\n    \"systemPromptReport\": {\n      \"source\": \"run\",\n      \"generatedAt\": 1793802095033,\n      \"sessionId\": \"qr-local-test\",\n      \"sessionKey\": \"agent:main:explicit:qr-local-test\",\n      \"provider\": \"qrfixture\",\n      \"model\": \"deepseek-v4.1-flash\",\n      \"workspaceDir\": \"<LAB>/repo\",\n      \"bootstrapMaxChars\": 12000,\n      \"bootstrapTotalMaxChars\": 60000,\n      \"bootstrapTruncation\": {\n        \"warningMode\": \"once\",\n        \"warningShown\": false,\n        \"truncatedFiles\": 0,\n        \"nearLimitFiles\": 0,\n        \"totalNearLimit\": false\n      },\n      \"sandbox\": {\n        \"mode\": \"off\",\n        \"sandboxed\": false\n      },\n      \"systemPrompt\": {\n        \"chars\": 26022,\n        \"projectContextChars\": 12291,\n        \"nonProjectContextChars\": 13731\n      },\n      \"injectedWorkspaceFiles\": [\n        {\n          \"name\": \"AGENTS.md\",\n          \"path\": \"<LAB>/repo/AGENTS.md\",\n          \"missing\": false,\n          \"rawChars\": 7774,\n          \"injectedChars\": 7774,\n          \"truncated\": false\n        },\n        {\n          \"name\": \"SOUL.md\",\n          \"path\": \"<LAB>/repo/SOUL.md\",\n          \"missing\": false,\n          \"rawChars\": 1797,\n          \"injectedChars\": 1797,\n          \"truncated\": false\n        },\n        {\n          \"name\": \"TOOLS.md\",\n          \"path\": \"<LAB>/repo/TOOLS.md\",\n          \"missing\": false,\n          \"rawChars\": 910,\n          \"injectedChars\": 910,\n          \"truncated\": false\n        },\n        {\n          \"name\": \"IDENTITY.md\",\n          \"path\": \"<LAB>/repo/IDENTITY.md\",\n          \"missing\": false,\n          \"rawChars\": 693,\n          \"injectedChars\": 693,\n          \"truncated\": false\n        },\n        {\n          \"name\": \"USER.md\",\n          \"path\": \"<LAB>/repo/USER.md\",\n          \"missing\": false,\n          \"rawChars\": 534,\n          \"injectedChars\": 534,\n          \"truncated\": false\n        },\n        {\n          \"name\": \"HEARTBEAT.md\",\n          \"path\": \"<LAB>/repo/HEARTBEAT.md\",\n          \"missing\": false,\n          \"rawChars\": 225,\n          \"injectedChars\": 225,\n          \"truncated\": false\n        },\n        {\n          \"name\": \"BOOTSTRAP.md\",\n          \"path\": \"<LAB>/repo/BOOTSTRAP.md\",\n          \"missing\": true,\n          \"rawChars\": 0,\n          \"injectedChars\": 0,\n          \"truncated\": false\n        }\n      ],\n      \"skills\": {\n        \"promptChars\": 4361,\n        \"entries\": [\n          {\n            \"name\": \"gh-issues\",\n            \"blockChars\": 271\n          },\n          {\n            \"name\": \"github\",\n            \"blockChars\": 253\n          },\n          {\n            \"name\": \"healthcheck\",\n            \"blockChars\": 280\n          },\n          {\n            \"name\": \"hypit\",\n            \"blockChars\": 353\n          },\n          {\n            \"name\": \"node-connect\",\n            \"blockChars\": 281\n          },\n          {\n            \"name\": \"remotion-best-practices\",\n            \"blockChars\": 219\n          },\n          {\n            \"name\": \"reverse-engineer-anything\",\n            \"blockChars\": 470\n          },\n          {\n            \"name\": \"session-logs\",\n            \"blockChars\": 253\n          },\n          {\n            \"name\": \"skill-creator\",\n            \"blockChars\": 266\n          },\n          {\n            \"name\": \"taskflow\",\n            \"blockChars\": 281\n          },\n          {\n            \"name\": \"taskflow-inbox-triage\",\n            \"blockChars\": 291\n          },\n          {\n            \"name\": \"tmux\",\n            \"blockChars\": 255\n          },\n          {\n            \"name\": \"video-frames\",\n            \"blockChars\": 229\n          },\n          {\n            \"name\": \"weather\",\n            \"blockChars\": 251\n          }\n        ]\n      },\n      \"tools\": {\n        \"listChars\": 0,\n        \"schemaChars\": 24395,\n        \"entries\": [\n          {\n            \"name\": \"read\",\n            \"summaryChars\": 298,\n            \"schemaChars\": 304,\n            \"propertiesCount\": 3\n          },\n          {\n            \"name\": \"edit\",\n            \"summaryChars\": 326,\n            \"schemaChars\": 834,\n            \"propertiesCount\": 2\n          },\n          {\n            \"name\": \"write\",\n            \"summaryChars\": 127,\n            \"schemaChars\": 225,\n            \"propertiesCount\": 2\n          },\n          {\n            \"name\": \"exec\",\n            \"summaryChars\": 539,\n            \"schemaChars\": 1187,\n            \"propertiesCount\": 12\n          },\n          {\n            \"name\": \"process\",\n            \"summaryChars\": 456,\n            \"schemaChars\": 1074,\n            \"propertiesCount\": 12\n          },\n          {\n            \"name\": \"nodes\",\n            \"summaryChars\": 173,\n            \"schemaChars\": 1589,\n            \"propertiesCount\": 32\n          },\n          {\n            \"name\": \"cron\",\n            \"summaryChars\": 4651,\n            \"schemaChars\": 7959,\n            \"propertiesCount\": 14\n          },\n          {\n            \"name\": \"message\",\n            \"summaryChars\": 89,\n            \"schemaChars\": 6166,\n            \"propertiesCount\": 108\n          },\n          {\n            \"name\": \"tts\",\n            \"summaryChars\": 305,\n            \"schemaChars\": 316,\n            \"propertiesCount\": 3\n          },\n          {\n            \"name\": \"gateway\",\n            \"summaryChars\": 697,\n            \"schemaChars\": 537,\n            \"propertiesCount\": 13\n          },\n          {\n            \"name\": \"agents_list\",\n            \"summaryChars\": 118,\n            \"schemaChars\": 33,\n            \"propertiesCount\": 0\n          },\n          {\n            \"name\": \"sessions_list\",\n            \"summaryChars\": 225,\n            \"schemaChars\": 432,\n            \"propertiesCount\": 9\n          },\n          {\n            \"name\": \"sessions_history\",\n            \"summaryChars\": 180,\n            \"schemaChars\": 161,\n            \"propertiesCount\": 3\n          },\n          {\n            \"name\": \"sessions_send\",\n            \"summaryChars\": 314,\n            \"schemaChars\": 274,\n            \"propertiesCount\": 5\n          },\n          {\n            \"name\": \"sessions_spawn\",\n            \"summaryChars\": 419,\n            \"schemaChars\": 1381,\n            \"propertiesCount\": 17\n          },\n          {\n            \"name\": \"sessions_yield\",\n            \"summaryChars\": 97,\n            \"schemaChars\": 60,\n            \"propertiesCount\": 1\n          },\n          {\n            \"name\": \"subagents\",\n            \"summaryChars\": 184,\n            \"schemaChars\": 191,\n            \"propertiesCount\": 4\n          },\n          {\n            \"name\": \"session_status\",\n            \"summaryChars\": 456,\n            \"schemaChars\": 89,\n            \"propertiesCount\": 2\n          },\n          {\n            \"name\": \"web_search\",\n            \"summaryChars\": 83,\n            \"schemaChars\": 1209,\n            \"propertiesCount\": 12\n          },\n          {\n            \"name\": \"web_fetch\",\n            \"summaryChars\": 129,\n            \"schemaChars\": 374,\n            \"propertiesCount\": 3\n          }\n        ]\n      }\n    },\n    \"finalPromptText\": \"[Retry after the previous model attempt failed or timed out]\\n\\nReply with only QR-FIXTURE-OK.\",\n    \"finalAssistantVisibleText\": \"QR-FIXTURE-OK\",\n    \"finalAssistantRawText\": \"QR-FIXTURE-OK\",\n    \"replayInvalid\": false,\n    \"livenessState\": \"working\",\n    \"stopReason\": \"stop\",\n    \"executionTrace\": {\n      \"winnerProvider\": \"qrfixture\",\n      \"winnerModel\": \"deepseek-v4.1-flash\",\n      \"attempts\": [\n        {\n          \"provider\": \"qrfixture\",\n          \"model\": \"deepseek-v4.1-flash\",\n          \"result\": \"success\",\n          \"stage\": \"assistant\"\n        }\n      ],\n      \"fallbackUsed\": false,\n      \"runner\": \"embedded\"\n    },\n    \"requestShaping\": {\n      \"thinking\": \"off\"\n    },\n    \"completion\": {\n      \"stopReason\": \"stop\",\n      \"finishReason\": \"stop\"\n    }\n  }\n}",
      "stderr": "[agent/embedded] embedded run agent end: runId=qr-local-test isError=true model=qwen3.8-flash provider=qrlimited error=⚠️ API rate limit reached. Please try again later. rawError=429 local fixture 429\n[agent/embedded] embedded run agent end: runId=qr-local-test isError=true model=qwen3.8-flash provider=qrlimited error=⚠️ API rate limit reached. Please try again later. rawError=429 local fixture 429\n[agent/embedded] embedded run agent end: runId=qr-local-test isError=true model=qwen3.8-flash provider=qrlimited error=⚠️ API rate limit reached. Please try again later. rawError=429 local fixture 429\n[agent/embedded] embedded run agent end: runId=qr-local-test isError=true model=qwen3.8-flash provider=qrlimited error=⚠️ API rate limit reached. Please try again later. rawError=429 local fixture 429\n[agent/embedded] embedded run failover decision: runId=qr-local-test stage=assistant decision=fallback_model reason=rate_limit from=qrlimited/qwen3.8-flash profile=- rawError=429 local fixture 429\n[diagnostic] lane task error: lane=main durationMs=19544 error=\"FailoverError: ⚠️ API rate limit reached. Please try again later.\"\n[diagnostic] lane task error: lane=session:agent:main:explicit:qr-local-test durationMs=19546 error=\"FailoverError: ⚠️ API rate limit reached. Please try again later.\"\n[model-fallback/decision] model fallback decision: decision=candidate_failed requested=qrlimited/qwen3.8-flash candidate=qrlimited/qwen3.8-flash reason=rate_limit next=qrfixture/deepseek-v4.1-flash detail=429 local fixture 429\n[model-fallback/decision] model fallback decision: decision=candidate_succeeded requested=qrlimited/qwen3.8-flash candidate=qrfixture/deepseek-v4.1-flash reason=unknown next=none"
    }
  ],
  "localRequests": [
    {
      "path": "/limited/v1/chat/completions",
      "model": "qwen3.8-flash",
      "stream": true,
      "fixtureKeyPresent": true,
      "projectMarkerInBody": false
    },
    {
      "path": "/limited/v1/chat/completions",
      "model": "qwen3.8-flash",
      "stream": true,
      "fixtureKeyPresent": true,
      "projectMarkerInBody": false
    },
    {
      "path": "/limited/v1/chat/completions",
      "model": "qwen3.8-flash",
      "stream": true,
      "fixtureKeyPresent": true,
      "projectMarkerInBody": false
    },
    {
      "path": "/limited/v1/chat/completions",
      "model": "qwen3.8-flash",
      "stream": true,
      "fixtureKeyPresent": true,
      "projectMarkerInBody": false
    },
    {
      "path": "/v1/chat/completions",
      "model": "deepseek-v4.1-flash",
      "stream": true,
      "fixtureKeyPresent": true,
      "projectMarkerInBody": false
    }
  ],
  "passed": true,
  "mode": "isolated local fixture",
  "date": "2026-11-04"
}
