Skip to content

feat(tracker-client): add UDP response format option and testing skill links#1756

Merged
josecelano merged 3 commits into
torrust:developfrom
josecelano:1563-udp-tracker-client-format-option
May 11, 2026
Merged

feat(tracker-client): add UDP response format option and testing skill links#1756
josecelano merged 3 commits into
torrust:developfrom
josecelano:1563-udp-tracker-client-format-option

Conversation

@josecelano

Copy link
Copy Markdown
Member

Summary

Implements issue #1563 for UDP tracker client response formatting and adds a new developer skill for public tracker testing guidance.

Changes included

  • Add --format option to UDP tracker client announce and scrape commands.
  • Support output values:
    • compact (default)
    • pretty
  • Make UDP JSON serialization format-aware.
  • Add serialization tests for compact vs pretty output.
  • Update issue spec progress and manual verification evidence.
  • Add new skill: .github/skills/dev/testing/public-trackers-for-testing/SKILL.md.
  • Add semantic skill-link: public-trackers-for-testing markers in:
    • console/tracker-client/src/console/clients/udp/app.rs
    • console/tracker-client/src/console/clients/http/app.rs

Verification

  • cargo check -p torrust-tracker-client
  • cargo test -p torrust-tracker-client
  • cargo test -p torrust-tracker-client console::clients::udp::responses::json::tests
  • linter all
  • cargo machete

Issue

@josecelano josecelano requested a review from a team as a code owner May 11, 2026 15:37
@josecelano josecelano self-assigned this May 11, 2026
@josecelano josecelano requested a review from Copilot May 11, 2026 15:41

Copilot AI 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.

Pull request overview

This PR implements issue #1563 by adding a --format option to the UDP tracker client so responses can be printed as either compact JSON (default) or pretty JSON, and adds a new developer skill document for choosing public trackers when manually testing tracker clients.

Changes:

  • Added --format {compact|pretty} to UDP announce and scrape commands and threaded it through to JSON serialization.
  • Made UDP JSON serialization format-aware and added unit tests covering compact vs pretty serialization.
  • Added a new “public trackers for testing” skill doc and linked it from the HTTP/UDP client module docs via skill-link markers.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/issues/open/1563-udp-tracker-client-add-option-show-response-pretty-json.md Updates spec checklist/progress and adds manual verification evidence for the new format option.
console/tracker-client/src/console/clients/udp/responses/json.rs Adds compact vs pretty JSON serialization support and unit tests.
console/tracker-client/src/console/clients/udp/app.rs Adds --format CLI option, passes it to serializer, updates examples, and adds a skill-link marker.
console/tracker-client/src/console/clients/http/app.rs Adds a skill-link marker.
.github/skills/dev/testing/public-trackers-for-testing/SKILL.md New skill doc listing public endpoints and copy/paste commands for manual testing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/issues/open/1563-udp-tracker-client-add-option-show-response-pretty-json.md Outdated
Comment thread .github/skills/dev/testing/public-trackers-for-testing/SKILL.md
@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.40%. Comparing base (8421d71) to head (dc200b8).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...r-client/src/console/clients/udp/responses/json.rs 91.30% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1756      +/-   ##
===========================================
+ Coverage    79.38%   79.40%   +0.02%     
===========================================
  Files          368      368              
  Lines        27140    27160      +20     
  Branches     27140    27160      +20     
===========================================
+ Hits         21544    21567      +23     
+ Misses        5315     5310       -5     
- Partials       281      283       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano

Copy link
Copy Markdown
Member Author

ACK dc200b8

@josecelano josecelano merged commit ffc7486 into torrust:develop May 11, 2026
13 checks passed
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.

UDP Tracker client: Add option to show response in pretty JSON

2 participants