{"record":{"id":"dfbb3444c17b805c","repo":"Hmbown/CodeWhale","slug":"invalid-checksum-manifest-line-trimmed","errorCode":null,"errorMessage":"Invalid checksum manifest line: ${trimmed}","messagePattern":"Invalid checksum manifest line: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm/codewhale/scripts/install.js","lineNumber":983,"sourceCode":"async function fileExists(file) {\n  try {\n    const result = await stat(file);\n    return result.isFile();\n  } catch {\n    return false;\n  }\n}\n\nfunction parseChecksumManifest(text) {\n  const checksums = new Map();\n  for (const line of text.split(/\\r?\\n/)) {\n    const trimmed = line.trim();\n    if (!trimmed) {\n      continue;\n    }\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) {","sourceCodeStart":965,"sourceCodeEnd":1001,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/npm/codewhale/scripts/install.js#L965-L1001","documentation":"Error \"Invalid checksum manifest line: ${trimmed}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at npm/codewhale/scripts/install.js:983 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"}