{"record":{"id":"94608f74872fa47b","repo":"BigPizzaV3/CodexPlusPlus","slug":"manifest-files","errorCode":null,"errorMessage":"manifest.files 数量无效","messagePattern":"manifest\\.files 数量无效","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_package.rs","lineNumber":977,"sourceCode":"        || manifest.license.len() > 64\n        || !manifest.license.bytes().enumerate().all(|(index, byte)| {\n            byte.is_ascii_alphanumeric()\n                || (index > 0 && matches!(byte, b' ' | b'.' | b'+' | b'(' | b')' | b'-'))\n        })\n        || !safe_manifest_text(&manifest.provenance.summary, 1, 500, true)\n    {\n        bail!(\"manifest 发布者、许可证或来源说明为空\");\n    }\n    if manifest\n        .key_id\n        .as_deref()\n        .is_some_and(|key| !valid_key_id(key))\n        || !valid_rfc3339(&manifest.created_at)\n    {\n        bail!(\"manifest keyId 或 createdAt 无效\");\n    }\n    if manifest.files.len() < 2 || manifest.files.len() > 8 {\n        bail!(\"manifest.files 数量无效\");\n    }\n    Ok(())\n}\n\nfn validate_theme(\n    theme: &Value,\n    manifest: &DreamSkinPackageManifest,\n    image_name: &str,\n) -> anyhow::Result<()> {\n    let object = theme.as_object().context(\"theme.json 必须是对象\")?;\n    const REQUIRED: &[&str] = &[\"schemaVersion\", \"id\", \"name\", \"image\"];\n    const OPTIONAL: &[&str] = &[\n        \"brandSubtitle\",\n        \"tagline\",\n        \"projectPrefix\",\n        \"projectLabel\",\n        \"statusText\",\n        \"quote\",","sourceCodeStart":959,"sourceCodeEnd":995,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_package.rs#L959-L995","documentation":"Thrown by validate_manifest when the manifest.files array is empty or otherwise fails its count/shape limits. The offending input is manifest.files — the file inventory that later SHA-256/size verification iterates; an invalid inventory means there is nothing consistent to verify the package contents against.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_package.rs:977 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["把 files 精简为包内实际存在的白名单文件","检查是否重复声明了文件"],"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-14T05:17:10.506Z"}