Skip to content

feat(torrent): check a torrent's files again and download what is missing - #670

Merged
linroid merged 3 commits into
mainfrom
feat/torrent-recheck
Nov 14, 2026
Merged

linroid merged 3 commits into
mainfrom
feat/torrent-recheck

Conversation

@linroid

@linroid linroid commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Stacked on #669 (trackers); only the last two commits belong to this PR.

What

Implements the reserved recheck capability, for the "Product controls" and "Storage" rows of #162. A finished torrent was never checked again by itself, so files edited, restored from a backup or damaged stayed "completed".

  • API: TorrentController.recheck(taskId). Every start of a torrent already checks its files, so the command acts by state: a completed task stops its seeder (a run would take it over unchecked) and runs again from what it has, downloads what is missing or wrong, completes anew and seeds again if it was meant to; a downloading task starts its check over; paused, queued and failed ones are left to their next start; a canceled one is invalid_state.
  • Core: SourceHost.reopen(task) queues a completed task as a resume under its control lock.
  • Server and remote: POST /api/torrents/{id}/recheck answers the snapshot; the remote controller fails closed without the capability.
  • Apps: Check files in a finished torrent's menu, translated in every language.

Snapshots

New menu entry, so there is no before.

Light Dark

Testing

  • TorrentSeedingControlTest against a real engine and a loopback seeder: a completed torrent with one corrupted and one deleted file downloads them again and completes; a seeding torrent is checked by a session of its own and seeds again.
  • KetchTorrentControllerTest (each state, unknown and unsupported), TorrentRoutesTest, RemoteTorrentControllerTest, RowContentTest; localization and hard-coded text checks.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T04:39:26.123100Z b64819b PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Nov 14, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b64819bd12

ℹ️ 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".

Base automatically changed from feat/torrent-trackers to main November 14, 2026 04:55
@linroid
linroid force-pushed the feat/torrent-recheck branch from 8cef31d to 42e296d Compare November 14, 2026 04:55
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

 2 284 files  ± 0   2 312 suites  ±0   57m 40s ⏱️ + 1m 6s
16 198 tests +25  15 915 ✅ +24  283 💤 +1  0 ❌ ±0 
19 689 runs  +39  19 406 ✅ +38  283 💤 +1  0 ❌ ±0 

Results for commit 42e296d. ± Comparison against base commit 707f0ca.

♻️ This comment has been updated with latest results.

@linroid
linroid merged commit d1a48f3 into main Nov 14, 2026
24 of 27 checks passed
@linroid
linroid deleted the feat/torrent-recheck branch November 14, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant