{"record":{"id":"5fc89bf41c7b2f48","repo":"tinyhumansai/openhuman","slug":"sha-256-mismatch-for-expected-expected-got","errorCode":null,"errorMessage":"SHA-256 mismatch for {} (expected {expected}, got {actual_hex})","messagePattern":"SHA-256 mismatch for (.+?) \\(expected (.+?), got (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/runtime/node/downloader.rs","lineNumber":232,"sourceCode":"            error = %err,\n            \"[node_runtime::downloader] streaming failed — removing partial archive\"\n        );\n        let _ = tokio::fs::remove_file(target_path).await;\n        return Err(err);\n    }\n\n    let actual_hex = hex::encode(hasher.finalize());\n    let expected = expected_sha256.trim().to_ascii_lowercase();\n\n    if actual_hex != expected {\n        tracing::error!(\n            expected = %expected,\n            actual = %actual_hex,\n            target = %target_path.display(),\n            \"[node_runtime::downloader] SHA-256 mismatch — deleting partial archive\"\n        );\n        let _ = tokio::fs::remove_file(target_path).await;\n        bail!(\n            \"SHA-256 mismatch for {} (expected {expected}, got {actual_hex})\",\n            dist.archive_name\n        );\n    }\n\n    tracing::info!(\n        target = %target_path.display(),\n        bytes = written,\n        total = ?total_bytes,\n        \"[node_runtime::downloader] download complete, hash verified\"\n    );\n    Ok(())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/runtime/node/downloader.rs#L214-L250","documentation":"Streaming hash of the downloaded Node archive does not match the pinned expected SHA-256 — a truncated/corrupted transfer or a compromised mirror. The partial archive is deleted before the error propagates, so the target path is clean for a re-attempt.","triggerScenarios":"Thrown at src/openhuman/runtime/node/downloader.rs:232 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the download — transient truncation is the common cause","Check for a proxy, captive portal or flaky link mangling large binaries","If it persists, verify the pinned digest against the upstream release manifest to rule out a re-cut release"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}