{"record":{"id":"e499fccfb36f9bb2","repo":"BoundaryML/baml","slug":"checksum-for-s-not-found-within-file-s","errorCode":null,"errorMessage":"checksum for '%s' not found within file %s","messagePattern":"checksum for '(.+?)' not found within file (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"engine/language_client_go/baml_go/lib_common.go","lineNumber":619,"sourceCode":"\t\t\tchecksum, filenameInLine := parts[0], strings.TrimPrefix(parts[1], \"*\")\n\t\t\tif filenameInLine == targetFilename {\n\t\t\t\tif len(checksum) == 64 && isHex(checksum) {\n\t\t\t\t\tlogger.Debug(\"Found matching checksum in file\", \"filename\", targetFilename, \"checksum\", checksum)\n\t\t\t\t\treturn checksum, nil\n\t\t\t\t}\n\t\t\t\tlogger.Warn(\"Invalid checksum format found in checksum file\",\n\t\t\t\t\t\"url\", checksumURL,\n\t\t\t\t\t\"filename\", targetFilename,\n\t\t\t\t\t\"found_checksum\", checksum)\n\t\t\t\treturn \"\", fmt.Errorf(\"invalid checksum format '%s' for %s in %s\", checksum, targetFilename, checksumURL)\n\t\t\t}\n\t\t}\n\t}\n\n\tlogger.Warn(\"Checksum for target file not found within checksum file\",\n\t\t\"url\", checksumURL,\n\t\t\"target_filename\", targetFilename)\n\treturn \"\", fmt.Errorf(\"checksum for '%s' not found within file %s\", targetFilename, checksumURL)\n}\n\nfunc isHex(s string) bool {\n\tif len(s) == 0 {\n\t\treturn false\n\t}\n\tfor _, r := range s {\n\t\tif !((r >= '0' && r <= '9') || (r >= 'a' && r <= 'f') || (r >= 'A' && r <= 'F')) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}\n\nfunc copyFile(src, dst string) (err error) {\n\tlogger.Debug(\"Attempting to copy file\", \"source\", src, \"destination\", dst)\n\tsource, err := os.Open(src)\n\tif err != nil {","sourceCodeStart":601,"sourceCodeEnd":637,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/language_client_go/baml_go/lib_common.go#L601-L637","documentation":"The checksum file downloaded successfully, but no line contains a checksum entry for the target filename. downloadChecksum returns this plain error so the caller skips verification with a warning rather than failing the download.","triggerScenarios":"The checksum file lists other artifacts but not targetFilename — e.g. a multi-artifact checksum file missing the entry for this platform's library, or a filename mismatch (different naming convention or version suffix).","commonSituations":"Upstream release published checksums only for some platforms, filename changed between releases (renamed library) while checksum file uses the old name, or OS/arch string mismatch in the constructed target filename.","solutions":["Verify targetFilename matches exactly the name in the checksum file (case, platform suffix, version)","Check upstream release assets for the correct checksum file covering this platform","Regenerate the checksum file including all platform artifacts","Proceed with verification skipped — the caller warns and continues"],"exampleFix":"// before: name mismatch with checksum file entry\nname := \"libbaml.so\"\n// after: include platform/version as published upstream\nname := fmt.Sprintf(\"libbaml_%s_%s_%s.so\", version, runtime.GOOS, runtime.GOARCH)","handlingStrategy":"fallback","validationCode":"// verify the target name exists in the checksum file before downloading the lib\n// (fetch file, split lines, check any line's fields contain targetFilename)","typeGuard":null,"tryCatchPattern":"if _, err := downloadChecksum(url, name); err != nil && strings.Contains(err.Error(), \"not found within file\") {\n    logger.Warn(\"artifact missing from checksum file; verification skipped\")\n    // proceed with download, verification will be skipped\n}","preventionTips":["Ensure release pipelines generate checksums for every platform artifact","Keep artifact naming stable across releases or update checksum files in lockstep","Compare targetFilename construction (OS/arch/version) against published asset names","Treat missing entries as a release-engineering bug to report upstream"],"tags":["checksum","not-found","download","integrity"],"backgroundTag":"checksum-mismatch","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}