{"record":{"id":"d3079024dd7a4256","repo":"jdx/mise","slug":"invalid-checksum-checksum","errorCode":null,"errorMessage":"Invalid checksum: {checksum}","messagePattern":"Invalid checksum: (.+?)","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/backend/github.rs","lineNumber":1585,"sourceCode":"        self.install_additional_archive(&tv.install_path(), &file_path, Some(ctx.pr.as_ref()))?;\n\n        if let Some(bins) = opts.filter_bins() {\n            self.create_symlink_bin_dir(tv, bins)?;\n        }\n        Ok(())\n    }\n\n    fn verify_additional_artifact_checksum(\n        &self,\n        ctx: &InstallContext,\n        file_path: &Path,\n        artifact: &mut ArtifactInfo,\n    ) -> Result<()> {\n        let filename = file_path.file_name().unwrap_or_default().to_string_lossy();\n        if let Some(checksum) = &artifact.checksum {\n            ctx.pr.set_message(format!(\"checksum {filename}\"));\n            let Some((algorithm, expected)) = checksum.split_once(':') else {\n                eyre::bail!(\"Invalid checksum: {checksum}\");\n            };\n            crate::hash::ensure_checksum(file_path, expected, Some(ctx.pr.as_ref()), algorithm)?;\n        } else if Settings::get().lockfile_enabled() {\n            ctx.pr.set_message(format!(\"generate checksum {filename}\"));\n            let hash = crate::hash::file_hash_blake3(file_path, Some(ctx.pr.as_ref()))?;\n            artifact.checksum = Some(format!(\"blake3:{hash}\"));\n        }\n\n        if let Some(expected_size) = artifact.size {\n            let actual_size = file_path.metadata()?.len();\n            if actual_size != expected_size {\n                eyre::bail!(\n                    \"Size mismatch for {}: expected {}, got {}\",\n                    filename,\n                    expected_size,\n                    actual_size\n                );\n            }","sourceCodeStart":1567,"sourceCodeEnd":1603,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/backend/github.rs#L1567-L1603","documentation":"verify_additional_artifact_checksum() verifies a downloaded additional artifact against the checksum stored in the lock entry. Checksums must be `algorithm:value` strings (e.g. `blake3:...`, `sha256:...`); split_once(':') failing means the stored string has no algorithm prefix and cannot be parsed or verified.","triggerScenarios":"A mise.lock entry (or config supplying a checksum) contains a bare hex digest like `e3b0c44298fc...` without the `sha256:` / `blake3:` prefix, and mise (with lockfile verification enabled) downloads that additional artifact for a github: tool.","commonSituations":"Hand-edited lockfiles where someone pasted just the digest from a SHA256SUMS file; lockfile entries written by older mise versions or external tools; copy-pasting checksums from release notes that omit the algorithm.","solutions":["Edit mise.lock so the checksum reads `algorithm:digest` (e.g. `sha256:e3b0c...`)","Delete the stale lock entry and regenerate with `mise lock`","Never hand-paste bare digests; let mise generate blake3 checksums itself"],"exampleFix":"# before (mise.lock)\nchecksum = \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n# after\nchecksum = \"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"","handlingStrategy":"validation","validationCode":"# lint mise.lock checksums for algorithm prefixes before install\nyq '.tools[].lock_platforms[].checksum' mise.lock | grep -vE '^[a-z0-9]+:' && echo 'checksum missing algorithm prefix' || echo ok","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit checksum fields; run `mise lock` to regenerate","When pasting upstream digests, always prefix the algorithm (sha256:, blake3:)","Add a CI lint that mise.lock checksums match ^[a-z0-9]+:"],"tags":["checksum","lockfile","format-validation","github-backend"],"backgroundTag":"invalid-checksum-format","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}