{"record":{"id":"402b8bc716e9f47e","repo":"astrid-runtime/astrid","slug":"unsupported-schema-version-expected-schema-ve","errorCode":null,"errorMessage":"unsupported schema-version {} (expected {SCHEMA_VERSION})","messagePattern":"unsupported schema-version (.+?) \\(expected (.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/distro/validate.rs","lineNumber":80,"sourceCode":"/// Checks that cannot be expressed in serde alone:\n/// - Schema version is supported\n/// - Distro ID format\n/// - Distro version is valid semver\n/// - astrid-version (if set) is valid semver requirement\n/// - No duplicate capsule names\n/// - At least one capsule\n/// - At least one capsule with role = \"uplink\"\n/// - Variable references in capsule env resolve to defined variables\n/// - Requires version strings are valid semver requirements\n#[allow(\n    clippy::too_many_lines,\n    reason = \"flat sequence of independent validation checks; \\\n              inlining keeps the full ruleset auditable in one place\"\n)]\npub(crate) fn validate_manifest(manifest: &DistroManifest) -> anyhow::Result<()> {\n    // Schema version.\n    if manifest.schema_version != SCHEMA_VERSION {\n        anyhow::bail!(\n            \"unsupported schema-version {} (expected {SCHEMA_VERSION})\",\n            manifest.schema_version,\n        );\n    }\n\n    // Distro ID format.\n    if !is_valid_id(&manifest.distro.id) {\n        anyhow::bail!(\n            \"distro.id '{}' is invalid (must match ^[a-z][a-z0-9-]*$)\",\n            manifest.distro.id,\n        );\n    }\n\n    // Distro version is valid semver.\n    if semver::Version::parse(&manifest.distro.version).is_err() {\n        anyhow::bail!(\n            \"distro.version '{}' is not valid semver\",\n            manifest.distro.version,","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/distro/validate.rs#L62-L98","documentation":"validate_manifest checks DistroManifest.schema_version against the compile-time SCHEMA_VERSION constant and rejects any other value. The distro manifest format evolves; loading a manifest written for a different schema version is unsupported rather than guessed at.","triggerScenarios":"Passing a DistroManifest parsed from a Distro.toml whose schema-version field is older or newer than the tool's SCHEMA_VERSION — e.g. a manifest produced by a different astrid version.","commonSituations":"Hand-edited Distro.toml with a wrong schema-version number; manifests from an older/newer astrid release; copy-pasted manifests between projects with different versions.","solutions":["Update schema-version in Distro.toml to the version the tool expects (see the error message)","Upgrade or downgrade the astrid CLI to a version matching the manifest's schema-version","Migrate the manifest through the tool version that supports its schema, then resave"],"exampleFix":"// before\n// schema-version = 1\n// after\n// schema-version = 2  # match the installed astrid's SCHEMA_VERSION","handlingStrategy":"validation","validationCode":"if manifest.schema_version != SCHEMA_VERSION {\n    return Err(anyhow!(\"unsupported schema-version {}\", manifest.schema_version));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin the astrid CLI version used to produce and consume manifests","Run manifest validation in CI before packaging","Track schema-version changes in release notes"],"tags":["validation","manifest","schema-version","version-mismatch"],"backgroundTag":"schema-validation-failed","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}