{"record":{"id":"ae39d9af6c413f2f","repo":"BoundaryML/baml","slug":"manifest-for-version-has-target-set-actual-expected-expected","errorCode":null,"errorMessage":"manifest for {version} has target set {actual:?}; expected {expected:?}","messagePattern":"manifest for (.+?) has target set (.+?); expected (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/manifest.rs","lineNumber":144,"sourceCode":"\nfn validate_schema(schema: u32) -> anyhow::Result<()> {\n    if schema > MANIFEST_SCHEMA {\n        anyhow::bail!(\n            \"manifest schema {schema} is newer than this wrapper; run `baml self-update`\"\n        );\n    }\n    if schema != MANIFEST_SCHEMA {\n        anyhow::bail!(\"unsupported manifest schema {schema}\");\n    }\n    Ok(())\n}\n\nfn validate_artifacts(version: &str, artifacts: &BTreeMap<String, Artifact>) -> anyhow::Result<()> {\n    let expected: std::collections::BTreeSet<_> =\n        SUPPORTED_RELEASE_TARGETS.iter().copied().collect();\n    let actual: std::collections::BTreeSet<_> = artifacts.keys().map(String::as_str).collect();\n    if actual != expected {\n        anyhow::bail!(\"manifest for {version} has target set {actual:?}; expected {expected:?}\");\n    }\n    for (target, artifact) in artifacts {\n        validate_artifact(target, artifact)?;\n    }\n    Ok(())\n}\n\nfn validate_artifact(name: &str, artifact: &Artifact) -> anyhow::Result<()> {\n    if !artifact.url.starts_with(\"https://\") {\n        anyhow::bail!(\"artifact {name} URL must use HTTPS\");\n    }\n    validate_sha256(&artifact.sha256)?;\n    Ok(())\n}\n\nfn validate_sdk(language: &str, package: &SdkPackage) -> anyhow::Result<()> {\n    if package.registry.is_empty() || package.package.is_empty() || package.version.is_empty() {\n        anyhow::bail!(\"sdk {language} has an empty registry, package, or version\");","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/manifest.rs#L126-L162","documentation":"During release manifest validation, the set of artifact target keys in the manifest is compared against SUPPORTED_RELEASE_TARGETS. If they differ (missing target, extra target, or typo), the manifest is rejected. This ensures every release ships exactly the full, expected matrix of platform binaries.","triggerScenarios":"Calling validate() on a manifest whose artifacts map contains keys not exactly equal to SUPPORTED_RELEASE_TARGETS — a missing target, a hand-added target, or a misspelled target name.","commonSituations":"Hand-editing baml_release manifest files; adding support for a new platform in artifacts without updating SUPPORTED_RELEASE_TARGETS (or vice versa after a library upgrade); merging manifests that dropped a target.","solutions":["Diff the manifest's artifact keys against SUPPORTED_RELEASE_TARGETS and add/remove entries so the sets match exactly","Fix typos in target names in the manifest (e.g. wrong triple spelling)","If a new platform is intentional, update SUPPORTED_RELEASE_TARGETS in baml_release and regenerate the manifest"],"exampleFix":"// before\n[artifacts]\nx86_64-unknown-linux-musl = { ... }\n# aarch64-unknown-linux-musl missing\n\n// after\n[artifacts]\nx86_64-unknown-linux-musl = { ... }\naarch64-unknown-linux-musl = { ... }","handlingStrategy":"validation","validationCode":"let expected: std::collections::BTreeSet<_> = SUPPORTED_RELEASE_TARGETS.iter().copied().collect();\nlet actual: std::collections::BTreeSet<_> = manifest.artifacts.keys().cloned().collect();\nassert_eq!(actual, expected, \"artifact target sets differ: missing={:?} extra={:?}\", expected.difference(&actual).collect::<Vec<_>>(), actual.difference(&expected).collect::<Vec<_>>());","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate manifests via the release tooling, never hand-edit artifact keys","Keep SUPPORTED_RELEASE_TARGETS as the single source of truth","Add a CI check that validates every manifest before publishing"],"tags":["release","manifest","validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}