[Reliability] Lock model downloads by canonical target#245
Open
fettpl wants to merge 5 commits into
Open
Conversation
fettpl
force-pushed
the
p1/issue-227-download-target-locking
branch
from
July 18, 2026 10:43
8ad367b to
86edca8
Compare
fettpl
marked this pull request as ready for review
July 18, 2026 10:44
Author
|
@0xSero The refreshed ready-for-review head |
fettpl
force-pushed
the
p1/issue-227-download-target-locking
branch
from
July 20, 2026 07:29
3210f33 to
0edd8bc
Compare
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.
Summary
Closes #227
Depends on #244. Its reviewed commit
3cdd3a6402308c1d7a25816205cdedd7e73688f6is an ancestor of this branch, and all six release-gating files remain byte-identical.Root cause: download runs were isolated only by random job ID. Two jobs resolving to the same destination could open the same
.partfile concurrently, mix bytes across revisions, race final renames, and release state belonging to a newer run. A writer error arriving immediately after a terminal reader result could also be missed before rename.Solution design:
.partfiles and HTTP Range resume behavior while preventing pause/resume handoff from opening a second writer.Validation
cd controller && bun test --coverage tests/downloads/download-manager.test.ts tests/downloads/download-target-reservations.test.ts tests/downloads/stream-backpressure.test.ts: passed, 25 tests and 119 assertions.download-manager.ts92.73% functions / 99.82% lines;download-target-reservations.ts100% / 100%;stream-backpressure.ts100% / 100%;download-routes.ts71.43% / 82.56%.cd controller && bun test tests: passed, the complete available controller suite (25 tests, 119 assertions).npm run check: passed, including contracts, repository structure, frontend quality and production build, and controller type checks, lint, dependency/dead-code/duplicate checks, and standards audit.git diff --check origin/main...HEAD: passed.npm --prefix frontend run desktop:dist -- --config.electronDist=<approved Electron archive>: passed./Applications/Local Studio.appreinstall: strict deep signature valid, bundle IDorg.local.studio.desktop, andGET /api/desktop-healthreturned 200 on loopback.0edd8bc2ffebf2d6a69bae9c66f8f326de7513d3with no findings.maindefines neither a roottest:integrationscript nor a frontendtestscript, so no result is claimed for unavailable commands.UI changes
No visible UI changes. The inherited release-gating dependency touches frontend package/workflow files, so the required production desktop rebuild and canonical reinstall were still completed.
Risks / rollout notes