Zackriya-Solutions/meetily · error · anyhow::Error

Progress overflow while downloading {}

Error message

Progress overflow while downloading {}

What it means

The global download progress counter (confirmed_bytes accumulated across all catalog artifacts) overflowed u64 via checked_add while downloading a model. Like the per-artifact overflow, this is an impossible condition in correct operation and signals corrupted progress-accounting state.

Source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:1048

                };

                let chunk_bytes = chunk.len() as u64;
                let next_artifact_bytes = artifact_bytes
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("{} size overflow", artifact.filename))?;
                if next_artifact_bytes > artifact.exact_bytes {
                    writer.flush().await.map_err(|error| {
                        anyhow!("Failed to preserve {} after overlong response: {}", artifact.filename, error)
                    })?;
                    return Err(anyhow!(
                        "{} response exceeds its exact {} byte size",
                        artifact.filename,
                        artifact.exact_bytes
                    ));
                }
                let next_confirmed_bytes = confirmed_bytes
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Progress overflow while downloading {}", artifact.filename))?;
                if next_confirmed_bytes > total_bytes {
                    return Err(anyhow!("Download progress exceeds the catalog total"));
                }

                writer
                    .write_all(&chunk)
                    .await
                    .map_err(|error| anyhow!("Failed to write {}: {}", artifact.filename, error))?;
                artifact_bytes = next_artifact_bytes;
                confirmed_bytes = next_confirmed_bytes;
                streamed_bytes = streamed_bytes
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Streamed byte count overflow"))?;
                bytes_since_report = bytes_since_report
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Progress byte count overflow"))?;

                let progress = Self::in_flight_progress(confirmed_bytes, total_bytes, 0.0);

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Reset download progress state (delete partial files/progress metadata) and restart the download
  2. Verify catalog total_bytes equals the sum of all artifact exact_bytes values
  3. Restart the app to clear in-memory counters and retry
  4. Report as a bug — internal accounting invariant was violated

Example fix

// before
let total_bytes: u64 = artifacts.iter().map(|a| a.exact_bytes).sum(); // unvalidated
// after
let total: u64 = artifacts.iter().map(|a| a.exact_bytes)
    .try_fold(0u64, u64::checked_add)
    .ok_or_else(|| anyhow!("catalog total_bytes overflow"))?;
anyhow::ensure!(total == catalog.total_bytes, "catalog total mismatch");
Defensive patterns

Strategy: validation

Validate before calling

// validate catalog totals before downloading
let sum: Option<u64> = catalog.artifacts.iter().map(|a| a.exact_bytes).try_fold(0u64, u64::checked_add);
anyhow::ensure!(sum == Some(catalog.total_bytes), "catalog total_bytes does not match artifact sizes");

Try / catch

match result {
    Err(e) if e.to_string().contains("Progress overflow") ||
              e.to_string().contains("progress exceeds the catalog total") => {
        clear_progress_state();
        restart_download_from_scratch()
    }
    other => other,
}

Prevention

When it happens

Trigger: confirmed_bytes, summed across all artifact downloads in the loop at parakeet_engine.rs:1046-1048, is corrupted (e.g. initialized from a bogus catalog total_bytes or resumed with wrong persisted progress) causing checked_add to wrap; the companion check also fails when next_confirmed_bytes > total_bytes.

Common situations: Corrupted persisted download-progress state on resume; catalog total_bytes miscomputed (smaller than the sum of artifact sizes) triggering the sibling 'progress exceeds catalog total' error; bug in progress aggregation code.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12). Data as JSON: /api/errors/9b8fa73b13f66d11. Report an issue: GitHub.