Skip to content

fix: preserve partial download integrity - #62

Merged
amanharshx merged 2 commits into
mainfrom
fix/partial-download-integrity
Jul 25, 2026
Merged

fix: preserve partial download integrity#62
amanharshx merged 2 commits into
mainfrom
fix/partial-download-integrity

Conversation

@amanharshx

Copy link
Copy Markdown
Owner

Summary

  • Prevent annotation/image mismatches after partial download failures.
  • Retry transient image download failures and report omitted records clearly.

Motivation

Expired or unavailable image URLs could produce successful ZIPs containing annotations for images missing from archive.

Key Changes

  • Filter image records before conversion while preserving labels-only mode.
  • Retry transport, body-read, 408, 429, and 5xx failures up to three attempts with bounded backoff.
  • Preserve SSRF validation, redirect blocking, concurrency limit, and response-size cap.
  • Report omitted annotations, missing URLs, and possible expired signed URLs.
  • Hard-fail when no requested images can be archived.
  • Testing: cargo test (89), cargo clippy --all-targets -- -D warnings, cargo fmt --check, bun run test (8), bun run build, and 20/20 normalized export fingerprints.
  • Risk: partial failures now intentionally remove affected images and annotations.
  • Sanity check: one failed download among two inputs -> expected one consistent image/annotation pair -> actual output contains only successful pair.

Drop annotations for images whose bytes are unavailable, and retry
transient failures without weakening download URL validation.
@github-actions github-actions Bot added frontend React/TypeScript UI changes backend Rust/Tauri changes labels Jul 25, 2026
@amanharshx amanharshx added the bug Something isn't working label Jul 25, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 89.63134% with 45 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src-tauri/src/downloader.rs 91.77% 25 Missing ⚠️
src-tauri/src/lib.rs 85.84% 16 Missing ⚠️
src/components/converter-screen.tsx 76.47% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@amanharshx
amanharshx merged commit c294fb9 into main Jul 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Rust/Tauri changes bug Something isn't working frontend React/TypeScript UI changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants