Repository navigation
docs(issues): [#2984] specify the tracker_client check UDP URL validation fix - #2985
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
What changed in this PR
Adds a folder-style issue specification and supporting manual reproduction evidence for #2984, documenting that tracker_client check panics on certain invalid UDP tracker URLs and proposing validation + fallible resolution.
Changes:
- Add issue spec with scope, acceptance criteria, test strategy, and implementation plan for UDP URL validation.
- Add manual verification evidence capturing reproduction steps and observed stderr/exit codes for invalid UDP tracker URLs.
| File | Description |
|---|---|
| docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md | Introduces the full issue specification (background, scope, plan, acceptance criteria, verification). |
| docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md | Documents a concrete reproduction run (commands, environment, observed results) for the panic behavior. |
Review effort: Lite
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at dfc93aec3731a7fb36c29a0db38d4650fa691b07. Recomputed from the bytes at this head, against the merge base 7bc30738a; git merge-tree against develop 4be22ee66 writes a clean tree with no conflicts, and develop has not touched the tracker client, the ADR, the templates or the governing skills since the merge base.
Process: a spec-only bug PR, governed by .claude/skills/create-issue/SKILL.md (folder layout, frontmatter, the Step 5 commit subject, Related to linking) and .claude/skills/fix-bug/SKILL.md (plain-terms background, classified reproduction, Bug-Fix Process, Regression Test Strategy, a red-test task), with open-pull-request for the title and body. Every prescribed section is present.
The change against its claim: two new files, as described. The code statements hold at this head: the udp:// prefix and parse-only validation (config.rs:65-66), the unwraps at udp.rs:107-108, the spawned JoinSet task (check.rs:130), the panic record (output.rs:72), runtime_failure exit 1 and invalid_configuration exit 2 (error.rs:85-107), TTY refusal, the ADR's exit-code table, and the history of #2768, #2956 and EPIC #2758. The quoted control records match the emitted key order (preserve_order).
Consistency: the ADR link and every related-artifacts path resolve; spec-path, branch and status: planned fit the validator's open-spec rules; no index row is required; no dictionary word is added and none is needed.
Hygiene: one commit, author equals committer, subject in the create-issue Step 5 form, body empty; one attribution footer, which no rule in the tree forbids; git diff --check is clean; the commit-id check prints nothing; no closing keyword in the title, body, commit or diff.
Findings: F1 to F4 Minor, F5 Nit, F6 Suggestion, inline. None blocks: each is a spec or evidence refinement the author can make here or in the implementation PR.
Checked, no finding: the [#2984] title form (as in earlier spec-only PRs), related-pr: null, table column counts and blank lines, the link checker's offline scope.
Checks
On the loop's compute node at this head, against the merge base 7bc30738a (receipt server-gates-kranich-1298): the repository's pre-commit gate and lint roster exit 0 (124 s wall). This pull request has no review threads, so there is no audit record for the validator to check. The PR changes documentation only, so no package tests apply. Checked against the bytes at posting: ISSUE.md:55 reports a run-time DNS failure as a failed check result "reported with the other check results", while console/tracker-client/src/console/clients/checker/checks/udp.rs:15 serializes remote_addr: SocketAddr with no slot for an unresolved host, as F1 says. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is 4be22ee66.
|
ACK dfc93ae — the spec's code, ADR and history claims, its frontmatter, links and skill-prescribed sections, and the commit's hygiene were recomputed at this head with no blocking finding. |
…resolved UDP host Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…solved-host test Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…w entry Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ion and recheck rows Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…reproduction Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 0368ccb5664078d3f8e6a502e16088d107178892. Recomputed from the bytes at this head, against the merge base 7bc30738a; git merge-tree against develop 4be22ee66 writes a clean tree with no conflicts. The head fast-forwards the round-1 head dfc93aec3 by six fix commits and the audit commit 0368ccb56.
Process: the spec edits follow create-issue and fix-bug; the replies, resolutions and the record follow .claude/skills/process-pr-review/SKILL.md.
The change against its claim: one commit per round-1 finding, each doing what its subject says, and F1 to F6 are fixed at this head. The result shape for an unresolved host is part of Open Question 1, the network-free claim is gone, the reproduction stderr is verbatim, the build commit and toolchain are named, M1 and M2 are separate rows, and the scheme test asserts the reason.
The audit: docs/pr-reviews/pr-2985-review/PR-REVIEW.md has eight rows, one per thread. Each row's source comment, review ID, severity and reply match the capture; every reply sits on its own thread; all eight threads are resolved; the late start is logged as SKILL.md:50 directs. The validator's logic, run offline on the captured comments and the branch's commit subjects, reports 8 rows, 2 log entries and 0 failures. Its Ownership, Status Values and Completion Rules sections match the template verbatim.
Consistency: the frontmatter matches earlier records; no index row is needed; the spec and evidence are unchanged by the audit commit.
Hygiene: seven commits, author equals committer, Conventional subjects with [#2984], empty bodies, one attribution footer each, which no rule in the tree forbids; git diff --check is clean; the commit-id check prints nothing; no closing keyword in the body, commits or record.
Findings: F9 Minor, F10 and F11 Nit, inline, numbered after the record's F7 and F8 so they carry into it unchanged. None blocks: each is a spec or evidence refinement the author can make here or in the implementation PR.
Checked, no finding: the Superseded by replies, the two bot threads' || claim (no such row at any head), the verbatim records against output.rs:72 and error.rs:98-107, the nested list under Open Question 1.
Checks
On the loop's compute node at this head, against the merge base 7bc30738a (receipt server-gates-kranich-1311): the repository's pre-commit gate and lint roster exit 0 (55 s wall), and the audit validator passes on this PR's record (8 rows, 2 log entries, 0 failures). The PR changes documentation only, so no package tests apply. Checked against the bytes at posting: ISSUE.md:90 says the scheme check reads the raw entry before the udp:// prefix is added, while the allowed-forms list in console/tracker-client/src/console/clients/checker/config.rs:121-146 includes localhost:6969, localhost:6969/ and localhost:6969/announce, as F9 says. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "". At posting, develop is 4be22ee66.
|
ACK 0368ccb — the six fixes for F1 to F6, the audit record's eight rows against their replies and resolved threads, the validator's logic offline, and the commit hygiene were recomputed at this head with no blocking finding. |
… localhost:6969 in AC4 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…hem verbatim Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ated up to date Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 9620966de86baed61797338d24268fa341052c83. Recomputed from the bytes at this head, against the merge base 7bc30738a; git merge-tree against develop 4be22ee66 writes a clean tree with no conflicts. The head fast-forwards the round-2 head 0368ccb56 by three fix commits and the audit commit 9620966de.
Process: the spec edits follow create-issue and fix-bug; the replies, resolutions and the record follow .claude/skills/process-pr-review/SKILL.md.
The change against its claim: each commit does what its subject says, and F9 to F11 are fixed. The scheme is detected by the :// separator, so 127.0.0.1:6969 and localhost:6969 stay valid, and AC4 names both (F9). Both controls were rerun with the same binary at 15:57 UTC and are recorded verbatim (F10). last-updated-utc and the Progress Log now match the commit times (F11).
The audit: 9620966de adds rows F9 to F11 (PR-REVIEW.md:60-62), their detail entries and a round-2 Processing Log entry, and changes nothing else apart from last-updated-utc. Each new row's source comment, review ID, severity and reply match the capture; each reply sits on its own thread; all eleven threads are resolved. The validator's logic, run offline at this head, reports 11 rows, 3 log entries and 0 failures.
Consistency: tables, links and frontmatter stay valid; git diff 7bc30738a -- console packages is still empty, as the evidence says.
Hygiene: four commits since the round-2 head, author equals committer, Conventional subjects with [#2984], empty bodies, one attribution footer each, which no rule in the tree forbids; git diff --check is clean; the commit-id check prints nothing; no closing keyword in the body, commits or record.
Findings: none.
Checked, no finding: rows F1 to F8 are unchanged and the Processing Log is append-only; the round-2 log entry states that the replies came before the record update; the F10 reply's account of the restored field; the new text blocks and Progress Log lines.
Checks
On the loop's compute node at this head, against the merge base 7bc30738a (receipt server-gates-kranich-1319): the repository's pre-commit gate and lint roster exit 0 (102 s wall), and the audit validator passes on this PR's record (11 rows, 3 log entries, 0 failures). The PR changes documentation only, so no package tests apply. Checked against the bytes at posting: docs/pr-reviews/pr-2985-review/PR-REVIEW.md now carries rows F9, F10 and F11, each FIXED and resolved, the rows the previous round found missing. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "". At posting, develop is 4be22ee66.
|
ACK 9620966 — the three fixes for F9 to F11, the audit record's eleven rows against their replies and resolved threads, the validator's logic offline, and the commit hygiene were recomputed at this head with no open finding. |
|
ACK 9620966 |
…pen questions Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 40a87294064a8f7e26387f6bd41c0377f21069e4. Recomputed from the bytes at this head, against the merge base 7bc30738a; git merge-tree against develop 4be22ee66 writes a clean tree with no conflicts. The head fast-forwards the round-3 head 9620966de by one commit.
Process: a spec edit under create-issue and fix-bug; the PR description falls under open-pull-request.
The change against its claim: 40a872940 does what its subject says. The open questions become two decisions; In Scope gains the HTTP rule; Out of Scope and the Regression Test Strategy follow; AC5 and its verification row are new; last-updated-utc and the Progress Log move. Decision 1 matches the earlier option and udp.rs:15. Decision 2 widens the scope. Nothing in http.rs or health.rs unwraps user input (the expects at http.rs:67 and :88 are on literals), so today a wrong-scheme HTTP entry is a failed check with exit 0, and AC5 makes it exit 2. The rest of the spec does not carry that yet (F13). The decisions' source is a chat session that no PR record holds (F12), and the description still lists open questions (F14).
The audit: the record is unchanged and still has eleven rows for eleven resolved threads; no thread or review comment is new. The validator's logic, run offline at this head, reports 11 rows, 3 log entries and 0 failures.
Consistency: tables, links and frontmatter stay valid; the evidence file is unchanged.
Hygiene: one commit, author equals committer, a Conventional subject with [#2984], an empty body and one attribution footer, which no rule in the tree forbids; git diff --check is clean; the commit-id check prints nothing; no closing keyword in the body, commits or diff.
Findings: F12, F13 and F14 Minor, inline. None blocks: each is a spec or description repair the author or maintainer can make here or in the implementation PR.
Checked, no finding: http:/// in AC5 already fails to parse today (a special scheme with an empty host), so that example guards a regression; AC5's verification row; the new Progress Log line.
Checks
On the loop's compute node at this head, against the merge base 7bc30738a (receipt server-gates-kranich-1322): the repository's pre-commit gate and lint roster exit 0 (99 s wall), and the audit validator passes on this PR's record (11 rows, 3 log entries, 0 failures). The PR changes documentation only, so no package tests apply. Checked against the bytes at posting: ISSUE.md:66 dates the maintainer's decisions to 2026-11-22, while the Progress Log entry at :133 records the issue's creation on 2026-11-21, which is finding F12. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "". At posting, develop is 4be22ee66.
…mit points Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…6 commit count Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 4d85227 |
…the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at b753ea24429d12bf19c1d806161ab4fbb3a27de8. Recomputed from the bytes at this head, against the merge base 7bc30738a; git merge-tree against develop 98fa27df2 writes a clean tree with no conflicts. The head fast-forwards the round-7 head 4d85227f6 by one spec commit and two audit commits.
Process: the spec edit under create-issue; replies and the record under .claude/skills/process-pr-review/SKILL.md. This review's finding is F26, after the record's F25.
The change against its claim: each commit does what its subject says. fa9c99788 adds the test-development loop (ISSUE.md:114), fixing F24 except two clauses (F26). 6fc49b77a appends the corrected commit count, naming the five commits by subject (F25 fixed). b753ea244 adds rows F24 and F25 and the round's log entry.
The audit: twenty-five rows. Rows F24 and F25 match their threads: review 6011770812, severities equal to the brackets, one reply each on its own thread, and resolved threads. Each row's verification re-derives at this head. The commit-id check prints nothing. The validator's logic, run offline, reports 25 rows, 11 log entries and 0 failures. The F12 thread is still unresolved. The maintainer's comments on this PR are ACK lines for successive heads, the latest naming 4d85227f6, and none restates the decisions that line 66 says it will cite.
Hygiene: author equals committer; Conventional subjects with [#2984]; empty bodies; one attribution footer each, which no rule in the tree forbids. git diff --check is clean, and no closing keyword appears.
Findings: F26 Nit, inline. It does not block. This review stays COMMENT, with no ACK, while the F12 thread has no resolution. Every other thread has a reply, a row and a resolution.
Checked, no finding: the round-7 paragraph (PR-REVIEW.md:46) and log entry (:427) against the capture.
Checks
On the loop's compute node at this head, against the merge base 7bc30738a (receipt server-gates-kranich-1343): the repository's pre-commit gate and lint roster exit 0 (99 s wall), and the audit validator passes on this PR's record (25 rows, 11 log entries, 0 failures). The PR changes documentation only, so no package tests apply. Checked against the bytes at posting: the test-development loop at docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md:114 does not mention docs/testing/refactoring-patterns/, while .claude/skills/create-issue/SKILL.md:189-194 asks a plan to direct test authors to that catalog and to judge helper boundaries by named actions rather than caller count, as F26 says. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "". At posting, develop is 98fa27df2.
…ary rule to the test loop Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…85 audit Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…d of the maintainer decisions Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Decisions for #2984, recorded in docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md (Decisions section): (1) an unresolvable hostname in udp_trackers is a failed check for that tracker, not a configuration error; the result record changes to hold an address that did not resolve. (2) The same host and scheme validation also applies to http_trackers and health_checks (an entry needs a host and the scheme http or https). |
…in the specification Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK af89320 |
|
ACK 0045fb2 |
…roduction runs Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…85 audit Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 6ff01ee |
|
ACK c452bc4 |
|
ACK c452bc4 |
…s and fail the check on a DNS error 0631732 docs(pr-reviews): [#2984] add round 4 finding F8 to the PR 3013 audit and repeat the recheck (josecelano-bot) 72e1c5e fix(tracker-client): [#2984] do not write the path of a UDP tracker URL in the check result (josecelano-bot) ef4e298 docs(pr-reviews): [#2984] add round 3 finding F7 to the PR 3013 audit and repeat the recheck (josecelano-bot) 0d8e6ed fix(tracker-client): [#2984] do not echo the path, query or credentials of a rejected tracker URL (josecelano-bot) 791fef6 docs(pr-reviews): [#2984] add round 2 findings F5 and F6 to the PR 3013 audit (josecelano-bot) 8dd33eb test(tracker-client): [#2984] resolve real IP literals in the socket-address tests (josecelano-bot) 831cf52 docs(pr-reviews): [#2984] correct the time stamp of the PR 3013 audit round 1 entry (josecelano-bot) 97f5196 docs(pr-reviews): [#2984] add the PR 3013 review audit (josecelano-bot) a83fe96 docs(issues): [#2984] record the test design reviews of the implementation (josecelano-bot) eb5d1a3 test(tracker-client): [#2984] cover the failed-check result and the continuation to later trackers (josecelano-bot) 13c5d2a fix(tracker-client): [#2984] read the UDP URL scheme only when the entry starts with one (josecelano-bot) 8f307bc docs(issues): [#2984] record the red and green evidence and mark the implementation tasks done (josecelano-bot) 3fd4dd6 fix(tracker-client): [#2984] reject unusable tracker URLs and fail the check on a DNS error (josecelano-bot) Pull request description: Closes #2984 ## Summary `tracker_client check` no longer panics on a UDP tracker URL it cannot use, and now rejects unusable tracker and health-check URLs when it validates the configuration. This implements the specification merged in #2985, including the two maintainer decisions recorded there. - A `udp_trackers` entry with no port, no host or a scheme other than `udp` is an `invalid_configuration` error (exit `2`) that names the entry and the reason (`ConfigurationError::InvalidTrackerUrl` with a `UrlRejection` reason). The scheme is read from the raw entry, so `127.0.0.1:6969` and `localhost:6969` stay valid. - A UDP host that does not resolve (DNS failure) is a failed `Setup` check for that tracker, with exit `0` and no panic. `udp::Checks` now carries the configured `url` and `remote_addr: Option<SocketAddr>`, which is `null` when the host did not resolve; this is the one allowed change to the result shape (decision 1). A new `udp::Error::UnableToResolveAddress` carries the failure. - `http_trackers` and `health_checks` entries must have the scheme `http` or `https` and a host (decision 2). Behaviour change to call out: a wrong-scheme entry that parses (for example `ftp://127.0.0.1`) was a failed check with exit `0`; it is now exit `2`. Entries without a host already exited `2` and still do. - The end-to-end test that relied on the panic is rewritten to the configuration-error contract, and the panic-hook coverage moves to unit tests of a new `panic_record` function in `unified/output.rs` (a behaviour-preserving extraction). ## Files touched All in `console/tracker-client`: `checker/config.rs`, `checker/checks/udp.rs`, `checker/monitor/udp.rs` (one match arm), `udp/mod.rs`, `unified/output.rs` and `tests/output_contract.rs`. The specification and evidence files of the issue are updated in a separate commit. ## Validation - Red regression tests were recorded before the fix (V3 in the issue's `manual-verification-evidence.md`): 11 unit tests and the rewritten end-to-end test failed on the old behaviour. - `cargo test -p torrust-tracker-client` passes (60 unit tests and the integration tests), and the pre-commit gate (`linter all`, tests, doc tests) passed for both commits. - The like-for-like recheck of the original reproductions on the real binary (V4) gives exit `2` plus one `invalid_configuration` record for AC1, AC2 and AC5, a failed check with no panic for the unresolvable host (AC3), and unchanged behaviour for valid entries (AC4). - The red tests were not committed separately, so every commit on the branch passes the gate; the red output is in the evidence file instead. No temporary local-only patches are part of this branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * UDP tracker URLs are validated before runtime, requiring a host and port and rejecting unsupported schemes. * HTTP tracker and health-check URLs require an HTTP or HTTPS scheme and a host; ports remain optional. * Invalid URL errors redact paths, credentials, queries, and fragments. * Unresolvable UDP trackers report a setup error without interrupting checks for other trackers. * Tracker URLs in check results are redacted, and UDP address-resolution failures are no longer reported as timeouts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ACKs for top commit: josecelano: ACK 0631732 Tree-SHA512: 2c8f1c99e3056221c12b8c6a7b707d3e315f3cbefc8acac104f3a648e5870f20c9aa4fb8018b20ae0ab34fd6a7922e6b8afc08e0e364c61ac19d7ae447f5d72a
|
Post-merge note: this pull request requested a review from this account and was closed without one at its final head. A post-merge review will not be done: The last requested review was at commit b753ea2, and the seven commits after it changed only the issue specification, its evidence file and the review audit record. |


Summary
Adds the issue specification and the initial reproduction evidence for #2984:
tracker_client checkpanics on a UDP tracker URL without a usable address (no port, no host, a non-udpscheme or an unresolvable host) instead of reporting a configuration error. The spec proposes rejecting such entries during configuration validation (exit2,invalid_configuration) and making address resolution fallible. It records two maintainer decisions: an unresolvable hostname is a failed check for that tracker (the result record gains a way to hold an unresolved address), and the same host and scheme validation also applies tohttp_trackersandhealth_checks(AC5). The HTTP reproduction is a planned task, not yet done.This is a spec-only PR: no production code or test is changed. Related to #2984.
Files touched
docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.mddocs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md(reproduction V1, outcome: Reproduced)Validation
linter markdownandlinter cspellpass; the pre-commit checks (including the frontmatter validator) pass.torrust/developafter PR feat(tracker-client): [#2768] refuse a terminal and write JSON only #2956; the commands and output are in the evidence file.🤖 Generated with Claude Code