feat: add rem_unregistered_confirm_minutes dwell timer - #1360
Open
bakerboy448 wants to merge 2 commits into
Open
feat: add rem_unregistered_confirm_minutes dwell timer#1360bakerboy448 wants to merge 2 commits into
bakerboy448 wants to merge 2 commits into
Conversation
process_torrent_issues only evaluated the last entry in a torrent's tracker list, so an "unregistered" tracker followed by another failing tracker (or a trailing DHT/PeX/LSD pseudo-entry) was never detected. Scan all failing trackers for an unregistered message instead of only the last one. Removal now acts only when no tracker is WORKING and none is still UPDATING / NOT_CONTACTED (inconclusive, self-resolving states), so a deletion is never decided on incomplete tracker state.
Add an optional dwell timer for rem_unregistered (default 0 = off). The first time a torrent is seen unregistered it is tagged with unregistered_tag plus a timestamp; it is only removed on a later run once it has stayed unregistered for that many minutes. Set it above your tracker announce interval to avoid removing a healthy torrent when a tracker transiently reports "unregistered"/"not found" during an outage. The flag is cleared as soon as the torrent recovers (a working tracker or no longer reporting unregistered). A marker whose timestamp is unparseable (e.g. hand-edited) is ignored, so a malformed tag can never short-circuit the dwell window into an immediate deletion. New settings: rem_unregistered_confirm_minutes (int, default 0) and unregistered_tag (default unregisteredCheck).
bakerboy448
changed the base branch from
fix/1358-unregistered-multi-tracker
to
develop
August 18, 2026 02:15
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.
Description
Adds an optional dwell timer to
rem_unregisteredthat protects against a tracker transiently reporting "unregistered"/"not found" during an outage — a healthy torrent should not be deleted on a single bad tracker response.Relates to #1358
What changed
rem_unregistered_confirm_minutes(int, default0= off, no behavior change by default). When > 0, the first time a torrent is seen unregistered it is taggedunregistered_tag(defaultunregisteredCheck) with a timestamp; it is only removed on a later run once it has stayed unregistered for at least that many minutes.unregistered_tag(defaultunregisteredCheck) for the marker name; added todefault_ignore_tags.Documented in
Config-Setup.mdandconfig.yml.sample. Note: dry-run never writes the flag, so it can't simulate the second-pass removal.Type of change
Checklist:
Tests
Added coverage in
tests/core/test_remove_unregistered.py: first-sighting flags (no delete), delete after dwell elapsed, waits when dwell not elapsed,confirm_minutes=0immediate delete, malformed-marker fail-safe, and flag clearing on recovery (both in-process and viaremove_previous_errors). Full suite green.