{"record":{"id":"ccd9df787d57c264","repo":"BoundaryML/baml","slug":"checksum-file-did-not-contain-an-entry-for-archive-name","errorCode":null,"errorMessage":"Checksum file did not contain an entry for {archive_name}","messagePattern":"Checksum file did not contain an entry for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/lib.rs","lineNumber":399,"sourceCode":"        });\n    }\n    Ok(())\n}\n\npub fn parse_release_checksum(checksum_text: &str, archive_name: &str) -> Result<String> {\n    for line in checksum_text.lines() {\n        let mut parts = line.split_whitespace();\n        let Some(hash) = parts.next() else {\n            continue;\n        };\n        let Some(name) = parts.next() else {\n            continue;\n        };\n        if name == archive_name {\n            return validate_sha256(hash);\n        }\n    }\n    anyhow::bail!(\"Checksum file did not contain an entry for {archive_name}\")\n}\n\nfn download_bytes(url: &str) -> Result<Vec<u8>, FetchError> {\n    let client = reqwest::blocking::Client::builder()\n        .connect_timeout(Duration::from_secs(10))\n        .timeout(Duration::from_mins(10))\n        .user_agent(\"baml-release/1\")\n        .build()\n        .map_err(|source| FetchError::Network {\n            url: url.to_string(),\n            source,\n        })?;\n\n    let mut last_error = None;\n    for attempt in 1..=3 {\n        match client.get(url).send() {\n            Ok(response) if response.status() == reqwest::StatusCode::NOT_FOUND => {\n                return Err(FetchError::ManifestNotFound {","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/lib.rs#L381-L417","documentation":"parse_release_checksum scans a downloaded SHA256SUMS-style checksum file line by line looking for the entry matching the archive's file name. If no line's name equals archive_name, it bails with this message. It means the checksum file is present but doesn't cover the requested archive.","triggerScenarios":"Calling parse_release_checksum (via verify_release_archive_checksum_text) with an archive_name absent from the checksum text — e.g. wrong file name casing, querying a target artifact not published in that release's checksums, or checksum file from a different release version.","commonSituations":"Fetching a checksums file for release X but an artifact name from release Y; artifacts renamed between releases while cached checksum file is stale; partial uploads where some targets are missing from SHA256SUMS.","solutions":["Confirm the archive file name exactly matches an entry in the checksum file (check spelling, extension, and target triple).","Download the checksum file from the same release/version as the archive.","Clear any cached checksum file and re-fetch the current release's checksums.","If the artifact genuinely has no checksum entry, report the incomplete release to the publisher."],"exampleFix":"// before\nverify(\"baml-cli-x86_64-unknown-linux-musl.tar.gz\", old_checksums) // not listed\n// after\nverify(\"baml-cli-x86_64-unknown-linux-gnu.tar.gz\", checksums_for_same_release)","handlingStrategy":"validation","validationCode":"let present = checksum_text.lines().any(|l| {\n    l.split_whitespace().nth(1).map_or(false, |n| n.trim_start_matches('*') == archive_name)\n});\nif !present { return Err(format!(\"{archive_name} missing from checksum file\")); }","typeGuard":null,"tryCatchPattern":"match verify_archive_checksum(bytes, url) {\n    Err(e) if e.to_string().contains(\"did not contain an entry\") => re_fetch_matching_checksums(),\n    r => r,\n}","preventionTips":["Download the checksum file and archive from the same release/version.","Verify the artifact's file name matches a SHA256SUMS entry before verification.","Invalidate cached checksum files when switching release versions."],"tags":["checksum","release","not-found","verification"],"backgroundTag":"record-not-found","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"}