Repository navigation
fix(torrent): log refusals of trackers Ketch adds at debug - #618
Merged
Merged
Conversation
Ketch adds the trackers of its daily tracker lists (and the user's extra trackers) to every public torrent, and many of them serve only some torrents: every download warned "info hash is not authorized with this tracker" or "Require passkey or authkey" from trackers the torrent never named, which the CLI prints by default. Refusals and warnings of added trackers are now logged at debug; the torrent's own trackers still warn.
Codex Review SummaryThis 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. |
Contributor
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.
Found while downloading public torrents (Debian, Arch, Internet Archive, Sintel) with the CLI. Every download printed warnings like these:
These are trackers from the daily tracker lists that Ketch adds to every public torrent. Many of them only serve some torrents, so they refuse most hashes. The torrent never named them, and the user can't do anything about them, but the CLI shows WARN by default (as do the apps' logs).
What changes
TrackerTiershas a secondary constructor takingadded. The engine passesadded = truefor the trackers it adds (TorrentConfig.additionalTrackersand tracker lists) in v1, v2/hybrid sessions and magnet lookups. Their refusals and warnings are logged at debug; the torrent's own trackers still warn. A secondary constructor keeps the primary(tiers, announce)signature, so the trailing-lambda and positional test call sites are unchanged.Verification
ketch --list-fileson the Arch Linux magnet from this branch: no WARN lines. Before: both warnings above.TrackerMessageTest.refusalsAndWarningsOfAddedTrackersAreNoWarnings: an added tracker's refusal and warning log nothing at warn, while the torrent's own tracker logs both../gradlew :library:torrent:jvmTestpasses.