Skip to content

v0.9.1: Post-Review Architecture Fixes

Choose a tag to compare

@fb0sh fb0sh released this 18 Jul 10:01

What's Changed

5 Architecture Fixes from Post-v0.9.0 Review

1. Fix silent progress loss in flush_to_db

  • runtime.rs: Track per-entry flush success; failed entries stay dirty and retry on next cycle
  • Previously: let _ = silently discarded DB write errors, then unconditionally marked all entries as flushed
  • Added integration test with real DB writes

2. Fix rate limiter blocking tokio executor

  • limiter.rs: Changed wait_n to async using tokio::time::sleep
  • Previously: std::thread::sleep blocked OS threads, starving the tokio executor
  • Locks are dropped before sleeping to avoid blocking other workers

3. Unify start/redownload download pipeline

  • download_manager.rs: Extracted shared execute_download(DownloadSpec) method
  • Both start_download and redownload_download now delegate to it
  • Bug fix: redownload now uses probe_service::probe_with_fallback (was bypassing it)

4. Unify DownloadStatus serialization tests

  • types.rs: Added JSON roundtrip test for all DownloadStatus variants
  • db.rs: Added DB roundtrip test for all variants + parse_status edge case tests

5. Verify error event logging

  • Errors already flow through handle_event → Logger → Log Dialog
  • Confirmed the logging architecture is sound

Full Changelog: v0.9.0...v0.9.1