feat(tracker-client): add unified tracker_client binary#1777
Merged
josecelano merged 6 commits intoMay 13, 2026
Merged
Conversation
…and-port approach)
Merge http_tracker_client, udp_tracker_client, and tracker_checker into a single tracker_client binary with explicit protocol subcommands: tracker_client http announce|scrape <url> <infohash> tracker_client udp announce|scrape <url> <infohash> tracker_client check [-- <checker-args>] Implementation approach: progressive copy-and-port. Command handlers are independent copies in console/tracker-client/src/console/clients/unified/. The old binaries are frozen and never called from the new code. Legacy binaries now print a deprecation notice on startup directing users to tracker_client. They will be removed no earlier than ~1 year after tracker_client ships (tracked in torrust#1775). Changes: - Add tracker_client binary entrypoint (bin/tracker_client.rs) - Add unified/{app,http,udp,check}.rs with copied command handlers - Add --format=json (default) / --format=text flag across all subcommands - Port tracker_checker integration tests to tracker_client check -- - Add tracker_client integration tests (help, HTTP error, UDP error) - Add deprecation eprintln! to http_tracker_client, udp_tracker_client, tracker_checker - Update skills and docs to reference tracker_client commands - Update issue spec torrust#1771: all tasks and AC marked DONE with evidence All automated gates pass: linter all, 46 unit tests, 13 integration tests. Manual verification M1-M7 against local tracker all exit 0. Closes torrust#1771
… in progress log
There was a problem hiding this comment.
Pull request overview
This PR introduces a new unified tracker_client CLI binary for the console/tracker-client crate, consolidating HTTP, UDP, and checker workflows under explicit protocol subcommands while leaving the legacy binaries in place with deprecation warnings.
Changes:
- Added a new
tracker_clientbinary withhttp,udp, andchecksubcommands implemented underconsole::clients::unified. - Ported/added integration tests to exercise
tracker_client(includingcheck) and updated docs/skills to reference the unified CLI. - Added startup deprecation warnings to
http_tracker_client,udp_tracker_client, andtracker_checker.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/issues/open/1771-merge-clients-into-unified-tracker-client-cli.md | Marks the issue spec as done; adds implementation strategy and design notes. |
| console/tracker-client/tests/tracker_client.rs | New integration tests for tracker_client help and basic error paths. |
| console/tracker-client/tests/tracker_checker.rs | Ports checker integration tests to tracker_client check -- …. |
| console/tracker-client/tests/tracker_checker/configuration.rs | Updates test harness to use tracker_client check. |
| console/tracker-client/tests/tracker_checker/monitor.rs | Updates monitor test to invoke tracker_client check monitor …. |
| console/tracker-client/src/console/clients/unified/mod.rs | Declares unified module and documents migration intent. |
| console/tracker-client/src/console/clients/unified/app.rs | Defines unified top-level clap app and dispatch to http/udp/check handlers. |
| console/tracker-client/src/console/clients/unified/http.rs | New HTTP announce/scrape handlers + small unit tests. |
| console/tracker-client/src/console/clients/unified/udp.rs | New UDP announce/scrape handlers wired to existing UDP client helpers. |
| console/tracker-client/src/console/clients/unified/check.rs | New check implementation that reuses checker library modules. |
| console/tracker-client/src/console/clients/mod.rs | Exposes the unified module alongside legacy modules. |
| console/tracker-client/src/bin/tracker_client.rs | New unified binary entrypoint and exit/error handling. |
| console/tracker-client/src/bin/http_tracker_client.rs | Adds deprecation warning on startup. |
| console/tracker-client/src/bin/udp_tracker_client.rs | Adds deprecation warning on startup. |
| console/tracker-client/src/bin/tracker_checker.rs | Adds deprecation warning on startup. |
| console/tracker-client/docs/features/json-request-input/README.md | Updates examples/references to the unified CLI naming. |
| .github/skills/dev/testing/public-trackers-for-testing/SKILL.md | Updates examples to use tracker_client http/udp … and new format names. |
| .github/skills/dev/environment-setup/run-tracker-locally/SKILL.md | Updates local testing commands to use tracker_client http/udp …. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1777 +/- ##
===========================================
- Coverage 79.01% 78.23% -0.79%
===========================================
Files 371 376 +5
Lines 27928 28361 +433
Branches 27928 28361 +433
===========================================
+ Hits 22068 22188 +120
- Misses 5555 5859 +304
- Partials 305 314 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
ACK 3e47c36 |
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.
Closes #1771
Summary
Merges the three separate tracker client binaries (
http_tracker_client,udp_tracker_client,tracker_checker) into a singletracker_clientbinary with explicit protocol subcommands.Changes
New:
tracker_clientbinaryA single entry point replacing the three legacy binaries:
--format=json(default) /--format=text(pretty-printed JSON) for all subcommandschecker::checks,checker::monitor)Deprecation warnings
Each legacy binary (
http_tracker_client,udp_tracker_client,tracker_checker) now printsa startup warning on stderr directing users to
tracker_client. The old binaries are otherwisefrozen — no new features, no modifications.
Tests
tracker_checkerintegration tests to invoketracker_client check --tracker_clientintegration tests: help output, HTTP error path (exit 1), UDP error path (exit 2)Docs and skills
public-trackers-for-testingandrun-tracker-locallyskillsdocs/features/json-request-input/README.mdDesign decisions
http_tracker_client,udp_tracker_client,tracker_checker#1775unified/module structure: flat files, no per-action nesting — deferred to Remove legacy binaries:http_tracker_client,udp_tracker_client,tracker_checker#1775 cleanupManual verification
All 7 local-tracker scenarios (HTTP announce/scrape, UDP announce/scrape, checker,
--format=text)pass with exit 0. Evidence recorded in the issue spec.
Spec
docs/issues/open/1771-merge-clients-into-unified-tracker-client-cli.md