{"record":{"id":"85385b967b4fb5aa","repo":"BigPizzaV3/CodexPlusPlus","slug":"manifest-85385b","errorCode":null,"errorMessage":"manifest 发布者、许可证或来源说明为空","messagePattern":"manifest 发布者、许可证或来源说明为空","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_package.rs","lineNumber":966,"sourceCode":"        bail!(\"manifest.capabilities 无效或缺少 safe-css 能力\");\n    }\n    if !safe_manifest_text(&manifest.publisher.display_name, 1, 80, false)\n        || manifest.publisher.id.is_empty()\n        || manifest.publisher.id.len() > 64\n        || !manifest\n            .publisher\n            .id\n            .bytes()\n            .all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'_' | b'-'))\n        || manifest.license.is_empty()\n        || 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,","sourceCodeStart":948,"sourceCodeEnd":984,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/dream_skin_package.rs#L948-L984","documentation":"validate_manifest rejects the package when the publisher display name fails safe_manifest_text (1-80 chars), publisher.id is empty/over 64 chars or contains characters outside ASCII alphanumerics, underscore and hyphen; or when license is empty/over 64 chars or contains disallowed characters; or when provenance.summary fails safe_manifest_text (1-500 chars). The library requires attributable, sanitized provenance metadata on every theme package.","triggerScenarios":"validate_and_read_package reads a manifest with an empty display name, an id containing spaces or unicode, an empty or malformed license string (e.g. leading space, symbol in first position), or an empty provenance summary.","commonSituations":"Templates shipped with empty publisher/provenance placeholders; SPDX-like expressions with '+'/'(' characters placed wrongly; authors pasting HTML or emoji into display names or summaries.","solutions":["Fill in publisher.displayName (1-80 safe chars) and publisher.id (ASCII alphanumerics, '_' and '-', max 64)","Set license to a 1-64 char alphanumeric string; only spaces, '.', '+', '(', ')', '-' are allowed and never as the first character","Write a non-empty provenance.summary (up to 500 safe chars)","Strip HTML/emoji/control characters from all three fields","Re-validate the package"],"exampleFix":"// before (manifest.json)\n\"publisher\": {\"displayName\": \"\", \"id\": \"weird id!\"},\n\"license\": \" MIT\",\n\"provenance\": {\"summary\": \"\"}\n// after\n\"publisher\": {\"displayName\": \"Acme Skins\", \"id\": \"acme_skins\"},\n\"license\": \"MIT\",\n\"provenance\": {\"summary\": \"Packaged by Acme from upstream sources.\"}","handlingStrategy":"validation","validationCode":"fn manifest_meta_ok(m: &DreamSkinPackageManifest) -> bool {\n    !m.publisher.display_name.is_empty() && m.publisher.display_name.chars().count() <= 80\n        && !m.publisher.id.is_empty() && m.publisher.id.len() <= 64\n        && m.publisher.id.bytes().all(|b| b.is_ascii_alphanumeric() || matches!(b, b'_' | b'-'))\n        && !m.license.is_empty() && m.license.len() <= 64\n        && !m.provenance.summary.trim().is_empty()\n}\nif !manifest_meta_ok(&manifest) { /* fill fields before calling */ }","typeGuard":"fn has_complete_provenance(m: &DreamSkinPackageManifest) -> bool {\n    !m.publisher.id.is_empty() && !m.publisher.display_name.trim().is_empty()\n        && !m.license.trim().is_empty() && !m.provenance.summary.trim().is_empty()\n}","tryCatchPattern":"match validate_and_read_package(&path, platform) {\n    Err(e) if e.to_string().contains(\"发布者、许可证或来源说明\") => {\n        eprintln!(\"package rejected: publisher/license/provenance metadata incomplete\");\n    }\n    other => other?,\n}","preventionTips":["Never ship templates with empty publisher/license/provenance placeholders","Restrict ids to ASCII alphanumerics, '_' and '-'","Strip HTML, emoji and control characters from display names and summaries","Validate license strings against an SPDX-like allowlist"],"tags":["manifest","metadata","validation"],"backgroundTag":"empty-required-field","analyzedSha":"b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6","analyzedAt":"2026-09-19T23:35:21.129Z","contentChangedAt":"2026-09-19T23:35:21.129Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}