feat(tracker-client): add monitor udp command to tracker_checker#1767
Merged
josecelano merged 21 commits intoMay 12, 2026
Merged
Conversation
- Fix timeout_percent sample value: 33.3 -> 33 (integer, matches implementation) - Add --info-hash row to CLI Options table - Tick all completed Goals and Workflow Checkpoints - Add unit test: all latency fields null when every probe times out - Update refactor plan to mark items 1-4 as done
There was a problem hiding this comment.
Pull request overview
Adds a new tracker_checker monitor udp subcommand to the tracker client, emitting per-probe NDJSON events on stderr and a final JSON summary on stdout, and updates planning/docs around refactor plans and the Issue #1178 spec.
Changes:
- Implement
monitor udpcommand (CLI parsing + monitoring loop + JSON output + stats). - Refactor
tracker_checkerintegration tests into separate configuration vs monitor modules. - Add refactor-plan documentation structure (template, lifecycle READMEs, skill doc) and update Issue #1178 spec/refactor plan docs.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| project-words.txt | Adds millis to the project word list. |
| docs/templates/REFACTOR-PLAN.md | Introduces a refactor-plan document template. |
| docs/refactor-plans/open/README.md | Documents lifecycle/usage for open refactor plans. |
| docs/refactor-plans/drafts/README.md | Documents lifecycle/usage for draft refactor plans. |
| docs/refactor-plans/closed/README.md | Documents lifecycle/usage for closed refactor plans. |
| docs/refactor-plans/closed/agent-docs-refactor-plan.md | Adds a closed refactor plan documenting prior agent-doc changes. |
| docs/refactor-plans/closed/1178-monitor-udp-post-implementation-improvements.md | Captures post-implementation improvements and explicit deferrals for monitor-udp work. |
| docs/issues/open/1178-tracker-checker-udp-add-monitor-uptime-command.md | Updates the Issue #1178 spec with final behavior notes, options, verification, and risks. |
| console/tracker-client/tests/tracker_checker/monitor.rs | Adds integration test coverage for monitor udp output/exit code (timeout-only sink). |
| console/tracker-client/tests/tracker_checker/configuration.rs | Moves configuration error contract tests into a focused module. |
| console/tracker-client/tests/tracker_checker.rs | Reorganizes integration tests into module files via #[path = ...]. |
| console/tracker-client/src/console/clients/checker/monitor/udp.rs | Implements the UDP monitor runtime, stats aggregation, and JSON emission. |
| console/tracker-client/src/console/clients/checker/monitor/mod.rs | Exposes the new monitor module. |
| console/tracker-client/src/console/clients/checker/mod.rs | Wires monitor module into checker client module tree. |
| console/tracker-client/src/console/clients/checker/app.rs | Adds clap subcommand parsing for monitor udp and dispatches to monitor runner. |
| .github/skills/dev/planning/create-refactor-plan/SKILL.md | Adds a planning skill describing how to write and manage refactor plans. |
💡 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 #1767 +/- ##
===========================================
- Coverage 79.04% 79.00% -0.05%
===========================================
Files 370 371 +1
Lines 27682 27928 +246
Branches 27682 27928 +246
===========================================
+ Hits 21882 22065 +183
- Misses 5517 5568 +51
- Partials 283 295 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
ACK f76c733 |
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.
Summary
tracker_checker monitor udpcommand in tracker client--url,--interval,--timeout,--duration, and--info-hashtotal,timeouts,timeout_percent, latency fields)tracker_checkerintegration tests into two concern modules: configuration and monitorValidation
cargo test -p torrust-tracker-client --test tracker_checkerlinter allNotes
Usage Example
The command emits per-probe NDJSON events to stderr and a final JSON summary to stdout.
Example Output
{ "udp_trackers": [ { "url": "udp://udp1.torrust-tracker-demo.com:6969/announce", "status": { "code": "ok", "message": "monitor completed", "stats": { "total": 6, "timeouts": 0, "timeout_percent": 0, "min_ms": 128, "max_ms": 145, "average_ms": 136, "last_ms": 137 } } } ] }