{"record":{"id":"1e09a7143e39feb4","repo":"BigPizzaV3/CodexPlusPlus","slug":"error-1e09a7","errorCode":null,"errorMessage":"不支持的主题市场清单版本","messagePattern":"不支持的主题市场清单版本","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_market.rs","lineNumber":187,"sourceCode":"            .join(\"dream-skin/themes\")\n            .join(&theme.id)\n            .join(\"theme.json\");\n        theme.installed = local_theme.is_file();\n        theme.installed_version = if theme.installed {\n            records.themes.get(&theme.id).cloned().unwrap_or_default()\n        } else {\n            String::new()\n        };\n        theme.update_available = theme.installed\n            && !theme.installed_version.is_empty()\n            && theme.installed_version != theme.version;\n    }\n    manifest\n}\n\nfn validate_manifest(manifest: &mut DreamSkinMarketManifest) -> anyhow::Result<()> {\n    if manifest.schema_version != 1 {\n        bail!(\"不支持的主题市场清单版本\");\n    }\n    if manifest.themes.len() > MARKET_THEME_COUNT_LIMIT {\n        bail!(\"主题市场清单超过 {} 项限制\", MARKET_THEME_COUNT_LIMIT);\n    }\n    let mut ids = HashSet::new();\n    for theme in &mut manifest.themes {\n        validate_market_theme(theme)?;\n        if !ids.insert(theme.id.clone()) {\n            bail!(\"主题市场清单包含重复 ID：{}\", theme.id);\n        }\n        theme.preview_url = market_asset_url(DEFAULT_MARKET_RAW_BASE_URL, &theme.preview)?;\n    }\n    Ok(())\n}\n\nfn validate_market_theme(theme: &DreamSkinMarketTheme) -> anyhow::Result<()> {\n    if !valid_theme_id(&theme.id) {\n        bail!(\"主题市场包含无效 ID：{}\", theme.id);","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/dream_skin_market.rs#L169-L205","documentation":"validate_manifest rejects any market manifest whose schema_version is not exactly 1. The client only understands manifest schema v1, so manifests produced by newer (or older) publisher tooling are refused rather than parsed incorrectly.","triggerScenarios":"fetch_market_manifest downloads a manifest JSON whose schemaVersion field is 2+ (newer market format) or 0/missing-as-default, then validate_manifest bails; read_cached_manifest hits a stale cache written by a different client version.","commonSituations":"The remote market upgraded its manifest format before your client was updated; a test/staging market serves a draft schema; a hand-edited manifest omitted or changed the version field; stale cache from a previous app version.","solutions":["Update CodexPlusPlus to a version that supports the manifest schema_version published by the market","Check the manifest's schema_version field and confirm which schema the publisher intends; if it is a publisher mistake, ask them to set it back to 1","Clear the cached manifest so read_cached_manifest refetches a v1 manifest from upstream","Point the manifest URL at the v1 endpoint/branch if the market hosts multiple schema versions"],"exampleFix":"// before (manifest.json)\n{ \"schemaVersion\": 2, \"themes\": [ ... ] }\n// after\n{ \"schemaVersion\": 1, \"themes\": [ ... ] }","handlingStrategy":"validation","validationCode":"fn manifest_schema_ok(bytes: &[u8]) -> bool {\n    serde_json::from_slice::<serde_json::Value>(bytes)\n        .ok()\n        .and_then(|v| v.get(\"schemaVersion\").and_then(|s| s.as_i64()))\n        == Some(1)\n}","typeGuard":null,"tryCatchPattern":"match fetch_market_manifest(url).await {\n    Ok(m) => use_manifest(m),\n    Err(e) if e.to_string().contains(\"清单版本\") => {\n        eprintln!(\"market uses an unsupported schema_version — upgrade the client or pin a v1 manifest URL\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Pin the manifest URL to a schema version your client supports","Check the market's changelog before pointing clients at a new manifest endpoint","Clear cached manifests after upgrading the app so schema mismatches surface early","Include schema_version compatibility in publisher CI checks"],"tags":["versioning","marketplace","schema"],"backgroundTag":"unsupported-enum-value","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"}