Repository navigation
feat(updates): Parallel File Downloads — v1.6.0 (Issue #128) + audit fixes - #4169
Merged
Merged
Conversation
- Add ParallelDownloader class (include/updates/parallel_downloader.h + src/updates/parallel_downloader.cpp) with: * Configurable concurrency (setConcurrency / worker thread pool) * Bandwidth throttling (setBandwidthLimit / token-bucket) * Priority queue for critical files (DownloadTask::priority / max-heap) * Per-file resume support (enable_resume / HTTP Range) * Hash verification (SHA-256 via OpenSSL EVP) * Retry with exponential back-off (DownloadTask::max_retries) * Injected FetchFn for full testability * Progress callback (thread-safe, per-file status) - Add 25 focused tests in tests/test_parallel_file_downloads.cpp covering all 4 acceptance criteria - Register parallel_downloader.cpp in cmake/CMakeLists.txt and cmake/ModularBuild.cmake - Add ParallelFileDownloadsFocusedTests CTest target in tests/CMakeLists.txt - Add .github/workflows/parallel-file-downloads-ci.yml CI workflow - Update src/updates/FUTURE_ENHANCEMENTS.md (mark as Implemented) - Update src/updates/ROADMAP.md (Phase 5 + production checklist) Co-authored-by: makr-code <[email protected]>
- Clarify number of standalone test targets (9 not 8) - Make test count exact (185 not 185+) - Move parallel-downloads bullet to correct position in Completed list Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] Implement parallel file downloads for updates
feat(updates): Parallel File Downloads — v1.6.0 (Issue #128)
Mar 13, 2026
makr-code
marked this pull request as ready for review
March 13, 2026 09:03
- Fix TOCTOU race in token-bucket (refillTokens + consumeBandwidth now use compare_exchange_weak/strong for atomic read-modify-write) - Remove unused #include <future> - Fix header docstring to accurately describe adaptive 10ms refill interval - Correct test count 25→29 in ROADMAP.md, FUTURE_ENHANCEMENTS.md - Deduplicate ROADMAP.md Completed entries; correct source file count 14→15 - Update Current Status line to mention parallel downloads" Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
feat(updates): Parallel File Downloads — v1.6.0 (Issue #128)
feat(updates): Parallel File Downloads — v1.6.0 (Issue #128) + audit fixes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements
ParallelDownloaderfor the updates domain, delivering all four v1.6.0 ACs. A subsequent audit pass fixed a thread-safety bug, a stale docstring, an unused include, and documentation inconsistencies.Description
New:
ParallelDownloader(include/updates/parallel_downloader.h+src/updates/parallel_downloader.cpp)setConcurrency(n)→ worker thread pool; default =hardware_concurrency()setBandwidthLimit(bps)→ token-bucket, CAS-atomic refill+consumeDownloadTask::priority→std::priority_queuemax-heap; highest firstenable_resume=true→ reads existing file size, passesresume_offsettoFetchFnAdditional: SHA-256 integrity verification (corrupt files auto-removed), exponential back-off retry, injectable
FetchFnfor full testability without network, per-file progress callback,DownloadBatchStats.Audit fixes (same PR)
refillTokens()andconsumeBandwidth()used non-atomic load-compute-store sequences on the sharedtoken_bucket_— multiple concurrent workers could race, causinguint64_tunderflow (wraparound to ~18 EB). Fixed withcompare_exchange_weak/strong.#include <future>.Infrastructure
parallel_downloader.cppregistered incmake/CMakeLists.txt+cmake/ModularBuild.cmakeParallelFileDownloadsFocusedTestsCTest target intests/CMakeLists.txt.github/workflows/parallel-file-downloads-ci.ymlType of Change
Testing
tests/test_parallel_file_downloads.cppcovering all 4 ACs, hash verification, retry exhaustion, partial-failure isolation, and progress callbacks; all network-free via injectedFetchFn📚 Research & Knowledge (wenn applicable)
/docs/research/angelegt?/docs/research/implementation_influence/eingetragen?Relevante Quellen:
Checklist
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.