{"record":{"id":"419fdb5678687523","repo":"BigPizzaV3/CodexPlusPlus","slug":"theme-json","errorCode":null,"errorMessage":"theme.json 包含缺失或不支持的字段","messagePattern":"theme\\.json 包含缺失或不支持的字段","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_package.rs","lineNumber":1008,"sourceCode":"        \"brandSubtitle\",\n        \"tagline\",\n        \"projectPrefix\",\n        \"projectLabel\",\n        \"statusText\",\n        \"quote\",\n        \"promoTitle\",\n        \"promoSub\",\n        \"promoUrl\",\n        \"appearance\",\n        \"art\",\n        \"colors\",\n    ];\n    if REQUIRED.iter().any(|key| !object.contains_key(*key))\n        || object\n            .keys()\n            .any(|key| !REQUIRED.contains(&key.as_str()) && !OPTIONAL.contains(&key.as_str()))\n    {\n        bail!(\"theme.json 包含缺失或不支持的字段\");\n    }\n    if object.get(\"schemaVersion\").and_then(Value::as_u64) != Some(1)\n        || object.get(\"id\").and_then(Value::as_str) != Some(manifest.theme_id.as_str())\n        || object.get(\"name\").and_then(Value::as_str).is_none()\n        || object.get(\"image\").and_then(Value::as_str) != Some(image_name)\n    {\n        bail!(\"theme.json 与 manifest 身份或背景图不一致\");\n    }\n    if object\n        .get(\"name\")\n        .and_then(Value::as_str)\n        .is_some_and(|name| !safe_manifest_text(name, 1, 80, false))\n    {\n        bail!(\"theme.json.name 无效\");\n    }\n    for key in [\n        \"brandSubtitle\",\n        \"tagline\",","sourceCodeStart":990,"sourceCodeEnd":1026,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_package.rs#L990-L1026","documentation":"Thrown by validate_theme when the theme.json object is missing any REQUIRED key or contains a key outside both REQUIRED and OPTIONAL whitelists. This is a strict schema guard on untrusted theme JSON: unknown keys are rejected rather than ignored so forward-incompatible themes fail loudly. The offending input is the key set of the theme.json object.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1008 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["补齐所有必需字段","删除 schema 未定义的自定义字段"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}