{"record":{"id":"d8f2c6dc0938c234","repo":"Hmbown/CodeWhale","slug":"checksum-mismatch-for-assetname-expected-exp","errorCode":null,"errorMessage":"Checksum mismatch for ${assetName}: expected ${expected}, got ${actual}","messagePattern":"Checksum mismatch for (.+?): expected (.+?), got (.+?)","errorType":"exception","errorClass":"NonRetryableError","httpStatus":null,"severity":"error","filePath":"npm/codewhale/scripts/install.js","lineNumber":1004,"sourceCode":"  }\n  return checksums;\n}\n\nasync function sha256File(filePath) {\n  const content = await readFile(filePath);\n  return crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n}\n\nasync function verifyChecksum(filePath, assetName, checksums) {\n  const expected = checksums.get(assetName);\n  if (!expected) {\n    throw new NonRetryableError(`Checksum manifest is missing ${assetName}`);\n  }\n  const actual = await sha256File(filePath);\n  if (actual !== expected) {\n    // Bytes are corrupted; another fetch is unlikely to help without a fix\n    // upstream. Mark non-retryable.\n    throw new NonRetryableError(\n      `Checksum mismatch for ${assetName}: expected ${expected}, got ${actual}`,\n    );\n  }\n}\n\nasync function checksumMatches(filePath, assetName, checksums) {\n  const expected = checksums.get(assetName);\n  if (!expected) {\n    throw new NonRetryableError(`Checksum manifest is missing ${assetName}`);\n  }\n  const actual = await sha256File(filePath);\n  return actual === expected;\n}\n\nasync function loadChecksums(version, repo, options = {}) {\n  return parseChecksumManifest(await downloadText(checksumManifestUrl(version, repo), options));\n}\n","sourceCodeStart":986,"sourceCodeEnd":1022,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/npm/codewhale/scripts/install.js#L986-L1022","documentation":"Error \"Checksum mismatch for ${assetName}: expected ${expected}, got ${actual}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at npm/codewhale/scripts/install.js:1004 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}