BigPizzaV3/CodexPlusPlus · error

manifest 发布者、许可证或来源说明为空

Error message

manifest 发布者、许可证或来源说明为空

What it means

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.

Solutions

  1. Fill in publisher.displayName (1-80 safe chars) and publisher.id (ASCII alphanumerics, '_' and '-', max 64)
  2. Set license to a 1-64 char alphanumeric string; only spaces, '.', '+', '(', ')', '-' are allowed and never as the first character
  3. Write a non-empty provenance.summary (up to 500 safe chars)
  4. Strip HTML/emoji/control characters from all three fields
  5. Re-validate the package

Example fix

// before (manifest.json)
"publisher": {"displayName": "", "id": "weird id!"},
"license": " MIT",
"provenance": {"summary": ""}
// after
"publisher": {"displayName": "Acme Skins", "id": "acme_skins"},
"license": "MIT",
"provenance": {"summary": "Packaged by Acme from upstream sources."}
Defensive patterns

Strategy: validation

Validate before calling

fn manifest_meta_ok(m: &DreamSkinPackageManifest) -> bool {
    !m.publisher.display_name.is_empty() && m.publisher.display_name.chars().count() <= 80
        && !m.publisher.id.is_empty() && m.publisher.id.len() <= 64
        && m.publisher.id.bytes().all(|b| b.is_ascii_alphanumeric() || matches!(b, b'_' | b'-'))
        && !m.license.is_empty() && m.license.len() <= 64
        && !m.provenance.summary.trim().is_empty()
}
if !manifest_meta_ok(&manifest) { /* fill fields before calling */ }

Type guard

fn has_complete_provenance(m: &DreamSkinPackageManifest) -> bool {
    !m.publisher.id.is_empty() && !m.publisher.display_name.trim().is_empty()
        && !m.license.trim().is_empty() && !m.provenance.summary.trim().is_empty()
}

Try / catch

match validate_and_read_package(&path, platform) {
    Err(e) if e.to_string().contains("发布者、许可证或来源说明") => {
        eprintln!("package rejected: publisher/license/provenance metadata incomplete");
    }
    other => other?,
}

Prevention

When it happens

Trigger: 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.

Common situations: Templates shipped with empty publisher/provenance placeholders; SPDX-like expressions with '+'/'(' characters placed wrongly; authors pasting HTML or emoji into display names or summaries.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/85385b967b4fb5aa. Report an issue: GitHub.

Appendix: source

Thrown at crates/codex-plus-core/src/dream_skin_package.rs:966

        bail!("manifest.capabilities 无效或缺少 safe-css 能力");
    }
    if !safe_manifest_text(&manifest.publisher.display_name, 1, 80, false)
        || manifest.publisher.id.is_empty()
        || manifest.publisher.id.len() > 64
        || !manifest
            .publisher
            .id
            .bytes()
            .all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'_' | b'-'))
        || manifest.license.is_empty()
        || manifest.license.len() > 64
        || !manifest.license.bytes().enumerate().all(|(index, byte)| {
            byte.is_ascii_alphanumeric()
                || (index > 0 && matches!(byte, b' ' | b'.' | b'+' | b'(' | b')' | b'-'))
        })
        || !safe_manifest_text(&manifest.provenance.summary, 1, 500, true)
    {
        bail!("manifest 发布者、许可证或来源说明为空");
    }
    if manifest
        .key_id
        .as_deref()
        .is_some_and(|key| !valid_key_id(key))
        || !valid_rfc3339(&manifest.created_at)
    {
        bail!("manifest keyId 或 createdAt 无效");
    }
    if manifest.files.len() < 2 || manifest.files.len() > 8 {
        bail!("manifest.files 数量无效");
    }
    Ok(())
}

fn validate_theme(
    theme: &Value,
    manifest: &DreamSkinPackageManifest,

View on GitHub (pinned to b1ed92e5e4)