{"record":{"id":"ffeda0bef42686a6","repo":"Zackriya-Solutions/meetily","slug":"download-progress-exceeds-the-catalog-total","errorCode":null,"errorMessage":"Download progress exceeds the catalog total","messagePattern":"Download progress exceeds the catalog total","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":1050,"sourceCode":"                let chunk_bytes = chunk.len() as u64;\n                let next_artifact_bytes = artifact_bytes\n                    .checked_add(chunk_bytes)\n                    .ok_or_else(|| anyhow!(\"{} size overflow\", artifact.filename))?;\n                if next_artifact_bytes > artifact.exact_bytes {\n                    writer.flush().await.map_err(|error| {\n                        anyhow!(\"Failed to preserve {} after overlong response: {}\", artifact.filename, error)\n                    })?;\n                    return Err(anyhow!(\n                        \"{} response exceeds its exact {} byte size\",\n                        artifact.filename,\n                        artifact.exact_bytes\n                    ));\n                }\n                let next_confirmed_bytes = confirmed_bytes\n                    .checked_add(chunk_bytes)\n                    .ok_or_else(|| anyhow!(\"Progress overflow while downloading {}\", artifact.filename))?;\n                if next_confirmed_bytes > total_bytes {\n                    return Err(anyhow!(\"Download progress exceeds the catalog total\"));\n                }\n\n                writer\n                    .write_all(&chunk)\n                    .await\n                    .map_err(|error| anyhow!(\"Failed to write {}: {}\", artifact.filename, error))?;\n                artifact_bytes = next_artifact_bytes;\n                confirmed_bytes = next_confirmed_bytes;\n                streamed_bytes = streamed_bytes\n                    .checked_add(chunk_bytes)\n                    .ok_or_else(|| anyhow!(\"Streamed byte count overflow\"))?;\n                bytes_since_report = bytes_since_report\n                    .checked_add(chunk_bytes)\n                    .ok_or_else(|| anyhow!(\"Progress byte count overflow\"))?;\n\n                let progress = Self::in_flight_progress(confirmed_bytes, total_bytes, 0.0);\n                let elapsed = last_report.elapsed();\n                if progress.percent > last_percent","sourceCodeStart":1032,"sourceCodeEnd":1068,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L1032-L1068","documentation":"During a Parakeet model artifact download, the engine accumulates confirmed bytes per chunk. Before accepting each chunk it checks `next_confirmed_bytes > total_bytes`, where total_bytes comes from the download catalog's declared size for the artifact. This error means the HTTP body delivered more bytes than the catalog declared, so the download is aborted to prevent writing a corrupt/oversized file and to keep progress reporting sane.","triggerScenarios":"Streaming a model artifact whose response body is longer than the artifact's declared total (e.g. total_bytes derived from the catalog/Content-Length) — the chunk loop in parakeet_engine.rs confirms bytes via checked_add and aborts as soon as the running total would exceed total_bytes.","commonSituations":"Server/proxy returns a different (larger) body than Content-Length (e.g. an HTML error page injected mid-stream, compressed responses counted differently, redirect bodies); a stale catalog entry pointing at a replaced model file; a mirror serving a different artifact version than the manifest describes.","solutions":["Refresh/redownload the model catalog so total_bytes matches what the server actually serves (stale manifest is the most common cause).","Check that no proxy or interceptor (corporate proxy, VPN, antivirus HTTPS scanning) is altering the response body or Content-Length.","Verify the URL in the catalog points to the exact artifact version; compare Content-Length on the URL with the manifest's exact_bytes via curl -I.","Retry the download; transient CDN corruption is possible but repeated failures indicate a catalog/server mismatch.","If you control the server, ensure it serves the file uncompressed and with a correct Content-Length header."],"exampleFix":"// before: catalog declares stale size\n// { \"filename\": \"parakeet-int8.onnx\", \"exact_bytes\": 812345678 }\n// after: re-sync catalog so exact_bytes matches the served artifact\n// { \"filename\": \"parakeet-int8.onnx\", \"exact_bytes\": 894512341 }","handlingStrategy":"validation","validationCode":"// Before starting a download, verify the server's declared size matches the catalog\nlet resp = reqwest::head(&artifact.url).await?;\nlet content_length = resp.content_length().unwrap_or(0);\nif content_length != artifact.exact_bytes {\n    return Err(format!(\"Catalog size {} != server size {} for {}\",\n        artifact.exact_bytes, content_length, artifact.filename));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate/refresh the model catalog whenever server-side artifacts are updated.","Validate Content-Length against exact_bytes before downloading, not after.","Bypass/inspect proxies that may rewrite response bodies.","Pin artifact URLs to exact versions with checksums in the manifest."],"tags":["download","model-management","parakeet","http","integrity"],"backgroundTag":"internal-invariant-violation","analyzedSha":"a2cb62e827da7ef59f65064c97233efb2313878e","analyzedAt":"2026-09-12T11:12:14.152Z","contentChangedAt":"2026-09-12T11:12:14.152Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}