{"record":{"id":"7ab2af0a7e8889f6","repo":"BigPizzaV3/CodexPlusPlus","slug":"id-7ab2af","errorCode":null,"errorMessage":"主题市场包含无效 ID：{}","messagePattern":"主题市场包含无效 ID：(.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_market.rs","lineNumber":205,"sourceCode":"        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);\n    }\n    for (label, value, limit) in [\n        (\"名称\", theme.name.as_str(), 100usize),\n        (\"版本\", theme.version.as_str(), 40usize),\n        (\"作者\", theme.author.as_str(), 100usize),\n        (\"许可证\", theme.license.as_str(), 100usize),\n    ] {\n        if value.trim().is_empty() || value.len() > limit {\n            bail!(\"市场主题 {} 的{}无效\", theme.id, label);\n        }\n    }\n    if theme.description.len() > 500 || theme.tags.len() > 12 {\n        bail!(\"市场主题 {} 的描述或标签数量超过限制\", theme.id);\n    }\n    if theme\n        .tags\n        .iter()\n        .any(|tag| tag.trim().is_empty() || tag.len() > 32)","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_market.rs#L187-L223","documentation":"Validation guard in validate_market_theme: the theme id fails valid_theme_id — must be 1-64 bytes, start alphanumeric, and contain only lowercase letters, digits, '-' or '_'. Fires on a manifest entry whose id is empty, too long, or contains uppercase/other characters, since ids are used as directory and file names.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_market.rs:205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the theme id in the market manifest to match the allowed id format","Skip or report the offending market theme"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}