Repository navigation
feat(torrent): download chosen files before the others - #673
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c51f564373
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c51f564 to
02fbdec
Compare
02fbdec to
0c10419
Compare
0c10419 to
010e5cd
Compare
Test Results 2 298 files 2 326 suites 58m 46s ⏱️ For more details on these failures, see this check. Results for commit 0d67080. ♻️ This comment has been updated with latest results. |
010e5cd to
0d67080
Compare
0d67080 to
2d758e8
Compare
Stacked on #672 (files in place); only the last commit belongs to this PR.
What
The "Scheduling: per-file priorities" row of #162.
TorrentController.priorityFiles(taskId)andsetPriorityFiles(taskId, fileIds)name the files a task downloads before its others (capabilityfile-priority);TorrentFileEntry.prioritymarks them in file pages. An ID the torrent does not list isinvalid_input. It orders the download and never selects a file.GETandPUT /api/torrents/{id}/priority; the remote controller fails closed without the capability.Snapshots
New control, so there is no before. Episodes 10 and 11 are set to download first.
Testing
TorrentPieceSchedulerTest(priority pieces open before a rarer one, then the usual order),TorrentV2RarityPickerTest,KetchTorrentControllerTest,TorrentRoutesTest,RemoteTorrentControllerTest,FileSelectionModelTest(toggling, and a refusal undone). Core, torrent, remote, server, app and CLI suites pass on this branch, with iOS and WasmJs compiles.Not covered: a transfer-level test that a real swarm delivers the chosen file first; the pickers are tested in isolation.