BigPizzaV3/CodexPlusPlus · error · anyhow::Error
市场主题配置与清单身份不一致
Error message
市场主题配置与清单身份不一致
What it means
Integrity guard raised during market theme installation: the downloaded theme.json's identity (id/version) does not match the market manifest entry, or its theme id is invalid. install_market_theme_from_base refuses to install a theme whose on-disk identity diverges from what the manifest advertised, preventing mislabeled or spoofed installs.
Source
Thrown at crates/codex-plus-core/src/dream_skin_market.rs:137
) -> anyhow::Result<DreamSkinThemeSummary> {
install_market_theme_from_base(state_dir, theme, DEFAULT_MARKET_RAW_BASE_URL).await
}
pub async fn install_market_theme_from_base(
state_dir: &Path,
theme: &DreamSkinMarketTheme,
raw_base_url: &str,
) -> anyhow::Result<DreamSkinThemeSummary> {
validate_market_theme(theme)?;
let client = market_http_client()?;
let theme_url = market_asset_url(raw_base_url, &theme.theme)?;
let image_url = market_asset_url(raw_base_url, &theme.image)?;
let theme_bytes = download_limited(&client, &theme_url, MARKET_THEME_LIMIT).await?;
verify_sha256(&theme_bytes, &theme.theme_sha256, "主题配置")?;
let config: DreamSkinThemeConfig =
serde_json::from_slice(&theme_bytes).context("市场主题配置不是有效 JSON")?;
if config.id != theme.id || config.name != theme.name {
bail!("市场主题配置与清单身份不一致");
}
let image_bytes = download_limited(&client, &image_url, MARKET_IMAGE_LIMIT).await?;
verify_sha256(&image_bytes, &theme.image_sha256, "主题图片")?;
let extension =
detect_image_extension(&image_bytes).context("市场主题图片格式无效或不受支持")?;
let download_path = market_download_path(state_dir, &theme.id, extension)?;
crate::settings::atomic_write(&download_path, &image_bytes)
.with_context(|| format!("无法暂存市场主题图片 {}", download_path.display()))?;
let draft = DreamSkinThemeDraft {
config,
image_path: download_path.to_string_lossy().into_owned(),
builtin: false,
};
let installed = crate::dream_skin_library::save_dream_skin_theme(state_dir, &draft);
let _ = std::fs::remove_file(&download_path);
let installed = installed?;View on GitHub (pinned to f2074595a2)
Solutions
- Refresh the market manifest and retry the install
- Report the theme as mislabeled to the market maintainer
- Verify the theme.json id matches the manifest entry's id
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_market.rs:137 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/f0febdba7403b69a.
Report an issue: GitHub.