{"record":{"id":"a36f52f99bde7b07","repo":"dbt-labs/dbt-core","slug":"lineno-expected-64-char-hex-sha256-got","errorCode":null,"errorMessage":"{}:{lineno}: expected 64-char hex sha256, got {:?}","messagePattern":"(.+?):(.+?): expected 64-char hex sha256, got (.+?)","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"crates/dbt-ci/src/homebrew/render.rs","lineNumber":189,"sourceCode":"    path: &Path,\n    prefix: &str,\n    version: &str,\n) -> Result<Vec<Tarball>> {\n    let text = fs::read_to_string(path).with_context(|| format!(\"read {}\", path.display()))?;\n    let leader = format!(\"{prefix}{version}-\");\n    let mut out = Vec::new();\n    for (raw, lineno) in text.lines().zip(1u32..) {\n        let line = raw.trim();\n        if line.is_empty() || line.starts_with('#') {\n            continue;\n        }\n        // `<hex>  <filename>` — split on first whitespace run.\n        let mut parts = line.splitn(2, char::is_whitespace);\n        let (Some(sha), Some(rest)) = (parts.next(), parts.next()) else {\n            bail!(\"{}:{lineno}: malformed line {:?}\", path.display(), raw);\n        };\n        if sha.len() != 64 || !sha.chars().all(|c| c.is_ascii_hexdigit()) {\n            bail!(\n                \"{}:{lineno}: expected 64-char hex sha256, got {:?}\",\n                path.display(),\n                sha,\n            );\n        }\n        // `sha256sum -b` prepends a single `*` to the filename. Some\n        // implementations leave extra whitespace before the name. Strip both.\n        let trimmed = rest.trim_start();\n        let filename = trimmed.strip_prefix('*').unwrap_or(trimmed);\n        let Some(after_leader) = filename.strip_prefix(&leader) else {\n            continue;\n        };\n        let Some(target_triple) = after_leader.strip_suffix(\".tar.gz\") else {\n            continue;\n        };\n        out.push(Tarball {\n            target_triple: target_triple.to_string(),\n            filename: filename.to_string(),","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-ci/src/homebrew/render.rs#L171-L207","documentation":"collect_tarballs_from_sha256sums validation failure: the first whitespace-delimited token on the line is not a 64-character hexadecimal sha256 digest, so the checksum cannot be verified or embedded in the formula. Usually a truncated, wrapped, or hand-typed checksum line.","triggerScenarios":"Thrown at crates/dbt-ci/src/homebrew/render.rs:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the digest to the full 64-character lowercase hex string","Recompute the file with sha256sum and regenerate SHA256SUMS","Check the line wasn't wrapped or truncated by an editor"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}