mirror of
https://github.com/nimbold/Firelink.git
synced 2026-07-26 12:08:27 +00:00
a92d5689d7
Add aria2 control epochs so delayed resume workers cannot unpause a transfer after a newer pause, remove, or reconfigure command wins. Thread captured cookies into yt-dlp media runs, sanitize yt-dlp config values, reject malformed media headers, and preserve resumable media artifacts across transient retry backoff. Cover the new queue epoch and media helper behavior with focused regression tests.
Headless Download Engine Tests
Run the full Rust suite:
cd src-tauri
cargo test --all-targets
Run only the async download integration harness with deterministic serial performance measurements and visible test output:
cd src-tauri
RUST_BACKTRACE=1 cargo test --test download_engine -- --test-threads=1 --nocapture
The harness binds an ephemeral loopback port and requires no GUI, external network access, or bundled media binaries. It validates:
- aggregation of many streamed HTTP body chunks;
- pause and ranged resume through
DownloadCoordinator; - cancellation and partial-file cleanup;
- SHA-256 integrity after resume;
- retry recovery from transient HTTP failures;
- terminal error reporting after the retry budget is exhausted;
- a five-second local transfer performance budget for a 3 MiB fixture.