{"record":{"id":"3dc671e6d73d9ec7","repo":"Hmbown/CodeWhale","slug":"checksum-manifest-is-missing-assetname","errorCode":null,"errorMessage":"Checksum manifest is missing ${assetName}","messagePattern":"Checksum manifest is missing (.+?)","errorType":"exception","errorClass":"NonRetryableError","httpStatus":null,"severity":"error","filePath":"npm/codewhale/scripts/install.js","lineNumber":998,"sourceCode":"    }\n    const match = trimmed.match(/^([a-fA-F0-9]{64})\\s+\\*?(.+)$/);\n    if (!match) {\n      throw new Error(`Invalid checksum manifest line: ${trimmed}`);\n    }\n    checksums.set(match[2], match[1].toLowerCase());\n  }\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;","sourceCodeStart":980,"sourceCodeEnd":1016,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/npm/codewhale/scripts/install.js#L980-L1016","documentation":"Error \"Checksum manifest is missing ${assetName}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at npm/codewhale/scripts/install.js:998 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"}