BigPizzaV3/CodexPlusPlus · error · anyhow::Error
DreamSkin 主题版本 ID 无效
Error message
DreamSkin 主题版本 ID 无效
What it means
Validation in validate_version_id (dream_skin_community): a DreamSkin theme version id string failed the id format check (e.g. from a dreamskin://apply link or a catalog entry's id field), so it cannot be used as a safe directory/file identifier. Fired by normalize/display and link-parsing paths.
Source
Thrown at crates/codex-plus-core/src/dream_skin_community.rs:289
fn validate_community_theme(theme: &DreamSkinCommunityTheme) -> anyhow::Result<()> {
validate_version_id(&theme.id)?;
if !safe_text(&theme.theme_id, 80)
|| !safe_text(&theme.name, 120)
|| !safe_text(&theme.author_display_name, 120)
|| !safe_text(&theme.license, 80)
|| !valid_semver(&theme.version)
|| theme.package_bytes == 0
|| theme.package_bytes > PACKAGE_BYTES_LIMIT
|| !valid_sha256(&theme.package_sha256)
{
bail!("DreamSkin 社区主题元数据无效:{}", theme.id);
}
Ok(())
}
fn validate_version_id(value: &str) -> anyhow::Result<()> {
let Some(suffix) = value.strip_prefix("ver_") else {
bail!("DreamSkin 主题版本 ID 无效");
};
if !(8..=64).contains(&suffix.len())
|| !suffix
.bytes()
.all(|byte| byte.is_ascii_lowercase() || byte.is_ascii_digit())
{
bail!("DreamSkin 主题版本 ID 无效");
}
Ok(())
}
fn safe_text(value: &str, maximum: usize) -> bool {
let trimmed = value.trim();
value == trimmed
&& !value.is_empty()
&& value.chars().count() <= maximum
&& value.chars().all(|character| {
!character.is_control()View on GitHub (pinned to f2074595a2)
Solutions
- Use an apply link or catalog entry with a well-formed version id
- Re-copy the dreamskin:// link if it was truncated or edited
- Avoid hand-crafting version ids
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_community.rs:289 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/4363b6e8c594bafd.
Report an issue: GitHub.