BigPizzaV3/CodexPlusPlus · error
DreamSkin 主题包身份与审核元数据不一致
Error message
DreamSkin 主题包身份与审核元数据不一致
What it means
install_community_theme verifies that the downloaded DreamSkin theme package's manifest (theme_id and version) exactly matches the community metadata that was fetched from the service. If the package contents claim a different identity than the reviewed/indexed metadata, the install is aborted to prevent installing unvetted content. This is an anti-tampering consistency check between the package and its audit record.
Solutions
- Refetch the community catalog so metadata matches the current package, then retry install_community_theme.
- Delete any cached/queued package bytes for this theme and download a fresh copy.
- Report the theme to the DreamSkin community maintainers as having package/metadata drift.
- If you maintain the mirror, regenerate the package_sha256 and version fields together so they stay consistent.
Example fix
// before: using stale cached metadata let metadata = cached_catalog.find(id)?.clone(); install_community_theme(state_dir, &metadata).await?; // after: refresh metadata first let catalog = load_community_catalog(state_dir, true).await?; let metadata = catalog.items.iter().find(|t| t.id == id).unwrap().clone(); install_community_theme(state_dir, &metadata).await?;
Defensive patterns
Strategy: validation
Validate before calling
// Rust
if theme.manifest.theme_id != metadata.theme_id || theme.manifest.version != metadata.version {
// skip install; refetch catalog metadata first
} Type guard
fn metadata_matches(m: &ThemeManifest, meta: &CommunityThemeMeta) -> bool {
m.theme_id == meta.theme_id && m.version == meta.version
} Try / catch
// Rust
match install_community_theme(state_dir, &metadata).await {
Ok(v) => println!("installed {}", v.theme_id),
Err(e) if e.to_string().contains("不一致") => refresh_catalog_and_retry().await,
Err(e) => return Err(e),
} Prevention
- Always fetch metadata and package in the same session from the same source
- Re-download the package if the catalog was refreshed in between
- Don't cache metadata across app restarts without revalidating sha256
When it happens
Trigger: Calling install_community_theme where the ZIP's internal manifest.theme_id differs from metadata.theme_id, or manifest.version differs from metadata.version (e.g. the maintainer published a new package under the same metadata, or a re-packed/tampered archive was uploaded).
Common situations: Upstream re-uploaded a package with a bumped version but the catalog still serves stale metadata; a malicious mirror swaps the archive; local cache of the package is from an older release; CDN serves inconsistent objects.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Unexpected file type or size
- 主题包必须是 32 MiB 以内的普通 ZIP 文件
- 请填写 API 的模型名称
- 官方混合 API 不应在 auth.json 中保存 OPENAI_API_KEY。请清理此供应商的…
- 请填写 API 的模型名称
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19).
Data as JSON: /api/errors/34a88cc7323e6e2f.
Report an issue: GitHub.
Appendix: source
Thrown at crates/codex-plus-core/src/dream_skin_community.rs:185
metadata.package_bytes,
"application/zip",
)
.await?;
if package.len() != metadata.package_bytes {
bail!("DreamSkin 主题包实际大小与审核元数据不一致");
}
let actual_sha = format!("{:x}", Sha256::digest(&package));
if !actual_sha.eq_ignore_ascii_case(&metadata.package_sha256) {
bail!("DreamSkin 主题包 SHA-256 与审核元数据不一致");
}
let validated = crate::dream_skin_package::validate_and_read_package(
&package,
if cfg!(windows) { "windows" } else { "macos" },
)?;
if validated.manifest.theme_id != metadata.theme_id
|| validated.manifest.version != metadata.version
{
bail!("DreamSkin 主题包身份与审核元数据不一致");
}
crate::dream_skin_library::save_validated_dream_skin_package(state_dir, &validated)
}
pub fn import_theme_package(
state_dir: &Path,
archive_path: &Path,
) -> anyhow::Result<DreamSkinThemeSummary> {
let metadata = std::fs::symlink_metadata(archive_path)
.with_context(|| format!("无法读取主题包:{}", archive_path.display()))?;
if !metadata.file_type().is_file()
|| metadata.file_type().is_symlink()
|| metadata.len() == 0
|| metadata.len() as usize > PACKAGE_BYTES_LIMIT
{
bail!("主题包必须是 32 MiB 以内的普通 ZIP 文件");
}
let bytes = std::fs::read(archive_path)View on GitHub (pinned to b1ed92e5e4)