From dfc93aec3731a7fb36c29a0db38d4650fa691b07 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 13:16:48 +0000 Subject: [PATCH 01/41] docs(issues): add issue specification for #2984 Co-Authored-By: Claude Sonnet 5.5 --- .../ISSUE.md | 183 ++++++++++++++++++ .../manual-verification-evidence.md | 50 +++++ 2 files changed, 233 insertions(+) create mode 100644 docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md create mode 100644 docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md new file mode 100644 index 000000000..6bdf18516 --- /dev/null +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -0,0 +1,183 @@ +--- +schema-version: 1 +doc-type: issue +issue-type: bug +status: planned +priority: p2 +epic: null +github-issue: 2984 +spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +branch: "2984-tracker-client-check-udp-url-validation-spec" +related-pr: null +last-updated-utc: "2026-11-21 13:15" +semantic-links: + skill-links: + - create-issue + - fix-bug + related-artifacts: + - .claude/skills/fix-bug/SKILL.md + - .claude/skills/create-issue/SKILL.md + - docs/adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md +--- + + + +# Issue #2984 - `tracker_client check` panics on a UDP tracker URL without a usable address + +## Goal + +`tracker_client check` rejects a UDP tracker URL that has no host or no port as a usage/configuration error (exit `2`, one JSON error record), and never panics on a UDP tracker address it cannot resolve. + +## Background + +`tracker_client check` reads a configuration (`TORRUST_CHECKER_CONFIG` or a file) with three URL lists: `udp_trackers`, `http_trackers` and `health_checks`. Configuration validation (`TryFrom for Configuration`, `console/tracker-client/src/console/clients/checker/config.rs`) only checks that each entry parses as a URL. For `udp_trackers` it first prepends `udp://` when the entry does not start with it. + +What happens, step by step: + +1. The operator passes `{"udp_trackers":["udp://127.0.0.1"],...}`. +2. Validation accepts it: `udp://127.0.0.1` is a syntactically valid URL. +3. The UDP check calls `resolve_socket_addr` (`console/tracker-client/src/console/clients/checker/checks/udp.rs`, `url.socket_addrs(|| None).unwrap()`). `socket_addrs` returns `Err` ("No port number in the URL") because UDP has no default port. +4. The `unwrap` panics inside a spawned task. The program prints a `panic` record, then a `runtime_failure` record, and exits `1`. + +The same `unwrap` panics for a URL without a host (`udp:///`: "No host name in the URL"), for an entry with another scheme such as `http://127.0.0.1` or `ftp://127.0.0.1:6969` (the `udp://` prefix is added in front of it, so the host becomes `ftp`/`http` and there is no port), and for a host that does not resolve (`udp://nonexistent.invalid:6969`: "failed to lookup address information"). + +Violated expectation: the [CLI output contract ADR](../../../adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md) keeps exit codes to `0`, `1` and `2`, where `2` is a usage/configuration error. A bad address in the configuration is exactly that. Other invalid URLs already do it: `"invalid URL"` and `udp://[::1` give exit `2` with an `invalid_configuration` record. The panic is also a code-quality problem on its own (an `unwrap` on user input). + +Impact: no data is lost and nothing wrong is reported as success, but the operator gets a panic report and a generic `runtime_failure` (exit `1`) for a typo, instead of an error that names the offending entry. Since issue #2768 the panic is at least a JSON record on stderr, so machine consumers see a failure; the bug is the wrong kind of error and the panic. + +This bug is not part of EPIC #2758 (CLI output contract migration). It was found while fixing issue #2768 (PR #2956). + +## Scope + +### In Scope + +- Reject, during configuration validation, a `udp_trackers` entry that has no host, no port, or a non-`udp` scheme, with a new `ConfigurationError` variant that names the entry and reason; surfaces as the existing `invalid_configuration` record with exit `2`. +- Remove the `unwrap`s in `resolve_socket_addr`: a host that cannot be resolved at run time (DNS failure) becomes a failed check result for that tracker (reported with the other check results), not a panic and not a whole-run failure. +- Regression tests at the configuration seam (unit) and a real-artifact recheck. + +### Out of Scope + +- `http_trackers` and `health_checks` URLs: HTTP(S) has default ports, so a missing port is valid. Validating their scheme or host is a separate change, only raised here for the maintainer to decide (see Open Questions). +- Any other change to the output contract or exit codes. + +## Open Questions (for the maintainer) + +1. Is an unresolvable hostname a configuration error (exit `2`, resolved at validation time) or a per-tracker failed check (proposed above: DNS is a network condition, not a syntax error, and the check's purpose is to report on tracker health)? +2. Should the same host/scheme validation apply to `http_trackers` and `health_checks` in this issue, or stay out of scope? + +## Architectural Decisions + +- Related ADRs: `docs/adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md` +- ADRs to create: None known + +## Design and Ownership Review + +Not applicable + +## Bug-Fix Process + +Follows `.claude/skills/fix-bug/SKILL.md`: + +- Analysis: `resolve_socket_addr` unwraps a `Result` and an `Option` that depend on user input; validation never checks host or port for UDP URLs. Hypothesis: add the check at the validation seam, and make the run-time resolution fallible. +- Reproduction: Reproduced on `torrust/develop` (see `manual-verification-evidence.md`, V1). +- Regression-test boundary: unit tests in `config.rs` (see below). +- Red test evidence before the fix, production fix, green evidence, and a like-for-like recheck of V1 after the last production change. + +## Regression Test Strategy + +Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. Unit tests are deterministic (no network: the unresolvable case uses the reserved `.invalid` TLD). Red/green output goes to `manual-verification-evidence.md`. + +## Implementation Plan + +Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. + +| ID | Status | Task | Notes / Expected Output | +| --- | ------ | --------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| T1 | DONE | Reproduce on a real artifact and classify | V1 recorded: Reproduced | +| T2 | TODO | Add regression tests (config validation cases, unresolvable-host case) | Tests fail on current code; red output recorded | +| T3 | TODO | Fix: validate UDP URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | +| T4 | TODO | Green run and like-for-like recheck of V1 after the last production change | V1 commands give exit `2` + `invalid_configuration`, no panic | + +## Commit Points + +| Task | Coherent change set | Commit policy | +| ---- | ----------------------------------------------------- | ---------------------------------------------------- | +| T2 | Regression tests (red) | Commit after focused validation and required review. | +| T3 | Validation in config and fallible resolution | Commit after focused validation and required review. | +| T4 | Evidence update | Commit after focused validation and required review. | + +## Progress Tracking + +### Workflow Checkpoints + +- [x] Folder-style spec drafted in `docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md` +- [x] Spec reviewed and approved by user/maintainer +- [x] GitHub issue created and issue number added to this spec +- [ ] (Optional, recommended for complex issues) Spec-only PR merged into `develop` before implementation +- [ ] Implementation completed +- [ ] Automatic verification completed (`linter all`, relevant tests, and any pre-push checks) +- [ ] Manual verification scenarios executed and recorded in issue-local `manual-verification-evidence.md` +- [ ] Acceptance criteria reviewed after implementation and updated with evidence +- [ ] Evidence-based implementation completion review recorded: issue-local retrospective created for material discoveries, or progress log states why none was needed +- [ ] Reviewer validated acceptance criteria and updated checkboxes +- [ ] Independent reviewer reports recorded in issue-local `agent-review-reports.md` when reviewers received this folder-style specification +- [ ] Committer verified spec progress is up to date before commit +- [ ] Issue closed and spec moved from `docs/issues/open/` to `docs/issues/closed/` + +### Progress Log + +- 2026-11-19 16:06 UTC - Claude Code (Claude Sonnet 5.5) - Drafted the spec; reproduced the bug on `torrust/develop` - `manual-verification-evidence.md` +- 2026-11-21 13:15 UTC - Claude Code (Claude Sonnet 5.5) - Maintainer approved the spec; issue #2984 created; spec moved to open/ + +## Acceptance Criteria + +- [ ] AC1: `udp://127.0.0.1` (no port) in `udp_trackers` gives exit `2` and one `invalid_configuration` JSON record naming the entry; no `panic` record +- [ ] AC2: `udp:///` (no host) and `http://127.0.0.1` / `ftp://127.0.0.1:6969` (wrong scheme) in `udp_trackers` give the same outcome +- [ ] AC3: `udp://nonexistent.invalid:6969` does not panic; it is reported as a failed check for that tracker +- [ ] AC4: Valid entries (`udp://127.0.0.1:6969`, `127.0.0.1:6969`, `udp://localhost:6969`) behave as before +- [ ] `linter all` exits with code `0` +- [ ] Relevant tests pass +- [ ] Manual verification scenarios are executed and documented in issue-local `manual-verification-evidence.md` +- [ ] Acceptance criteria are re-reviewed after implementation and reflect actual behavior +- [ ] Documentation is updated when behavior/workflow changes + +## Verification Plan + +### Automatic Checks + +- `linter all` +- `cargo test -p torrust-tracker-client` +- Pre-push checks (when applicable) + +### Manual Verification Scenarios + +| ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | +| --- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------ | --------------------------------------------- | +| M1 | UDP URL without port, host, with wrong scheme, DNS miss | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Before: `panic` + `runtime_failure`, exit 1. After: see AC1-AC3 | DONE (before) / TODO (after) | `manual-verification-evidence.md` section V1 | + +Notes: + +- Manual verification is mandatory even when automated tests pass. +- Create the final-recheck entry only after the last production change (see `fix-bug`). + +### Acceptance Verification + +| AC ID | Status (`TODO`/`DONE`) | Evidence | +| ----- | ---------------------- | -------- | +| AC1 | TODO | | +| AC2 | TODO | | +| AC3 | TODO | | +| AC4 | TODO | | + +## Risks and Trade-offs + +- Rejecting a non-`udp` scheme in `udp_trackers` could break a configuration that worked by accident; no such entry can work today, because every one panics. + +## Implementation Completion Review + +- Retrospective: `Not yet assessed` + +## References + +- Found during: issue #2768 (PR #2956) +- Related ADR: `docs/adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md` diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md new file mode 100644 index 000000000..59e5af381 --- /dev/null +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md @@ -0,0 +1,50 @@ +--- +doc-type: manual-verification-evidence +issue-spec: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +last-updated-utc: "2026-11-21 13:15" +--- + +# Manual Verification Evidence + +## Environment and Prerequisites + +- Date and time (UTC): 2026-11-19 16:05 +- Artifact under test: `tracker_client` built from `torrust/develop` at the commit that contains PR #2956 (no patches). +- Operating system / environment: Linux; `cargo build -p torrust-tracker-client --bin tracker_client` (default toolchain). +- Setup: none; no tracker is needed because the failure happens before any network traffic. Stdout is piped (`| cat`) because `tracker_client` refuses a terminal. + +## Verification Processes + +### V1 - Initial reproduction (before the fix) + +- Goal: observe the wrong outcome for UDP URLs without a usable address. +- Initial state: `torrust/develop` after PR #2956. +- Status: `DONE` +- Outcome: **Reproduced** (the wrong outcome, a panic and exit `1`, was observed). + +#### Steps Performed + +For each ``: + +```bash +TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' \ + ./target/debug/tracker_client check | cat +``` + +#### Observed Result + +| `` | Exit | Stderr (abridged) | +| -------------------------------- | ---- | --------------------------------------------------------------------------------------------------------- | +| `udp://127.0.0.1` | 1 | `panic` at `checks/udp.rs:107`: `No port number in the URL`; then `runtime_failure` | +| `udp:///` | 1 | `panic` at `checks/udp.rs:107`: `No host name in the URL`; then `runtime_failure` | +| `ftp://127.0.0.1:6969` | 1 | `panic` at `checks/udp.rs:107`: `No port number in the URL` (the entry becomes `udp://ftp://...`) | +| `http://127.0.0.1` | 1 | `panic` at `checks/udp.rs:107`: `No port number in the URL` | +| `udp://nonexistent.invalid:6969` | 1 | `panic` at `checks/udp.rs:107`: `failed to lookup address information: Name or service not known` | +| `invalid URL` (control) | 2 | `{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid domain character"}}` | +| `udp://[::1` (control) | 2 | `{"error":{"kind":"invalid_configuration",...,"message":"Invalid URL: invalid IPv6 address"}}` | + +Stdout was empty in every case. + +#### Conclusion + +Reproduced. The `unwrap` at `checks/udp.rs:107` is reached for every UDP URL without a resolvable address; URLs that fail to parse already get the expected exit `2`. From 6dda7856c3e9d4bc31779b75b4008c59dfdd8604 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:15:22 +0000 Subject: [PATCH 02/41] docs(issues): [#2984] name the result representation for an unresolved UDP host Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 6bdf18516..97fb92a80 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -52,17 +52,19 @@ This bug is not part of EPIC #2758 (CLI output contract migration). It was found ### In Scope - Reject, during configuration validation, a `udp_trackers` entry that has no host, no port, or a non-`udp` scheme, with a new `ConfigurationError` variant that names the entry and reason; surfaces as the existing `invalid_configuration` record with exit `2`. -- Remove the `unwrap`s in `resolve_socket_addr`: a host that cannot be resolved at run time (DNS failure) becomes a failed check result for that tracker (reported with the other check results), not a panic and not a whole-run failure. +- Remove the `unwrap`s in `resolve_socket_addr`: a host that cannot be resolved at run time (DNS failure) becomes a failed check result for that tracker, not a panic and not a whole-run failure. The result record needs a way to represent an address that did not resolve, because `udp::Checks` carries `remote_addr: SocketAddr` (`checks/udp.rs:15`); the representation is part of Open Question 1. - Regression tests at the configuration seam (unit) and a real-artifact recheck. ### Out of Scope - `http_trackers` and `health_checks` URLs: HTTP(S) has default ports, so a missing port is valid. Validating their scheme or host is a separate change, only raised here for the maintainer to decide (see Open Questions). -- Any other change to the output contract or exit codes. +- Any other change to the output contract or exit codes, apart from the result-shape change that Open Question 1 may require for an unresolved host. ## Open Questions (for the maintainer) -1. Is an unresolvable hostname a configuration error (exit `2`, resolved at validation time) or a per-tracker failed check (proposed above: DNS is a network condition, not a syntax error, and the check's purpose is to report on tracker health)? +1. Is an unresolvable hostname a configuration error or a per-tracker failed check? The options: + - **Configuration error** (exit `2`): resolve at validation time. No result-shape change, but validation then needs the network and a typo-free configuration can still fail on a transient DNS error. + - **Failed check** (proposed: DNS is a network condition, not a syntax error, and the check's purpose is to report on tracker health): needs a representation for an address that did not resolve in `udp::Checks`, whose `remote_addr: SocketAddr` cannot hold it. Candidates: make `remote_addr` an `Option` and add the configured URL to the record, or keep `SocketAddr` and use a placeholder. This is a change to the result record, so this option widens the scope beyond what Out of Scope otherwise allows; the implementation PR must show the new record. 2. Should the same host/scheme validation apply to `http_trackers` and `health_checks` in this issue, or stay out of scope? ## Architectural Decisions From 25d28567cc780c90f747a6570385e116fd0f7c8b Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:17:07 +0000 Subject: [PATCH 03/41] docs(issues): [#2984] drop the network-free claim for the unresolved-host test Co-Authored-By: Claude Sonnet 5.5 --- .../open/2984-tracker-client-check-udp-url-validation/ISSUE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 97fb92a80..1a3dcf1b5 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -87,7 +87,7 @@ Follows `.claude/skills/fix-bug/SKILL.md`: ## Regression Test Strategy -Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. Unit tests are deterministic (no network: the unresolvable case uses the reserved `.invalid` TLD). Red/green output goes to `manual-verification-evidence.md`. +Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. ## Implementation Plan From 628a147445ac136e6e3dd3d38c1bd5071943114c Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:17:49 +0000 Subject: [PATCH 04/41] docs(issues): [#2984] state that the scheme check reads the raw entry Co-Authored-By: Claude Sonnet 5.5 --- .../open/2984-tracker-client-check-udp-url-validation/ISSUE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 1a3dcf1b5..0baf27a49 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -87,7 +87,7 @@ Follows `.claude/skills/fix-bug/SKILL.md`: ## Regression Test Strategy -Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. +Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. The scheme check reads the raw entry before the `udp://` prefix is added (`config.rs:65`); without that, `ftp://127.0.0.1:6969` becomes `udp://ftp://127.0.0.1:6969`, whose host is `ftp` with no port, and the no-port check would reject it. The scheme test therefore asserts the error reason (wrong scheme), not only that an error is returned. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. ## Implementation Plan From 391f6b669ec4c94eac66eef0617705eb97e5e935 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:18:48 +0000 Subject: [PATCH 05/41] docs(issues): [#2984] split the manual scenario into reproduction and recheck rows Co-Authored-By: Claude Sonnet 5.5 --- .../open/2984-tracker-client-check-udp-url-validation/ISSUE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 0baf27a49..55df3bc5b 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -155,7 +155,8 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | | --- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------ | --------------------------------------------- | -| M1 | UDP URL without port, host, with wrong scheme, DNS miss | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Before: `panic` + `runtime_failure`, exit 1. After: see AC1-AC3 | DONE (before) / TODO (after) | `manual-verification-evidence.md` section V1 | +| M1 | Reproduce: UDP URL without port, without host, with wrong scheme, unresolvable host | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Panic record and `runtime_failure`, exit 1, empty stdout | DONE | `manual-verification-evidence.md` section V1 | +| M2 | Final like-for-like recheck of M1 after the last production change | The same commands as M1 | Exit `2` and one `invalid_configuration` record for AC1 and AC2; a failed check, no panic, for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | Notes: From 954d392aead5448bccf01b40ed1ab88a8098a1d1 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:19:55 +0000 Subject: [PATCH 06/41] docs(issues): [#2984] record the reproduction stderr verbatim Co-Authored-By: Claude Sonnet 5.5 --- .../manual-verification-evidence.md | 61 +++++++++++++++---- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md index 59e5af381..1f5cabc56 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md @@ -33,17 +33,56 @@ TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_che #### Observed Result -| `` | Exit | Stderr (abridged) | -| -------------------------------- | ---- | --------------------------------------------------------------------------------------------------------- | -| `udp://127.0.0.1` | 1 | `panic` at `checks/udp.rs:107`: `No port number in the URL`; then `runtime_failure` | -| `udp:///` | 1 | `panic` at `checks/udp.rs:107`: `No host name in the URL`; then `runtime_failure` | -| `ftp://127.0.0.1:6969` | 1 | `panic` at `checks/udp.rs:107`: `No port number in the URL` (the entry becomes `udp://ftp://...`) | -| `http://127.0.0.1` | 1 | `panic` at `checks/udp.rs:107`: `No port number in the URL` | -| `udp://nonexistent.invalid:6969` | 1 | `panic` at `checks/udp.rs:107`: `failed to lookup address information: Name or service not known` | -| `invalid URL` (control) | 2 | `{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid domain character"}}` | -| `udp://[::1` (control) | 2 | `{"error":{"kind":"invalid_configuration",...,"message":"Invalid URL: invalid IPv6 address"}}` | - -Stdout was empty in every case. +Each block below is the exit code, stdout size and stderr of one run, copied verbatim from the rerun at 2026-11-21 15:15:02 UTC (see the environment section). The `panic` record is the first stderr line and the `runtime_failure` record the second. + +`udp://127.0.0.1`: + +```text +exit=1 stdout_bytes=0 +{"kind":"panic","message":"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \"No port number in the URL\" }","location":"console/tracker-client/src/console/clients/checker/checks/udp.rs:107"} +{"error":{"kind":"runtime_failure","source":"runtime","message":"task 33 panicked with message \"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \\\"No port number in the URL\\\" }\""}} +``` + +`udp:///`: + +```text +exit=1 stdout_bytes=0 +{"kind":"panic","message":"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \"No host name in the URL\" }","location":"console/tracker-client/src/console/clients/checker/checks/udp.rs:107"} +{"error":{"kind":"runtime_failure","source":"runtime","message":"task 33 panicked with message \"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \\\"No host name in the URL\\\" }\""}} +``` + +`ftp://127.0.0.1:6969`: + +```text +exit=1 stdout_bytes=0 +{"kind":"panic","message":"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \"No port number in the URL\" }","location":"console/tracker-client/src/console/clients/checker/checks/udp.rs:107"} +{"error":{"kind":"runtime_failure","source":"runtime","message":"task 33 panicked with message \"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \\\"No port number in the URL\\\" }\""}} +``` + +`http://127.0.0.1`: + +```text +exit=1 stdout_bytes=0 +{"kind":"panic","message":"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \"No port number in the URL\" }","location":"console/tracker-client/src/console/clients/checker/checks/udp.rs:107"} +{"error":{"kind":"runtime_failure","source":"runtime","message":"task 33 panicked with message \"called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: \\\"No port number in the URL\\\" }\""}} +``` + +`udp://nonexistent.invalid:6969`: + +```text +exit=1 stdout_bytes=0 +{"kind":"panic","message":"called `Result::unwrap()` on an `Err` value: Custom { kind: Uncategorized, error: \"failed to lookup address information: Name or service not known\" }","location":"console/tracker-client/src/console/clients/checker/checks/udp.rs:107"} +{"error":{"kind":"runtime_failure","source":"runtime","message":"task 33 panicked with message \"called `Result::unwrap()` on an `Err` value: Custom { kind: Uncategorized, error: \\\"failed to lookup address information: Name or service not known\\\" }\""}} +``` + +Control cases (a URL that fails to parse), recorded at the first run on 2026-11-19 16:05 UTC and not rerun: + +| `` | Exit | Stderr | +| ----------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `invalid URL` | 2 | `{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid domain character"}}` | +| `udp://[::1` | 2 | `{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid IPv6 address"}}` | + +Stdout was empty (0 bytes) in every case. #### Conclusion From 26eed88a3d66be57be707eaf3a121b8c0d78713e Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:20:30 +0000 Subject: [PATCH 07/41] docs(issues): [#2984] identify the build and toolchain of the reproduction Co-Authored-By: Claude Sonnet 5.5 --- .../manual-verification-evidence.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md index 1f5cabc56..7aecd4820 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md @@ -1,16 +1,18 @@ --- doc-type: manual-verification-evidence issue-spec: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md -last-updated-utc: "2026-11-21 13:15" +last-updated-utc: "2026-11-21 15:20" --- # Manual Verification Evidence ## Environment and Prerequisites -- Date and time (UTC): 2026-11-19 16:05 -- Artifact under test: `tracker_client` built from `torrust/develop` at the commit that contains PR #2956 (no patches). -- Operating system / environment: Linux; `cargo build -p torrust-tracker-client --bin tracker_client` (default toolchain). +- Date and time (UTC): see Dates below +- Artifact under test: `tracker_client` built from `develop` commit `7bc30738a` (`Merge torrust/torrust-tracker#2966: docs(issues): close out the tracker_client JSON-only issue`), the merge base of this PR and, per `git diff 7bc30738a -- console packages` (empty), identical to this branch in the code it builds. No patches. +- Toolchain: `rustc 1.100.0 (0ef1bc386 2026-11-09)`, `cargo 1.100.0 (3acc79c0c 2026-11-05)`, as reported by `rustc --version` and `cargo --version` on 2026-11-21; the binary used was `target/debug/tracker_client` in this worktree (file modification time 2026-11-21 13:19 UTC, built from the code described above). +- Dates: first run 2026-11-19 16:05 UTC (summarized the stderr); rerun with verbatim capture 2026-11-21 15:15 UTC with the same commands. The rerun printed the same messages as the first run. The toolchain of the first run was not recorded. +- Operating system / environment: Linux. - Setup: none; no tracker is needed because the failure happens before any network traffic. Stdout is piped (`| cat`) because `tracker_client` refuses a terminal. ## Verification Processes From 0368ccb5664078d3f8e6a502e16088d107178892 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:28:59 +0000 Subject: [PATCH 08/41] docs(pr-reviews): [#2984] add the PR 2985 review audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 189 ++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 docs/pr-reviews/pr-2985-review/PR-REVIEW.md diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md new file mode 100644 index 000000000..790ec78f0 --- /dev/null +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -0,0 +1,189 @@ +--- +pr-number: 2985 +pr-url: https://github.com/torrust/torrust-tracker/pull/2985 +last-updated-utc: "2026-11-21 15:25" +--- + + + +# PR #2985 Review Audit + +Source: pull-request reviews and inline review threads for https://github.com/torrust/torrust-tracker/pull/2985. + + + +## Ownership + +The PR author owns this tracked audit record. Reviewers, including repository review agents, +deliver findings through GitHub and have no repository-artifact obligation. + +- Post-merge workflow approval: N/A + + + +## Status Values + +- Relationship: `ORIGINAL`, `RE_RAISE_OF:` +- Disposition: `FIXED`, `NO_ACTION`, `SUPERSEDED`, `FOLLOW_UP` +- Thread state: `OPEN`, `RESOLVED`, `NON_RESOLVABLE`, `SUPERSEDED`. `OPEN` applies prospectively + to audits created or updated for approved follow-up work; historical audits remain valid without + bulk migration. +- Severity: `Blocker`, `Major`, `Minor`, `Nit`, `Suggestion`; append `(inferred)` when derived + from free prose. +- Author class: `Copilot`, `Human`, `Unknown` +- Category: `link-integrity`, `formatting`, `metadata`, `testing`, `correctness`, + `documentation`, `maintainability`, `security`, `other` +- An outdated thread whose concern was fixed is `FIXED`/`RESOLVED`, even when GitHub marks the + original thread outdated after the push. For in-PR feedback, use `NO_ACTION`/`SUPERSEDED` only + for a duplicate, superseded, or no-change concern. A post-merge `NO_ACTION` requires maintainer + approval to decline the follow-up work. +- When the current identity cannot resolve a thread (`viewerCanResolve` is `false`), keep the + disposition established from the current tree and record `Thread state=OPEN`. The reviewer or PR + author resolves it; permission says nothing about whether the concern was fixed. + +## Findings + +Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 in his numbering) and Copilot's COMMENTED review `6006218464` (two inline findings, F7 and F8 here: his IDs F1 to F6 were kept, so Copilot's take the next ordinals), both on the first head, the commit `docs(issues): add issue specification for #2984`. + +| Finding ID | Review finding reference | Author class | Severity | Category | Relationship | Disposition | Thread state | +| ---------- | ------------------------ | ------------ | -------- | -------- | ------------ | ----------- | ------------ | +| F1 | `review-finding:pr-2985-f1` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | +| F2 | `review-finding:pr-2985-f2` | Human | Minor | testing | ORIGINAL | FIXED | RESOLVED | +| F3 | `review-finding:pr-2985-f3` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | +| F4 | `review-finding:pr-2985-f4` | Human | Minor | metadata | ORIGINAL | FIXED | RESOLVED | +| F5 | `review-finding:pr-2985-f5` | Human | Nit | metadata | ORIGINAL | FIXED | RESOLVED | +| F6 | `review-finding:pr-2985-f6` | Human | Suggestion | testing | ORIGINAL | FIXED | RESOLVED | +| F7 | `review-finding:pr-2985-f7` | Copilot | Minor (inferred) | formatting | ORIGINAL | NO_ACTION | SUPERSEDED | +| F8 | `review-finding:pr-2985-f8` | Copilot | Minor (inferred) | formatting | ORIGINAL | NO_ACTION | SUPERSEDED | + +## Finding Details + +### F1 - A DNS failure has no slot in the result record the spec reports it in + +- PR number: 2985 +- Source review ID: 6006228624 +- Reviewer finding ID: da2ce7 F1 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653334347 +- Concern: `udp::Checks` serializes `remote_addr: SocketAddr`, which an unresolved host cannot supply, so AC3 needs a result-shape change that Out of Scope appeared to exclude. +- Solution: Open Question 1 now lists both options and the representation the failed-check option needs (`Option` plus the configured URL, or a placeholder); Out of Scope excludes only changes other than that result-shape change. +- Current-tree verification: `grep -n "Option"` on `ISSUE.md` finds Open Question 1 and the scope bullets point to it. +- Resolution reference: `docs(issues): [#2984] name the result representation for an unresolved UDP host` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368111 + +### F2 - The `.invalid` test is not network-free + +- PR number: 2985 +- Source review ID: 6006228624 +- Reviewer finding ID: da2ce7 F2 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653334349 +- Concern: `socket_addrs` uses the system resolver, so a resolver that rewrites name-not-found answers could make a `.invalid` name resolve; the no-network claim is wrong. +- Solution: The claim is removed: the test asserts only that an error is returned, and injecting the resolution step is allowed as an alternative. +- Current-tree verification: Read the Regression Test Strategy section of `ISSUE.md`: it states the limit and does not claim the test is network-free. +- Resolution reference: `docs(issues): [#2984] drop the network-free claim for the unresolved-host test` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368218 + +### F3 - The reproduction rows paraphrase stderr instead of recording it + +- PR number: 2985 +- Source review ID: 6006228624 +- Reviewer finding ID: da2ce7 F3 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653334353 +- Concern: The five wrong-outcome rows summarized stderr; only the control rows quoted records. +- Solution: V1 now has one `text` block per URL with the exit code, stdout size and the `panic` and `runtime_failure` records verbatim, from a rerun on 2026-11-21 at 15:15 UTC with the same commands; the file says the control rows were not rerun. +- Current-tree verification: `grep -c '^```text'` on the evidence file prints 5, one per URL. +- Resolution reference: `docs(issues): [#2984] record the reproduction stderr verbatim` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368329 + +### F4 - The artifact under test is not identified + +- PR number: 2985 +- Source review ID: 6006228624 +- Reviewer finding ID: da2ce7 F4 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653334356 +- Concern: "The commit that contains PR #2956" and "default toolchain" do not identify the build, which the like-for-like recheck needs. +- Solution: The environment section names `develop` commit `7bc30738a`, `rustc 1.100.0` and `cargo 1.100.0`, and says the toolchain of the first run (2026-11-19) was not recorded. +- Current-tree verification: Read the environment section of the evidence file; `git diff 7bc30738a -- console packages` prints nothing. +- Resolution reference: `docs(issues): [#2984] identify the build and toolchain of the reproduction` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368448 + +### F5 - `DONE (before) / TODO (after)` is not a template status value + +- PR number: 2985 +- Source review ID: 6006228624 +- Reviewer finding ID: da2ce7 F5 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653334361 +- Concern: The M1 status used a value outside the template's list, and the final recheck was not its own entry. +- Solution: M1 is `DONE` as the reproduction and M2 is a separate `TODO` row for the final recheck. +- Current-tree verification: Rows M1 and M2 of the Manual Verification Scenarios table in `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] split the manual scenario into reproduction and recheck rows` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368570 + +### F6 - A wrong-scheme test cannot tell a scheme check from the port check + +- PR number: 2985 +- Source review ID: 6006228624 +- Reviewer finding ID: da2ce7 F6 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653334362 +- Concern: The `udp://` prefix turns `ftp://127.0.0.1:6969` into `udp://ftp://127.0.0.1:6969`, which already fails the no-port check, so the planned test passes with no scheme check. +- Solution: The Regression Test Strategy now says the scheme check reads the raw entry before the prefix and that the test asserts the reason. +- Current-tree verification: Read the Regression Test Strategy section of `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] state that the scheme check reads the raw entry` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368707 + +### F7 - Table rows in `ISSUE.md` start with `||` + +- PR number: 2985 +- Source review ID: 6006218464 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653325952 +- Concern: Copilot reported that each table row starts with `||`, which renders an empty first column. +- Solution: No change: no row starts with `||`. The reply is `Superseded by F7: ...`. +- Current-tree verification: `grep -nP '^\|\|'` on `ISSUE.md` prints nothing at the head after the fixes; every table row starts with a single `|`. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368805 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368805 + +### F8 - Table rows in the evidence file start with `||` + +- PR number: 2985 +- Source review ID: 6006218464 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653325963 +- Concern: Copilot reported the same `||` row prefix in the evidence file. +- Solution: No change, for the same reason as F7. The reply is `Superseded by F8: ...`. +- Current-tree verification: `grep -nP '^\|\|'` on the evidence file prints nothing at the head after the fixes. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368912 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368912 + +## Processing Log + +- 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). +- 2026-11-21 15:25 UTC - Round 1, continued: the eight threads were resolved after the validator run (`failures: 0`). GraphQL: 0 unresolved. + + + +## Completion Rules + +- Re-derive the reply claim against the current tree before replying or resolving a thread. +- Reply on every resolvable thread before resolving it. +- For an outdated thread whose concern was fixed, record `Disposition=FIXED` and + `Thread state=RESOLVED`, even if GitHub marks the thread outdated after the push. For a + duplicate, superseded, or no-change in-PR thread, reply exactly + `Superseded by : .`, record `Disposition=NO_ACTION` and + `Thread state=SUPERSEDED`, then resolve it. A post-merge `NO_ACTION` requires maintainer + approval to decline the follow-up work. When the current identity cannot resolve a thread + (`viewerCanResolve` is `false`), still reply, keep the disposition established from the current + tree, and record `Thread state=OPEN`; the reviewer or PR author resolves it. +- A consolidated PR conversation response may cover multiple review rounds only when it names + every review ID and every finding ID with its disposition and resolution reference. Record its + durable URL in each related row. +- Cite a fix by its unique Conventional Commit subject or durable reply URL, never by a branch SHA + that can change after a rebase. +- Refresh review threads using GraphQL and confirm that no unresolved actionable thread remains. From 6b43164f1a396af81ac6b77da967390600b9aa78 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:58:16 +0000 Subject: [PATCH 09/41] docs(issues): [#2984] say how the scheme is detected and cover localhost:6969 in AC4 Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 55df3bc5b..d645ac3c8 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -87,7 +87,7 @@ Follows `.claude/skills/fix-bug/SKILL.md`: ## Regression Test Strategy -Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. The scheme check reads the raw entry before the `udp://` prefix is added (`config.rs:65`); without that, `ftp://127.0.0.1:6969` becomes `udp://ftp://127.0.0.1:6969`, whose host is `ftp` with no port, and the no-port check would reject it. The scheme test therefore asserts the error reason (wrong scheme), not only that an error is returned. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. +Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. The scheme check reads the raw entry before the `udp://` prefix is added (`config.rs:65`) and detects a scheme by the `://` separator, so the forms without a scheme `127.0.0.1:6969` and `localhost:6969` (which a URL parser alone would read as scheme `localhost`) stay valid; without that, `ftp://127.0.0.1:6969` becomes `udp://ftp://127.0.0.1:6969`, whose host is `ftp` with no port, and the no-port check would reject it. The scheme test therefore asserts the error reason (wrong scheme), not only that an error is returned. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. ## Implementation Plan @@ -136,7 +136,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - [ ] AC1: `udp://127.0.0.1` (no port) in `udp_trackers` gives exit `2` and one `invalid_configuration` JSON record naming the entry; no `panic` record - [ ] AC2: `udp:///` (no host) and `http://127.0.0.1` / `ftp://127.0.0.1:6969` (wrong scheme) in `udp_trackers` give the same outcome - [ ] AC3: `udp://nonexistent.invalid:6969` does not panic; it is reported as a failed check for that tracker -- [ ] AC4: Valid entries (`udp://127.0.0.1:6969`, `127.0.0.1:6969`, `udp://localhost:6969`) behave as before +- [ ] AC4: Valid entries (`udp://127.0.0.1:6969`, `127.0.0.1:6969`, `udp://localhost:6969`, and `localhost:6969`, which has no scheme) behave as before - [ ] `linter all` exits with code `0` - [ ] Relevant tests pass - [ ] Manual verification scenarios are executed and documented in issue-local `manual-verification-evidence.md` From 558b200e8d285ae6d7c96fb069304418ac86d915 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:59:05 +0000 Subject: [PATCH 10/41] docs(issues): [#2984] rerun the two control cases and record them verbatim Co-Authored-By: Claude Sonnet 5.5 --- .../manual-verification-evidence.md | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md index 7aecd4820..59e3440ff 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md @@ -1,7 +1,7 @@ --- doc-type: manual-verification-evidence issue-spec: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md -last-updated-utc: "2026-11-21 15:20" +last-updated-utc: "2026-11-21 15:59" --- # Manual Verification Evidence @@ -11,7 +11,7 @@ last-updated-utc: "2026-11-21 15:20" - Date and time (UTC): see Dates below - Artifact under test: `tracker_client` built from `develop` commit `7bc30738a` (`Merge torrust/torrust-tracker#2966: docs(issues): close out the tracker_client JSON-only issue`), the merge base of this PR and, per `git diff 7bc30738a -- console packages` (empty), identical to this branch in the code it builds. No patches. - Toolchain: `rustc 1.100.0 (0ef1bc386 2026-11-09)`, `cargo 1.100.0 (3acc79c0c 2026-11-05)`, as reported by `rustc --version` and `cargo --version` on 2026-11-21; the binary used was `target/debug/tracker_client` in this worktree (file modification time 2026-11-21 13:19 UTC, built from the code described above). -- Dates: first run 2026-11-19 16:05 UTC (summarized the stderr); rerun with verbatim capture 2026-11-21 15:15 UTC with the same commands. The rerun printed the same messages as the first run. The toolchain of the first run was not recorded. +- Dates: first run 2026-11-19 16:05 UTC (summarized the stderr); rerun with verbatim capture 2026-11-21 15:15 UTC with the same commands (the two parse-failure controls were rerun at 15:57 UTC). The rerun printed the same messages as the first run. The toolchain of the first run was not recorded. - Operating system / environment: Linux. - Setup: none; no tracker is needed because the failure happens before any network traffic. Stdout is piped (`| cat`) because `tracker_client` refuses a terminal. @@ -77,14 +77,23 @@ exit=1 stdout_bytes=0 {"error":{"kind":"runtime_failure","source":"runtime","message":"task 33 panicked with message \"called `Result::unwrap()` on an `Err` value: Custom { kind: Uncategorized, error: \\\"failed to lookup address information: Name or service not known\\\" }\""}} ``` -Control cases (a URL that fails to parse), recorded at the first run on 2026-11-19 16:05 UTC and not rerun: +Control cases (a URL that fails to parse), rerun with the same binary at 2026-11-21 15:57 UTC, verbatim: -| `` | Exit | Stderr | -| ----------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `invalid URL` | 2 | `{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid domain character"}}` | -| `udp://[::1` | 2 | `{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid IPv6 address"}}` | +`invalid URL`: -Stdout was empty (0 bytes) in every case. +```text +exit=2 stdout_bytes=0 +{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid domain character"}} +``` + +`udp://[::1`: + +```text +exit=2 stdout_bytes=0 +{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: invalid IPv6 address"}} +``` + +Stdout was empty (0 bytes) in every case above. #### Conclusion From 6d62c181e12377fc7dd8cf09934e6448b631759c Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 15:59:48 +0000 Subject: [PATCH 11/41] docs(issues): [#2984] bring the spec progress log and last-updated up to date Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index d645ac3c8..1b692fe72 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-21 13:15" +last-updated-utc: "2026-11-21 15:59" semantic-links: skill-links: - create-issue @@ -130,6 +130,9 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - 2026-11-19 16:06 UTC - Claude Code (Claude Sonnet 5.5) - Drafted the spec; reproduced the bug on `torrust/develop` - `manual-verification-evidence.md` - 2026-11-21 13:15 UTC - Claude Code (Claude Sonnet 5.5) - Maintainer approved the spec; issue #2984 created; spec moved to open/ +- 2026-11-21 15:15 UTC - Claude Code (Claude Sonnet 5.5) - Reran the reproduction (V1) with verbatim capture - `manual-verification-evidence.md` +- 2026-11-21 15:20 UTC - Claude Code (Claude Sonnet 5.5) - Round 1 review fixes (F1 to F6): result representation, no network-free claim, verbatim stderr, build and toolchain, M1/M2 split, raw-entry scheme check - PR 2985 audit +- 2026-11-21 15:59 UTC - Claude Code (Claude Sonnet 5.5) - Round 2 review fixes (F9 to F11): scheme detection by `://` and `localhost:6969` in AC4, controls rerun verbatim, this log and `last-updated-utc` - PR 2985 audit ## Acceptance Criteria From 9620966de86baed61797338d24268fa341052c83 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sat, 21 Nov 2026 16:04:05 +0000 Subject: [PATCH 12/41] docs(pr-reviews): [#2984] add round 2 findings F9 to F11 to the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 47 ++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 790ec78f0..1abb3ad01 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-21 15:25" +last-updated-utc: "2026-11-21 16:03" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 2 is da2ce7's APPROVED review `6006401735` (three inline findings, F9 to F11 in his numbering, kept here) on the head `docs(pr-reviews): [#2984] add the PR 2985 review audit`. + Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 in his numbering) and Copilot's COMMENTED review `6006218464` (two inline findings, F7 and F8 here: his IDs F1 to F6 were kept, so Copilot's take the next ordinals), both on the first head, the commit `docs(issues): add issue specification for #2984`. | Finding ID | Review finding reference | Author class | Severity | Category | Relationship | Disposition | Thread state | @@ -55,6 +57,9 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F6 | `review-finding:pr-2985-f6` | Human | Suggestion | testing | ORIGINAL | FIXED | RESOLVED | | F7 | `review-finding:pr-2985-f7` | Copilot | Minor (inferred) | formatting | ORIGINAL | NO_ACTION | SUPERSEDED | | F8 | `review-finding:pr-2985-f8` | Copilot | Minor (inferred) | formatting | ORIGINAL | NO_ACTION | SUPERSEDED | +| F9 | `review-finding:pr-2985-f9` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | +| F10 | `review-finding:pr-2985-f10` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | +| F11 | `review-finding:pr-2985-f11` | Human | Nit | metadata | ORIGINAL | FIXED | RESOLVED | ## Finding Details @@ -162,10 +167,50 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653368912 +### F9 - Reading the raw entry's scheme would reject the domain form without a scheme + +- PR number: 2985 +- Source review ID: 6006401735 +- Reviewer finding ID: da2ce7 F9 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653484238 +- Concern: `localhost:6969` parses as a URL with scheme `localhost`, so a scheme check on the raw entry would break that allowed form, and AC4 named only `udp://localhost:6969`. +- Solution: The spec says the scheme is detected by the `://` separator, and AC4 lists `localhost:6969`. +- Current-tree verification: Read the Regression Test Strategy sentence and the AC4 line of `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] say how the scheme is detected and cover localhost:6969 in AC4` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653507315 + +### F10 - This control row now shows a field that the first run's record left out + +- PR number: 2985 +- Source review ID: 6006401735 +- Reviewer finding ID: da2ce7 F10 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653484242 +- Concern: The `source` field in the control row was restored without a rerun, while the file said the controls were not rerun. +- Solution: Both controls were rerun with the same binary at 2026-11-21 15:57 UTC and recorded verbatim; the environment section says so. +- Current-tree verification: Read the controls section and the Dates line of the evidence file. +- Resolution reference: `docs(issues): [#2984] rerun the two control cases and record them verbatim` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653507638 + +### F11 - The spec's `last-updated-utc` and Progress Log did not move with the round-1 fixes + +- PR number: 2985 +- Source review ID: 6006401735 +- Reviewer finding ID: da2ce7 F11 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653484247 +- Concern: The frontmatter still read 13:15 and the Progress Log had no entry for the edits or the rerun. +- Solution: `last-updated-utc` is the update time and the Progress Log has entries for the 15:15 rerun, the round 1 fixes and the round 2 fixes. +- Current-tree verification: Read frontmatter line 12 and the Progress Log of `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] bring the spec progress log and last-updated up to date` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653507842 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). - 2026-11-21 15:25 UTC - Round 1, continued: the eight threads were resolved after the validator run (`failures: 0`). GraphQL: 0 unresolved. +- 2026-11-21 16:03 UTC - Round 2: da2ce7's APPROVED review `6006401735` (15:55:15Z, three findings F9 to F11). Three commits fixed them, one per finding (pushed, exit 0). Three replies were posted after the push, between 16:02:20Z and 16:02:24Z, and this record was updated after them. Threads resolved at 16:03Z after the validator run (`failures: 0`). GraphQL: 0 unresolved. From 40a87294064a8f7e26387f6bd41c0377f21069e4 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:22:18 +0000 Subject: [PATCH 13/41] docs(issues): [#2984] record the maintainer decisions on the open questions Co-Authored-By: Claude Sonnet 5.5 --- .../ISSUE.md | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 1b692fe72..47234586e 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-21 15:59" +last-updated-utc: "2026-11-22 09:22" semantic-links: skill-links: - create-issue @@ -52,20 +52,21 @@ This bug is not part of EPIC #2758 (CLI output contract migration). It was found ### In Scope - Reject, during configuration validation, a `udp_trackers` entry that has no host, no port, or a non-`udp` scheme, with a new `ConfigurationError` variant that names the entry and reason; surfaces as the existing `invalid_configuration` record with exit `2`. -- Remove the `unwrap`s in `resolve_socket_addr`: a host that cannot be resolved at run time (DNS failure) becomes a failed check result for that tracker, not a panic and not a whole-run failure. The result record needs a way to represent an address that did not resolve, because `udp::Checks` carries `remote_addr: SocketAddr` (`checks/udp.rs:15`); the representation is part of Open Question 1. +- Remove the `unwrap`s in `resolve_socket_addr`: a host that cannot be resolved at run time (DNS failure) becomes a failed check result for that tracker, not a panic and not a whole-run failure. The result record needs a way to represent an address that did not resolve, because `udp::Checks` carries `remote_addr: SocketAddr` (`checks/udp.rs:15`); the representation is decision 1. +- Apply the same host and scheme validation to `http_trackers` and `health_checks` (decision 2 below): an entry must have a host and the scheme `http` or `https`; a missing port is valid because HTTP(S) has default ports. A rejected entry is an `invalid_configuration` error, exit `2`. - Regression tests at the configuration seam (unit) and a real-artifact recheck. ### Out of Scope -- `http_trackers` and `health_checks` URLs: HTTP(S) has default ports, so a missing port is valid. Validating their scheme or host is a separate change, only raised here for the maintainer to decide (see Open Questions). -- Any other change to the output contract or exit codes, apart from the result-shape change that Open Question 1 may require for an unresolved host. +- Any other validation of tracker URLs beyond a host and an allowed scheme (for example reachability or path rules). +- Any other change to the output contract or exit codes, apart from the result-shape change of decision 1. -## Open Questions (for the maintainer) +## Decisions (maintainer) -1. Is an unresolvable hostname a configuration error or a per-tracker failed check? The options: - - **Configuration error** (exit `2`): resolve at validation time. No result-shape change, but validation then needs the network and a typo-free configuration can still fail on a transient DNS error. - - **Failed check** (proposed: DNS is a network condition, not a syntax error, and the check's purpose is to report on tracker health): needs a representation for an address that did not resolve in `udp::Checks`, whose `remote_addr: SocketAddr` cannot hold it. Candidates: make `remote_addr` an `Option` and add the configured URL to the record, or keep `SocketAddr` and use a placeholder. This is a change to the result record, so this option widens the scope beyond what Out of Scope otherwise allows; the implementation PR must show the new record. -2. Should the same host/scheme validation apply to `http_trackers` and `health_checks` in this issue, or stay out of scope? +Both questions raised by the first draft were answered by the maintainer in the session that created this issue, on 2026-11-22 (chat; not a durable GitHub comment, so the review thread of this pull request is the record to cite). + +1. **An unresolvable hostname is a failed check for that tracker**, not a configuration error: DNS is a network condition, and the check exists to report on tracker health. `udp::Checks` carries `remote_addr: SocketAddr` (`checks/udp.rs:15`), which cannot hold an address that did not resolve, so the implementation changes the result record: candidates are `remote_addr: Option` plus the configured URL, or a placeholder. The implementation PR shows the new record and this is the one allowed change to the output contract's result shape. +2. **The same host and scheme validation also applies to `http_trackers` and `health_checks`.** The rule is in In Scope. The first draft only assumed that a missing port is valid there and that nothing panics for those lists; the implementation must reproduce with a real run whether any HTTP URL form also panics or fails wrongly today, and record it in `manual-verification-evidence.md` before the fix. ## Architectural Decisions @@ -87,7 +88,7 @@ Follows `.claude/skills/fix-bug/SKILL.md`: ## Regression Test Strategy -Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme. The scheme check reads the raw entry before the `udp://` prefix is added (`config.rs:65`) and detects a scheme by the `://` separator, so the forms without a scheme `127.0.0.1:6969` and `localhost:6969` (which a URL parser alone would read as scheme `localhost`) stay valid; without that, `ftp://127.0.0.1:6969` becomes `udp://ftp://127.0.0.1:6969`, whose host is `ftp` with no port, and the no-port check would reject it. The scheme test therefore asserts the error reason (wrong scheme), not only that an error is returned. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. +Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme, plus the same host and scheme cases for `http_trackers` and `health_checks`. The scheme check reads the raw entry before the `udp://` prefix is added (`config.rs:65`) and detects a scheme by the `://` separator, so the forms without a scheme `127.0.0.1:6969` and `localhost:6969` (which a URL parser alone would read as scheme `localhost`) stay valid; without that, `ftp://127.0.0.1:6969` becomes `udp://ftp://127.0.0.1:6969`, whose host is `ftp` with no port, and the no-port check would reject it. The scheme test therefore asserts the error reason (wrong scheme), not only that an error is returned. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. ## Implementation Plan @@ -133,6 +134,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - 2026-11-21 15:15 UTC - Claude Code (Claude Sonnet 5.5) - Reran the reproduction (V1) with verbatim capture - `manual-verification-evidence.md` - 2026-11-21 15:20 UTC - Claude Code (Claude Sonnet 5.5) - Round 1 review fixes (F1 to F6): result representation, no network-free claim, verbatim stderr, build and toolchain, M1/M2 split, raw-entry scheme check - PR 2985 audit - 2026-11-21 15:59 UTC - Claude Code (Claude Sonnet 5.5) - Round 2 review fixes (F9 to F11): scheme detection by `://` and `localhost:6969` in AC4, controls rerun verbatim, this log and `last-updated-utc` - PR 2985 audit +- 2026-11-22 09:22 UTC - Claude Code (Claude Sonnet 5.5) - Recorded the maintainer's answers to both open questions as decisions: DNS failure is a failed check; the host and scheme validation also covers `http_trackers` and `health_checks` (new AC5) - PR 2985 ## Acceptance Criteria @@ -140,6 +142,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - [ ] AC2: `udp:///` (no host) and `http://127.0.0.1` / `ftp://127.0.0.1:6969` (wrong scheme) in `udp_trackers` give the same outcome - [ ] AC3: `udp://nonexistent.invalid:6969` does not panic; it is reported as a failed check for that tracker - [ ] AC4: Valid entries (`udp://127.0.0.1:6969`, `127.0.0.1:6969`, `udp://localhost:6969`, and `localhost:6969`, which has no scheme) behave as before +- [ ] AC5: In `http_trackers` and `health_checks`, an entry with no host or with a scheme other than `http` or `https` (for example `udp://127.0.0.1:6969`, `ftp://127.0.0.1`, `http:///`) gives exit `2` and one `invalid_configuration` record, and valid entries (`http://127.0.0.1:7070/announce`, `https://tracker.example.com`) behave as before - [ ] `linter all` exits with code `0` - [ ] Relevant tests pass - [ ] Manual verification scenarios are executed and documented in issue-local `manual-verification-evidence.md` @@ -174,6 +177,7 @@ Notes: | AC2 | TODO | | | AC3 | TODO | | | AC4 | TODO | | +| AC5 | TODO | | ## Risks and Trade-offs From d87b2fe271420159f921aeeb1e1ecf8f2cf2fe41 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:34:14 +0000 Subject: [PATCH 14/41] docs(issues): [#2984] correct the date and source of the recorded decisions Co-Authored-By: Claude Sonnet 5.5 --- .../open/2984-tracker-client-check-udp-url-validation/ISSUE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 47234586e..906cee59e 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -63,7 +63,7 @@ This bug is not part of EPIC #2758 (CLI output contract migration). It was found ## Decisions (maintainer) -Both questions raised by the first draft were answered by the maintainer in the session that created this issue, on 2026-11-22 (chat; not a durable GitHub comment, so the review thread of this pull request is the record to cite). +The maintainer answered both questions raised by the first draft in chat, on 2026-11-22, one day after this issue was created (2026-11-21). The chat is not a durable record: the maintainer is asked to restate both decisions in a comment on this pull request, and the comment URL will be cited here. Until then the decisions below are the author's record of that chat, not a quotation. 1. **An unresolvable hostname is a failed check for that tracker**, not a configuration error: DNS is a network condition, and the check exists to report on tracker health. `udp::Checks` carries `remote_addr: SocketAddr` (`checks/udp.rs:15`), which cannot hold an address that did not resolve, so the implementation changes the result record: candidates are `remote_addr: Option` plus the configured URL, or a placeholder. The implementation PR shows the new record and this is the one allowed change to the output contract's result shape. 2. **The same host and scheme validation also applies to `http_trackers` and `health_checks`.** The rule is in In Scope. The first draft only assumed that a missing port is valid there and that nothing panics for those lists; the implementation must reproduce with a real run whether any HTTP URL form also panics or fails wrongly today, and record it in `manual-verification-evidence.md` before the fix. From 8a2837125b5f7d1fc44bf39d7ff64db7513996b1 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:35:32 +0000 Subject: [PATCH 15/41] docs(issues): [#2984] carry decision 2 through the goal, plan, scenarios and risks Co-Authored-By: Claude Sonnet 5.5 --- .../ISSUE.md | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 906cee59e..655b0e97b 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -26,7 +26,7 @@ semantic-links: ## Goal -`tracker_client check` rejects a UDP tracker URL that has no host or no port as a usage/configuration error (exit `2`, one JSON error record), and never panics on a UDP tracker address it cannot resolve. +`tracker_client check` rejects a UDP tracker URL that has no host or no port, and a tracker or health-check URL with no host or a wrong scheme, as a usage/configuration error (exit `2`, one JSON error record), and never panics on a UDP tracker address it cannot resolve. ## Background @@ -96,18 +96,20 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Status | Task | Notes / Expected Output | | --- | ------ | --------------------------------------------------------------------------- | ----------------------------------------------------------------- | -| T1 | DONE | Reproduce on a real artifact and classify | V1 recorded: Reproduced | -| T2 | TODO | Add regression tests (config validation cases, unresolvable-host case) | Tests fail on current code; red output recorded | -| T3 | TODO | Fix: validate UDP URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | -| T4 | TODO | Green run and like-for-like recheck of V1 after the last production change | V1 commands give exit `2` + `invalid_configuration`, no panic | +| T1 | DONE | Reproduce the UDP forms on a real artifact and classify | V1 recorded: Reproduced | +| T2 | TODO | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`: the outcome (today a failed check, exit `0`, per review) is observed, not assumed | +| T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) | Tests fail on current code; red output recorded | +| T4 | TODO | Fix: validate tracker URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | +| T5 | TODO | Green run and like-for-like recheck of V1 and V2 after the last production change | M1 and M3 commands give exit `2` + `invalid_configuration`, no panic | ## Commit Points | Task | Coherent change set | Commit policy | | ---- | ----------------------------------------------------- | ---------------------------------------------------- | -| T2 | Regression tests (red) | Commit after focused validation and required review. | -| T3 | Validation in config and fallible resolution | Commit after focused validation and required review. | -| T4 | Evidence update | Commit after focused validation and required review. | +| T2 | Reproduction evidence for the HTTP forms (V2) | Commit after focused validation and required review. | +| T3 | Regression tests (red) | Commit after focused validation and required review. | +| T4 | Validation in config and fallible resolution | Commit after focused validation and required review. | +| T5 | Evidence update | Commit after focused validation and required review. | ## Progress Tracking @@ -162,7 +164,8 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | | --- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------ | --------------------------------------------- | | M1 | Reproduce: UDP URL without port, without host, with wrong scheme, unresolvable host | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Panic record and `runtime_failure`, exit 1, empty stdout | DONE | `manual-verification-evidence.md` section V1 | -| M2 | Final like-for-like recheck of M1 after the last production change | The same commands as M1 | Exit `2` and one `invalid_configuration` record for AC1 and AC2; a failed check, no panic, for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | +| M3 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded (a failed check with exit 0 is expected today) | TODO | `manual-verification-evidence.md` section V2 | +| M2 | Final like-for-like recheck of M1 and M3 after the last production change | The same commands as M1 and M3 | Exit `2` and one `invalid_configuration` record for AC1 and AC2; a failed check, no panic, for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | Notes: @@ -182,6 +185,7 @@ Notes: ## Risks and Trade-offs - Rejecting a non-`udp` scheme in `udp_trackers` could break a configuration that worked by accident; no such entry can work today, because every one panics. +- Decision 2 changes working configurations: a wrong-scheme entry or an entry with no host in `http_trackers` or `health_checks` is a failed check with exit `0` today (`http.rs`, `health.rs`), and AC5 makes it exit `2`. An operator who ran such a configuration for monitoring would see it fail at startup. Mitigation: the error names the entry and the reason, and the change is called out in the implementation PR. ## Implementation Completion Review From 480ac7d43a176162a8468d37df3e6dbce7d7761e Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:39:44 +0000 Subject: [PATCH 16/41] docs(pr-reviews): [#2984] add round 3 findings F12 to F14 to the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 47 ++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 1abb3ad01..a98ddc8ec 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-21 16:03" +last-updated-utc: "2026-11-22 09:39" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 3 is da2ce7's APPROVED review `6011512347` (three inline findings, F12 to F14 in his numbering, kept here) on the head `docs(issues): [#2984] record the maintainer decisions on the open questions`. + Round 2 is da2ce7's APPROVED review `6006401735` (three inline findings, F9 to F11 in his numbering, kept here) on the head `docs(pr-reviews): [#2984] add the PR 2985 review audit`. Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 in his numbering) and Copilot's COMMENTED review `6006218464` (two inline findings, F7 and F8 here: his IDs F1 to F6 were kept, so Copilot's take the next ordinals), both on the first head, the commit `docs(issues): add issue specification for #2984`. @@ -60,6 +62,9 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F9 | `review-finding:pr-2985-f9` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | | F10 | `review-finding:pr-2985-f10` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | | F11 | `review-finding:pr-2985-f11` | Human | Nit | metadata | ORIGINAL | FIXED | RESOLVED | +| F12 | `review-finding:pr-2985-f12` | Human | Minor | documentation | ORIGINAL | FOLLOW_UP | OPEN | +| F13 | `review-finding:pr-2985-f13` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | +| F14 | `review-finding:pr-2985-f14` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | ## Finding Details @@ -206,11 +211,51 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4653507842 +### F12 - The decisions cite a record that does not exist, and a session date that disagrees with the log + +- PR number: 2985 +- Source review ID: 6011512347 +- Reviewer finding ID: da2ce7 F12 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657538043 +- Concern: The decisions section attributed both answers to a chat session dated 2026-11-22 as 'the session that created this issue' and named this PR's review thread as the record, but the thread held no such statement and the issue was created on 2026-11-21; `fix-bug` asks for evidence that does not rely on chat history. +- Solution: The date and source wording is corrected (answered in chat on 2026-11-22, one day after the issue was created; the chat is not a durable record; the decisions are the author's record). The durable record, a PR comment in which the maintainer restates both decisions, is the maintainer's to write; the spec will cite its URL when it exists. The thread stays open until then. +- Current-tree verification: Read the Decisions section of `ISSUE.md`: the wording is corrected and says the maintainer comment is still to be cited. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554361 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554361 + +### F13 - Decision 2 is not carried through the rest of the spec + +- PR number: 2985 +- Source review ID: 6011512347 +- Reviewer finding ID: da2ce7 F13 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657538044 +- Concern: The Goal, T1, the manual scenarios and Risks still covered only UDP, although decision 2 needs a new HTTP reproduction before the fix and changes working configurations to exit 2. +- Solution: The Goal covers HTTP and health-check URLs; T2 plans the HTTP reproduction; tasks and commit points are renumbered with T5 rechecking V1 and V2; M3 is the HTTP reproduction scenario and M2 rechecks both; Risks names the change to working configurations. +- Current-tree verification: Read the Goal, Implementation Plan, Commit Points, Manual Verification Scenarios and Risks sections of `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] carry decision 2 through the goal, plan, scenarios and risks` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554482 + +### F14 - The PR description still describes the spec as open questions + +- PR number: 2985 +- Source review ID: 6011512347 +- Reviewer finding ID: da2ce7 F14 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657538047 +- Concern: The PR description said the spec lists two open questions and covered only UDP entries, while the spec records both decisions and adds HTTP and health-check validation. +- Solution: The PR description was edited on 2026-11-22 at 09:38 UTC; its summary records the two decisions, AC5 and that the HTTP reproduction is planned. +- Current-tree verification: `gh pr view 2985 --json body` after the edit shows the new summary. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554587 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554587 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). - 2026-11-21 15:25 UTC - Round 1, continued: the eight threads were resolved after the validator run (`failures: 0`). GraphQL: 0 unresolved. - 2026-11-21 16:03 UTC - Round 2: da2ce7's APPROVED review `6006401735` (15:55:15Z, three findings F9 to F11). Three commits fixed them, one per finding (pushed, exit 0). Three replies were posted after the push, between 16:02:20Z and 16:02:24Z, and this record was updated after them. Threads resolved at 16:03Z after the validator run (`failures: 0`). GraphQL: 0 unresolved. +- 2026-11-22 09:40 UTC - Round 3: da2ce7's APPROVED review `6011512347` (09:33:14Z, three findings F12 to F14) on the head with the maintainer decisions. Two commits fixed F12's wording and F13 (pushed, exit 0); the PR description was edited for F14; three replies were posted after that, at 09:39Z. F12 is only partly fixed: the maintainer has to restate the decisions in a PR comment, so its thread stays open (FOLLOW_UP/OPEN). F13 and F14 threads are resolved after the validator run. From 4cf09d58edad1e04ba7673d21db3dfd41e64f6ef Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:40:36 +0000 Subject: [PATCH 17/41] docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index a98ddc8ec..50c33238b 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -255,7 +255,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). - 2026-11-21 15:25 UTC - Round 1, continued: the eight threads were resolved after the validator run (`failures: 0`). GraphQL: 0 unresolved. - 2026-11-21 16:03 UTC - Round 2: da2ce7's APPROVED review `6006401735` (15:55:15Z, three findings F9 to F11). Three commits fixed them, one per finding (pushed, exit 0). Three replies were posted after the push, between 16:02:20Z and 16:02:24Z, and this record was updated after them. Threads resolved at 16:03Z after the validator run (`failures: 0`). GraphQL: 0 unresolved. -- 2026-11-22 09:40 UTC - Round 3: da2ce7's APPROVED review `6011512347` (09:33:14Z, three findings F12 to F14) on the head with the maintainer decisions. Two commits fixed F12's wording and F13 (pushed, exit 0); the PR description was edited for F14; three replies were posted after that, at 09:39Z. F12 is only partly fixed: the maintainer has to restate the decisions in a PR comment, so its thread stays open (FOLLOW_UP/OPEN). F13 and F14 threads are resolved after the validator run. +- 2026-11-22 09:40 UTC - Round 3: da2ce7's APPROVED review `6011512347` (09:33:14Z, three findings F12 to F14) on the head with the maintainer decisions. Two commits fixed F12's wording and F13 (pushed, exit 0); the PR description was edited for F14; three replies were posted after that, between 09:38:33Z and 09:38:37Z. F12 is only partly fixed: the maintainer has to restate the decisions in a PR comment, so its thread stays open (FOLLOW_UP/OPEN). F13 and F14 threads are resolved after the validator run. From c9c2c52c44ee1e95b35bf1f66eabc011690fccde Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:52:30 +0000 Subject: [PATCH 18/41] docs(issues): [#2984] split the HTTP expectations by case: wrong scheme versus no host Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 655b0e97b..1eb3e8306 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -97,7 +97,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Status | Task | Notes / Expected Output | | --- | ------ | --------------------------------------------------------------------------- | ----------------------------------------------------------------- | | T1 | DONE | Reproduce the UDP forms on a real artifact and classify | V1 recorded: Reproduced | -| T2 | TODO | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`: the outcome (today a failed check, exit `0`, per review) is observed, not assumed | +| T2 | TODO | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`: each case is observed, not assumed. Known from a probe of the current binary on 2026-11-22: an entry that parses with a wrong scheme (`ftp://127.0.0.1`, `udp://127.0.0.1:6969`) is a failed check with exit `0`; `http:///` already fails to parse and exits `2` with `invalid_configuration` ("Invalid URL: empty host"), as does any `http` or `https` entry without a host | | T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) | Tests fail on current code; red output recorded | | T4 | TODO | Fix: validate tracker URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | | T5 | TODO | Green run and like-for-like recheck of V1 and V2 after the last production change | M1 and M3 commands give exit `2` + `invalid_configuration`, no panic | @@ -144,7 +144,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - [ ] AC2: `udp:///` (no host) and `http://127.0.0.1` / `ftp://127.0.0.1:6969` (wrong scheme) in `udp_trackers` give the same outcome - [ ] AC3: `udp://nonexistent.invalid:6969` does not panic; it is reported as a failed check for that tracker - [ ] AC4: Valid entries (`udp://127.0.0.1:6969`, `127.0.0.1:6969`, `udp://localhost:6969`, and `localhost:6969`, which has no scheme) behave as before -- [ ] AC5: In `http_trackers` and `health_checks`, an entry with no host or with a scheme other than `http` or `https` (for example `udp://127.0.0.1:6969`, `ftp://127.0.0.1`, `http:///`) gives exit `2` and one `invalid_configuration` record, and valid entries (`http://127.0.0.1:7070/announce`, `https://tracker.example.com`) behave as before +- [ ] AC5: In `http_trackers` and `health_checks`, an entry with no host or with a scheme other than `http` or `https` (for example `udp://127.0.0.1:6969` and `ftp://127.0.0.1`; `http:///` and other `http` or `https` entries without a host already give exit `2` from the URL parser and must keep doing so) gives exit `2` and one `invalid_configuration` record, and valid entries (`http://127.0.0.1:7070/announce`, `https://tracker.example.com`) behave as before - [ ] `linter all` exits with code `0` - [ ] Relevant tests pass - [ ] Manual verification scenarios are executed and documented in issue-local `manual-verification-evidence.md` @@ -164,7 +164,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | | --- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------ | --------------------------------------------- | | M1 | Reproduce: UDP URL without port, without host, with wrong scheme, unresolvable host | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Panic record and `runtime_failure`, exit 1, empty stdout | DONE | `manual-verification-evidence.md` section V1 | -| M3 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded (a failed check with exit 0 is expected today) | TODO | `manual-verification-evidence.md` section V2 | +| M3 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded: a failed check with exit 0 for the first two, exit 2 with `invalid_configuration` for `http:///` | TODO | `manual-verification-evidence.md` section V2 | | M2 | Final like-for-like recheck of M1 and M3 after the last production change | The same commands as M1 and M3 | Exit `2` and one `invalid_configuration` record for AC1 and AC2; a failed check, no panic, for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | Notes: @@ -185,7 +185,7 @@ Notes: ## Risks and Trade-offs - Rejecting a non-`udp` scheme in `udp_trackers` could break a configuration that worked by accident; no such entry can work today, because every one panics. -- Decision 2 changes working configurations: a wrong-scheme entry or an entry with no host in `http_trackers` or `health_checks` is a failed check with exit `0` today (`http.rs`, `health.rs`), and AC5 makes it exit `2`. An operator who ran such a configuration for monitoring would see it fail at startup. Mitigation: the error names the entry and the reason, and the change is called out in the implementation PR. +- Decision 2 changes working configurations: a wrong-scheme entry that parses (for example `ftp://127.0.0.1`) in `http_trackers` or `health_checks` is a failed check with exit `0` today (`http.rs`, `health.rs`), and AC5 makes it exit `2`; entries without a host already exit `2`. An operator who ran such a configuration for monitoring would see it fail at startup. Mitigation: the error names the entry and the reason, and the change is called out in the implementation PR. ## Implementation Completion Review From 20da01d647db7e43fcfc4134a4f60de2f523f93f Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:53:05 +0000 Subject: [PATCH 19/41] docs(issues): [#2984] align the recheck expectations with the cases they recheck Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 1eb3e8306..c56aa7641 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -100,7 +100,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | T2 | TODO | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`: each case is observed, not assumed. Known from a probe of the current binary on 2026-11-22: an entry that parses with a wrong scheme (`ftp://127.0.0.1`, `udp://127.0.0.1:6969`) is a failed check with exit `0`; `http:///` already fails to parse and exits `2` with `invalid_configuration` ("Invalid URL: empty host"), as does any `http` or `https` entry without a host | | T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) | Tests fail on current code; red output recorded | | T4 | TODO | Fix: validate tracker URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | -| T5 | TODO | Green run and like-for-like recheck of V1 and V2 after the last production change | M1 and M3 commands give exit `2` + `invalid_configuration`, no panic | +| T5 | TODO | Green run and like-for-like recheck of V1 and V2 after the last production change | M1 and M2 commands give exit `2` + `invalid_configuration` and no panic, except AC3's unresolvable host, which is a failed check and no panic | ## Commit Points @@ -164,8 +164,8 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | | --- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------ | --------------------------------------------- | | M1 | Reproduce: UDP URL without port, without host, with wrong scheme, unresolvable host | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Panic record and `runtime_failure`, exit 1, empty stdout | DONE | `manual-verification-evidence.md` section V1 | -| M3 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded: a failed check with exit 0 for the first two, exit 2 with `invalid_configuration` for `http:///` | TODO | `manual-verification-evidence.md` section V2 | -| M2 | Final like-for-like recheck of M1 and M3 after the last production change | The same commands as M1 and M3 | Exit `2` and one `invalid_configuration` record for AC1 and AC2; a failed check, no panic, for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | +| M2 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded: a failed check with exit 0 for the first two, exit 2 with `invalid_configuration` for `http:///` | TODO | `manual-verification-evidence.md` section V2 | +| M3 | Final like-for-like recheck of M1 and M2 after the last production change | The same commands as M1 and M2 | Exit `2` and one `invalid_configuration` record for AC1, AC2 and AC5; a failed check and no panic for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | Notes: From 241feac1f6248cf9df5057be447fa3f203267aba Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:53:44 +0000 Subject: [PATCH 20/41] docs(issues): [#2984] log the round 5 spec fixes and update last-updated-utc Co-Authored-By: Claude Sonnet 5.5 --- .../open/2984-tracker-client-check-udp-url-validation/ISSUE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index c56aa7641..68b74f31f 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 09:22" +last-updated-utc: "2026-11-22 09:53" semantic-links: skill-links: - create-issue @@ -137,6 +137,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - 2026-11-21 15:20 UTC - Claude Code (Claude Sonnet 5.5) - Round 1 review fixes (F1 to F6): result representation, no network-free claim, verbatim stderr, build and toolchain, M1/M2 split, raw-entry scheme check - PR 2985 audit - 2026-11-21 15:59 UTC - Claude Code (Claude Sonnet 5.5) - Round 2 review fixes (F9 to F11): scheme detection by `://` and `localhost:6969` in AC4, controls rerun verbatim, this log and `last-updated-utc` - PR 2985 audit - 2026-11-22 09:22 UTC - Claude Code (Claude Sonnet 5.5) - Recorded the maintainer's answers to both open questions as decisions: DNS failure is a failed check; the host and scheme validation also covers `http_trackers` and `health_checks` (new AC5) - PR 2985 +- 2026-11-22 09:53 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fixes (F15, F16): HTTP expectations split by case (wrong scheme versus no host), recheck expectations aligned and the recheck row moved last - PR 2985 audit ## Acceptance Criteria From 29b7b027b0493ab50e80cbdc083c2b7609585ede Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 09:56:35 +0000 Subject: [PATCH 21/41] docs(pr-reviews): [#2984] restore the round 3 log entry and append the correction --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 50c33238b..508b57cce 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 09:39" +last-updated-utc: "2026-11-22 09:56" --- @@ -255,7 +255,8 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). - 2026-11-21 15:25 UTC - Round 1, continued: the eight threads were resolved after the validator run (`failures: 0`). GraphQL: 0 unresolved. - 2026-11-21 16:03 UTC - Round 2: da2ce7's APPROVED review `6006401735` (15:55:15Z, three findings F9 to F11). Three commits fixed them, one per finding (pushed, exit 0). Three replies were posted after the push, between 16:02:20Z and 16:02:24Z, and this record was updated after them. Threads resolved at 16:03Z after the validator run (`failures: 0`). GraphQL: 0 unresolved. -- 2026-11-22 09:40 UTC - Round 3: da2ce7's APPROVED review `6011512347` (09:33:14Z, three findings F12 to F14) on the head with the maintainer decisions. Two commits fixed F12's wording and F13 (pushed, exit 0); the PR description was edited for F14; three replies were posted after that, between 09:38:33Z and 09:38:37Z. F12 is only partly fixed: the maintainer has to restate the decisions in a PR comment, so its thread stays open (FOLLOW_UP/OPEN). F13 and F14 threads are resolved after the validator run. +- 2026-11-22 09:40 UTC - Round 3: da2ce7's APPROVED review `6011512347` (09:33:14Z, three findings F12 to F14) on the head with the maintainer decisions. Two commits fixed F12's wording and F13 (pushed, exit 0); the PR description was edited for F14; three replies were posted after that, at 09:39Z. F12 is only partly fixed: the maintainer has to restate the decisions in a PR comment, so its thread stays open (FOLLOW_UP/OPEN). F13 and F14 threads are resolved after the validator run. +- 2026-11-22 09:56 UTC - Correction: the round 3 entry stamped 2026-11-22 09:40 UTC was rewritten in place by an earlier commit (`docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`), which replaced "at 09:39Z" with "between 09:38:33Z and 09:38:37Z". That entry is restored to its first wording above. The reply times are the second wording: the three round 3 replies were posted between 09:38:33Z and 09:38:37Z, by the capture of the review comments. From 402f41225a06a2b0a371e1fdf2360e9531ae84e4 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:01:45 +0000 Subject: [PATCH 22/41] docs(issues): [#2984] plan the update of the existing panic-contract test Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 68b74f31f..5eacf36c7 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 09:53" +last-updated-utc: "2026-11-22 10:00" semantic-links: skill-links: - create-issue @@ -98,7 +98,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | --- | ------ | --------------------------------------------------------------------------- | ----------------------------------------------------------------- | | T1 | DONE | Reproduce the UDP forms on a real artifact and classify | V1 recorded: Reproduced | | T2 | TODO | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`: each case is observed, not assumed. Known from a probe of the current binary on 2026-11-22: an entry that parses with a wrong scheme (`ftp://127.0.0.1`, `udp://127.0.0.1:6969`) is a failed check with exit `0`; `http:///` already fails to parse and exits `2` with `invalid_configuration` ("Invalid URL: empty host"), as does any `http` or `https` entry without a host | -| T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) | Tests fail on current code; red output recorded | +| T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) and update the existing test that relies on the bug | Tests fail on current code; red output recorded. The existing test `it_should_report_a_panic_as_a_json_record_and_leave_stdout_empty` (`console/tracker-client/tests/output_contract.rs:161-179`) uses `udp://127.0.0.1` and requires exit `1` with `panic` and `runtime_failure` records; it fails after the fix, so it is changed to the configuration-error expectations (exit `2`, `invalid_configuration`) and the panic-hook coverage it gave is kept by a separate, controlled trigger chosen in the implementation (a missing-port URL or an unresolvable host can no longer be the trigger) | | T4 | TODO | Fix: validate tracker URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | | T5 | TODO | Green run and like-for-like recheck of V1 and V2 after the last production change | M1 and M2 commands give exit `2` + `invalid_configuration` and no panic, except AC3's unresolvable host, which is a failed check and no panic | @@ -107,7 +107,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | Task | Coherent change set | Commit policy | | ---- | ----------------------------------------------------- | ---------------------------------------------------- | | T2 | Reproduction evidence for the HTTP forms (V2) | Commit after focused validation and required review. | -| T3 | Regression tests (red) | Commit after focused validation and required review. | +| T3 | Regression tests (red) and the update of the existing panic-contract test | Commit after focused validation and required review. | | T4 | Validation in config and fallible resolution | Commit after focused validation and required review. | | T5 | Evidence update | Commit after focused validation and required review. | @@ -138,6 +138,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - 2026-11-21 15:59 UTC - Claude Code (Claude Sonnet 5.5) - Round 2 review fixes (F9 to F11): scheme detection by `://` and `localhost:6969` in AC4, controls rerun verbatim, this log and `last-updated-utc` - PR 2985 audit - 2026-11-22 09:22 UTC - Claude Code (Claude Sonnet 5.5) - Recorded the maintainer's answers to both open questions as decisions: DNS failure is a failed check; the host and scheme validation also covers `http_trackers` and `health_checks` (new AC5) - PR 2985 - 2026-11-22 09:53 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fixes (F15, F16): HTTP expectations split by case (wrong scheme versus no host), recheck expectations aligned and the recheck row moved last - PR 2985 audit +- 2026-11-22 10:00 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fix (Copilot F18): the plan now updates the existing panic-contract test and keeps panic-hook coverage by another trigger - PR 2985 audit ## Acceptance Criteria From bfe4e17f3a153747de610942a3d49be08f8970a5 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:02:21 +0000 Subject: [PATCH 23/41] docs(pr-reviews): [#2984] add round 4 findings F15 to F17 to the PR 2985 audit --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 47 ++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 508b57cce..833017890 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 09:56" +last-updated-utc: "2026-11-22 09:59" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 4 is da2ce7's COMMENTED review `6011571146` (three inline findings, F15 to F17 in his numbering, kept here) on the head `docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`. + Round 3 is da2ce7's APPROVED review `6011512347` (three inline findings, F12 to F14 in his numbering, kept here) on the head `docs(issues): [#2984] record the maintainer decisions on the open questions`. Round 2 is da2ce7's APPROVED review `6006401735` (three inline findings, F9 to F11 in his numbering, kept here) on the head `docs(pr-reviews): [#2984] add the PR 2985 review audit`. @@ -65,6 +67,9 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F12 | `review-finding:pr-2985-f12` | Human | Minor | documentation | ORIGINAL | FOLLOW_UP | OPEN | | F13 | `review-finding:pr-2985-f13` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | | F14 | `review-finding:pr-2985-f14` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | +| F15 | `review-finding:pr-2985-f15` | Human | Minor | correctness | ORIGINAL | FIXED | RESOLVED | +| F16 | `review-finding:pr-2985-f16` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | +| F17 | `review-finding:pr-2985-f17` | Human | Nit | maintainability | ORIGINAL | FIXED | RESOLVED | ## Finding Details @@ -250,6 +255,45 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554587 +### F15 - Entries without a host already fail with exit 2 today, not as a failed check + +- PR number: 2985 +- Source review ID: 6011571146 +- Reviewer finding ID: da2ce7 F15 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657593099 +- Concern: The spec said a no-host entry in http_trackers or health_checks is a failed check with exit 0 today, but `http:///` and other http or https entries without a host fail to parse and already exit 2; only parsing entries with a wrong scheme reach a failed check. +- Solution: T2, AC5, scenario M2 and the Risks bullet split the cases: wrong scheme that parses is a failed check with exit 0 today; no-host http or https entries already exit 2 and must keep doing so. +- Current-tree verification: Ran the current binary with `http:///` (exit 2, `invalid_configuration`, empty host), `ftp://127.0.0.1` and `udp://127.0.0.1:6969` (failed checks, exit 0) in `http_trackers`; read the four places in `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] split the HTTP expectations by case: wrong scheme versus no host` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657620398 + +### F16 - The recheck expectations do not match the cases they recheck + +- PR number: 2985 +- Source review ID: 6011571146 +- Reviewer finding ID: da2ce7 F16 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657593103 +- Concern: The recheck row named only AC1 to AC3 although it also rechecked the HTTP cases, T5 expected exit 2 for every UDP command although AC3 is a failed check, and the recheck row was not last. +- Solution: The recheck row names AC1, AC2 and AC5 as exit 2 and AC3 as a failed check; T5 carves out AC3; the HTTP reproduction is M2 and the recheck M3. +- Current-tree verification: Read the scenarios table and T5 in `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] align the recheck expectations with the cases they recheck` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657620519 + +### F17 - The reply-time correction rewrote this Processing Log entry in place + +- PR number: 2985 +- Source review ID: 6011571146 +- Reviewer finding ID: da2ce7 F17 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657593105 +- Concern: A commit changed a reply time inside an existing Processing Log entry, which is append-only. +- Solution: The round 3 entry is restored to its first wording and a correction entry names the rewritten content, the commit that rewrote it and the correct reply times. +- Current-tree verification: Read the Processing Log of this record. +- Resolution reference: `docs(pr-reviews): [#2984] restore the round 3 log entry and append the correction` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657620646 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). @@ -257,6 +301,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-21 16:03 UTC - Round 2: da2ce7's APPROVED review `6006401735` (15:55:15Z, three findings F9 to F11). Three commits fixed them, one per finding (pushed, exit 0). Three replies were posted after the push, between 16:02:20Z and 16:02:24Z, and this record was updated after them. Threads resolved at 16:03Z after the validator run (`failures: 0`). GraphQL: 0 unresolved. - 2026-11-22 09:40 UTC - Round 3: da2ce7's APPROVED review `6011512347` (09:33:14Z, three findings F12 to F14) on the head with the maintainer decisions. Two commits fixed F12's wording and F13 (pushed, exit 0); the PR description was edited for F14; three replies were posted after that, at 09:39Z. F12 is only partly fixed: the maintainer has to restate the decisions in a PR comment, so its thread stays open (FOLLOW_UP/OPEN). F13 and F14 threads are resolved after the validator run. - 2026-11-22 09:56 UTC - Correction: the round 3 entry stamped 2026-11-22 09:40 UTC was rewritten in place by an earlier commit (`docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`), which replaced "at 09:39Z" with "between 09:38:33Z and 09:38:37Z". That entry is restored to its first wording above. The reply times are the second wording: the three round 3 replies were posted between 09:38:33Z and 09:38:37Z, by the capture of the review comments. +- 2026-11-22 09:59 UTC - Round 4: da2ce7's COMMENTED review `6011571146` (09:50:29Z, three findings F15 to F17; no ACK while the F12 thread is open). Three commits fixed them (pushed, exit 0), a probe of the current binary checked the F15 claim, and three replies were posted after the push at about 09:58Z (the F16 reply was edited once at 09:59Z to fix row names). Threads resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. From a4f410bed38033d6d6439c3eb7a81430247c2c84 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:06:29 +0000 Subject: [PATCH 24/41] docs(pr-reviews): [#2984] add round 5 findings F18 and F19 to the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 33 ++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 833017890..c7da4691e 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 09:59" +last-updated-utc: "2026-11-22 10:05" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 5 is Copilot's COMMENTED review `6011585846` (09:54:58Z, two inline findings, F18 and F19 here; F19 re-raises F16) on the head `docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`; it was submitted during round 4 and found when the threads were listed before resolving. + Round 4 is da2ce7's COMMENTED review `6011571146` (three inline findings, F15 to F17 in his numbering, kept here) on the head `docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`. Round 3 is da2ce7's APPROVED review `6011512347` (three inline findings, F12 to F14 in his numbering, kept here) on the head `docs(issues): [#2984] record the maintainer decisions on the open questions`. @@ -70,6 +72,8 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F15 | `review-finding:pr-2985-f15` | Human | Minor | correctness | ORIGINAL | FIXED | RESOLVED | | F16 | `review-finding:pr-2985-f16` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | | F17 | `review-finding:pr-2985-f17` | Human | Nit | maintainability | ORIGINAL | FIXED | RESOLVED | +| F18 | `review-finding:pr-2985-f18` | Copilot | Minor (inferred) | testing | ORIGINAL | FIXED | RESOLVED | +| F19 | `review-finding:pr-2985-f19` | Copilot | Minor (inferred) | correctness | RE_RAISE_OF:F16 | NO_ACTION | SUPERSEDED | ## Finding Details @@ -294,6 +298,32 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657620646 +### F18 - The test plan omits an existing test that fails after the fix + +- PR number: 2985 +- Source review ID: 6011585846 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657607015 +- Concern: `console/tracker-client/tests/output_contract.rs:161-179` uses `udp://127.0.0.1` and requires exit 1 with `panic` and `runtime_failure` records, so it fails once the fix lands, and the plan had no task for it. +- Solution: T3 and its commit point now update that test to the configuration-error expectations (exit 2, `invalid_configuration`) and keep the panic-hook coverage through a separate, controlled trigger chosen in the implementation. +- Current-tree verification: Read T3 and the Commit Points in `ISSUE.md`; `sed -n 150,185p console/tracker-client/tests/output_contract.rs` shows the test as described. +- Resolution reference: `docs(issues): [#2984] plan the update of the existing panic-contract test` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657638058 + +### F19 - T5 requires every M1 command to exit 2 although the unresolvable host is a failed check + +- PR number: 2985 +- Source review ID: 6011585846 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657607029 +- Concern: Copilot, reviewing head `4cf09d58e`, said T5 expected exit 2 for every M1 command although AC3 is a failed check with exit 0. +- Solution: No new change: the same concern was raised as F16 and fixed in `docs(issues): [#2984] align the recheck expectations with the cases they recheck`, pushed after the head Copilot reviewed. The reply is `Superseded by F16: ...`. +- Current-tree verification: Read T5 and the scenarios table in `ISSUE.md`: AC3 is carved out of the exit 2 expectation. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657638201 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657638201 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). @@ -302,6 +332,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 09:40 UTC - Round 3: da2ce7's APPROVED review `6011512347` (09:33:14Z, three findings F12 to F14) on the head with the maintainer decisions. Two commits fixed F12's wording and F13 (pushed, exit 0); the PR description was edited for F14; three replies were posted after that, at 09:39Z. F12 is only partly fixed: the maintainer has to restate the decisions in a PR comment, so its thread stays open (FOLLOW_UP/OPEN). F13 and F14 threads are resolved after the validator run. - 2026-11-22 09:56 UTC - Correction: the round 3 entry stamped 2026-11-22 09:40 UTC was rewritten in place by an earlier commit (`docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`), which replaced "at 09:39Z" with "between 09:38:33Z and 09:38:37Z". That entry is restored to its first wording above. The reply times are the second wording: the three round 3 replies were posted between 09:38:33Z and 09:38:37Z, by the capture of the review comments. - 2026-11-22 09:59 UTC - Round 4: da2ce7's COMMENTED review `6011571146` (09:50:29Z, three findings F15 to F17; no ACK while the F12 thread is open). Three commits fixed them (pushed, exit 0), a probe of the current binary checked the F15 claim, and three replies were posted after the push at about 09:58Z (the F16 reply was edited once at 09:59Z to fix row names). Threads resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. +- 2026-11-22 10:05 UTC - Round 5: Copilot's COMMENTED review `6011585846` (09:54:58Z, two findings F18 and F19), found while resolving round 4 threads (it arrived while round 4 was processed, so I should have listed all reviews before recording round 4). One commit fixed F18 (pushed, exit 0); F19 re-raises F16, already fixed. Replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN. From a7c5f66343007df6f6c911500545f7c85cfaf765 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:18:16 +0000 Subject: [PATCH 25/41] docs(issues): [#2984] record the HTTP reproduction as V2 with its verbatim output Co-Authored-By: Claude Sonnet 5.5 --- .../ISSUE.md | 6 +- .../manual-verification-evidence.md | 80 ++++++++++++++++++- 2 files changed, 82 insertions(+), 4 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index 5eacf36c7..daa19bfef 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 10:00" +last-updated-utc: "2026-11-22 10:18" semantic-links: skill-links: - create-issue @@ -97,7 +97,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Status | Task | Notes / Expected Output | | --- | ------ | --------------------------------------------------------------------------- | ----------------------------------------------------------------- | | T1 | DONE | Reproduce the UDP forms on a real artifact and classify | V1 recorded: Reproduced | -| T2 | TODO | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`: each case is observed, not assumed. Known from a probe of the current binary on 2026-11-22: an entry that parses with a wrong scheme (`ftp://127.0.0.1`, `udp://127.0.0.1:6969`) is a failed check with exit `0`; `http:///` already fails to parse and exits `2` with `invalid_configuration` ("Invalid URL: empty host"), as does any `http` or `https` entry without a host | +| T2 | DONE | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`, outcome Reproduced: an entry that parses with a wrong scheme (`ftp://127.0.0.1`, `udp://127.0.0.1:6969`) is a failed check with exit `0`; `http:///` already fails to parse and exits `2` with `invalid_configuration` ("Invalid URL: empty host"), as does any `http` or `https` entry without a host (same for `health_checks`) | | T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) and update the existing test that relies on the bug | Tests fail on current code; red output recorded. The existing test `it_should_report_a_panic_as_a_json_record_and_leave_stdout_empty` (`console/tracker-client/tests/output_contract.rs:161-179`) uses `udp://127.0.0.1` and requires exit `1` with `panic` and `runtime_failure` records; it fails after the fix, so it is changed to the configuration-error expectations (exit `2`, `invalid_configuration`) and the panic-hook coverage it gave is kept by a separate, controlled trigger chosen in the implementation (a missing-port URL or an unresolvable host can no longer be the trigger) | | T4 | TODO | Fix: validate tracker URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | | T5 | TODO | Green run and like-for-like recheck of V1 and V2 after the last production change | M1 and M2 commands give exit `2` + `invalid_configuration` and no panic, except AC3's unresolvable host, which is a failed check and no panic | @@ -166,7 +166,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | | --- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------ | --------------------------------------------- | | M1 | Reproduce: UDP URL without port, without host, with wrong scheme, unresolvable host | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Panic record and `runtime_failure`, exit 1, empty stdout | DONE | `manual-verification-evidence.md` section V1 | -| M2 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded: a failed check with exit 0 for the first two, exit 2 with `invalid_configuration` for `http:///` | TODO | `manual-verification-evidence.md` section V2 | +| M2 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded: a failed check with exit 0 for the first two, exit 2 with `invalid_configuration` for `http:///` | DONE | `manual-verification-evidence.md` section V2 | | M3 | Final like-for-like recheck of M1 and M2 after the last production change | The same commands as M1 and M2 | Exit `2` and one `invalid_configuration` record for AC1, AC2 and AC5; a failed check and no panic for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | Notes: diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md index 59e3440ff..fdc96ae7f 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md @@ -1,7 +1,7 @@ --- doc-type: manual-verification-evidence issue-spec: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md -last-updated-utc: "2026-11-21 15:59" +last-updated-utc: "2026-11-22 10:18" --- # Manual Verification Evidence @@ -98,3 +98,81 @@ Stdout was empty (0 bytes) in every case above. #### Conclusion Reproduced. The `unwrap` at `checks/udp.rs:107` is reached for every UDP URL without a resolvable address; URLs that fail to parse already get the expected exit `2`. + +### V2 - Reproduction of the HTTP forms (before the fix) + +- Goal: observe what `http_trackers` and `health_checks` entries with a wrong scheme or no host do today (decision 2 of the spec). +- Initial state: the same binary and code as V1 (`develop` commit `7bc30738a`; `git diff --stat 7bc30738a -- console packages` prints nothing). Run at 2026-11-22 10:17:57 UTC. +- Status: `DONE` +- Outcome: **Reproduced**: an entry with a wrong scheme that parses is accepted and checked (exit `0`) instead of being rejected as a configuration error (exit `2`). An entry with no host is already rejected with exit `2`. + +#### Steps Performed + +For each list (`http_trackers`, `health_checks`) and each `` below, with the URL in that list and the other two lists empty: + +```bash +TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' \ + ./target/debug/tracker_client check | cat +``` + +#### Observed Result + +Each block is the exit code, stdout size, stdout and stderr of one run, verbatim. + +`http_trackers ftp://127.0.0.1`: + +```text +exit=0 stdout_bytes=640 +--stdout +{"results":[{"Http":{"Err":{"url":"ftp://127.0.0.1/","results":[["Announce",{"Err":"Http request did not receive a response within the timeout: ResponseError { err: reqwest::Error { kind: Builder, url: \"ftp://127.0.0.1/announce?info_hash=%9C8B%22%13%E3%0B%FF%21%2B0%C3%60%D2o%9A%02%13d%22&peer_id=%2DqB00000000000000001&port=17548&event=started&compact=0\", source: BadScheme } }"}],["Scrape",{"Err":"Http request did not receive a response within the timeout: ResponseError { err: reqwest::Error { kind: Builder, url: \"ftp://127.0.0.1/scrape?info_hash=%9C8B%22%13%E3%0B%FF%21%2B0%C3%60%D2o%9A%02%13d%22\", source: BadScheme } }"}]]}}}]} +--stderr +``` + +`http_trackers udp://127.0.0.1:6969`: + +```text +exit=0 stdout_bytes=654 +--stdout +{"results":[{"Http":{"Err":{"url":"udp://127.0.0.1:6969","results":[["Announce",{"Err":"Http request did not receive a response within the timeout: ResponseError { err: reqwest::Error { kind: Builder, url: \"udp://127.0.0.1:6969/announce?info_hash=%9C8B%22%13%E3%0B%FF%21%2B0%C3%60%D2o%9A%02%13d%22&peer_id=%2DqB00000000000000001&port=17548&event=started&compact=0\", source: BadScheme } }"}],["Scrape",{"Err":"Http request did not receive a response within the timeout: ResponseError { err: reqwest::Error { kind: Builder, url: \"udp://127.0.0.1:6969/scrape?info_hash=%9C8B%22%13%E3%0B%FF%21%2B0%C3%60%D2o%9A%02%13d%22\", source: BadScheme } }"}]]}}}]} +--stderr +``` + +`http_trackers http:///`: + +```text +exit=2 stdout_bytes=0 +--stdout +--stderr +{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: empty host"}} +``` + +`health_checks ftp://127.0.0.1`: + +```text +exit=0 stdout_bytes=196 +--stdout +{"results":[{"Health":{"Err":{"url":"ftp://127.0.0.1/","result":{"Err":"Heath check failed to get a response: reqwest::Error { kind: Builder, url: \"ftp://127.0.0.1/\", source: BadScheme }"}}}}]} +--stderr +``` + +`health_checks udp://127.0.0.1:6969`: + +```text +exit=0 stdout_bytes=204 +--stdout +{"results":[{"Health":{"Err":{"url":"udp://127.0.0.1:6969","result":{"Err":"Heath check failed to get a response: reqwest::Error { kind: Builder, url: \"udp://127.0.0.1:6969\", source: BadScheme }"}}}}]} +--stderr +``` + +`health_checks http:///`: + +```text +exit=2 stdout_bytes=0 +--stdout +--stderr +{"error":{"kind":"invalid_configuration","source":"TORRUST_CHECKER_CONFIG","message":"Invalid URL: empty host"}} +``` + +#### Conclusion + +Wrong-scheme entries that parse (`ftp://`, `udp://`) are checked as if they were HTTP and fail at run time with exit `0`; `http:///` is already a configuration error with exit `2` (`Invalid URL: empty host`). AC5 therefore changes the first case and must keep the second. From a7fc1bde7b1959aea1d35940b3f779bd6f52f469 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:19:06 +0000 Subject: [PATCH 26/41] docs(issues): [#2984] say where the replacement panic-hook coverage may live Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index daa19bfef..d3e8422b2 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 10:18" +last-updated-utc: "2026-11-22 10:19" semantic-links: skill-links: - create-issue @@ -88,7 +88,7 @@ Follows `.claude/skills/fix-bug/SKILL.md`: ## Regression Test Strategy -Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme, plus the same host and scheme cases for `http_trackers` and `health_checks`. The scheme check reads the raw entry before the `udp://` prefix is added (`config.rs:65`) and detects a scheme by the `://` separator, so the forms without a scheme `127.0.0.1:6969` and `localhost:6969` (which a URL parser alone would read as scheme `localhost`) stay valid; without that, `ftp://127.0.0.1:6969` becomes `udp://ftp://127.0.0.1:6969`, whose host is `ftp` with no port, and the no-port check would reject it. The scheme test therefore asserts the error reason (wrong scheme), not only that an error is returned. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. Red/green output goes to `manual-verification-evidence.md`. +Unit tests at the causal seam, `TryFrom for Configuration` in `config.rs`, one per case: no port, no host, non-`udp` scheme, plus the same host and scheme cases for `http_trackers` and `health_checks`. The scheme check reads the raw entry before the `udp://` prefix is added (`config.rs:65`) and detects a scheme by the `://` separator, so the forms without a scheme `127.0.0.1:6969` and `localhost:6969` (which a URL parser alone would read as scheme `localhost`) stay valid; without that, `ftp://127.0.0.1:6969` becomes `udp://ftp://127.0.0.1:6969`, whose host is `ftp` with no port, and the no-port check would reject it. The scheme test therefore asserts the error reason (wrong scheme), not only that an error is returned. A unit test for `resolve_socket_addr` returning an error (not panicking) for an unresolvable host. The configuration cases are deterministic and need no network. The unresolvable-host case goes through the system resolver, so it only asserts that an error is returned, not which one; it does not claim to be network-free (a resolver that rewrites "name not found" answers could resolve a `.invalid` name), unless the implementation injects the resolution step, which it may do instead. The existing end-to-end test that relied on the bug is rewritten to the configuration-error expectations, and its panic-hook coverage moves to a unit test of a seam inside `output.rs` (not a binary path that panics on demand, which would contradict the Goal). Red/green output goes to `manual-verification-evidence.md`. ## Implementation Plan @@ -98,7 +98,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | --- | ------ | --------------------------------------------------------------------------- | ----------------------------------------------------------------- | | T1 | DONE | Reproduce the UDP forms on a real artifact and classify | V1 recorded: Reproduced | | T2 | DONE | Reproduce the HTTP forms (wrong scheme, no host in `http_trackers` and `health_checks`) on a real artifact and classify | V2 recorded in `manual-verification-evidence.md`, outcome Reproduced: an entry that parses with a wrong scheme (`ftp://127.0.0.1`, `udp://127.0.0.1:6969`) is a failed check with exit `0`; `http:///` already fails to parse and exits `2` with `invalid_configuration` ("Invalid URL: empty host"), as does any `http` or `https` entry without a host (same for `health_checks`) | -| T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) and update the existing test that relies on the bug | Tests fail on current code; red output recorded. The existing test `it_should_report_a_panic_as_a_json_record_and_leave_stdout_empty` (`console/tracker-client/tests/output_contract.rs:161-179`) uses `udp://127.0.0.1` and requires exit `1` with `panic` and `runtime_failure` records; it fails after the fix, so it is changed to the configuration-error expectations (exit `2`, `invalid_configuration`) and the panic-hook coverage it gave is kept by a separate, controlled trigger chosen in the implementation (a missing-port URL or an unresolvable host can no longer be the trigger) | +| T3 | TODO | Add regression tests (UDP and HTTP config validation cases, unresolvable-host case) and update the existing test that relies on the bug | Tests fail on current code; red output recorded. The existing test `it_should_report_a_panic_as_a_json_record_and_leave_stdout_empty` (`console/tracker-client/tests/output_contract.rs:161-179`) uses `udp://127.0.0.1` and requires exit `1` with `panic` and `runtime_failure` records; it fails after the fix, so it is changed to the configuration-error expectations (exit `2`, `invalid_configuration`) and the panic-hook coverage it gave is kept through a seam inside `console/tracker-client/src/console/clients/unified/output.rs` (`install_panic_hook`, lines 61-74), such as a record-building function that the hook calls and a unit test exercises, not through a production path that panics on demand (a missing-port URL or an unresolvable host can no longer be the trigger) | | T4 | TODO | Fix: validate tracker URLs in config; make `resolve_socket_addr` fallible | Regression tests pass; no `unwrap` on user input in `udp.rs` | | T5 | TODO | Green run and like-for-like recheck of V1 and V2 after the last production change | M1 and M2 commands give exit `2` + `invalid_configuration` and no panic, except AC3's unresolvable host, which is a failed check and no panic | From cf14c8e778234c8b953ca9e780432857dd4d7699 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:19:51 +0000 Subject: [PATCH 27/41] docs(pr-reviews): [#2984] cite the reviewed head by subject in finding F19 Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index c7da4691e..f82ffbf7f 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -317,7 +317,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Source review ID: 6011585846 - Reviewer finding ID: N/A - Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657607029 -- Concern: Copilot, reviewing head `4cf09d58e`, said T5 expected exit 2 for every M1 command although AC3 is a failed check with exit 0. +- Concern: Copilot, reviewing the head `docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`, said T5 expected exit 2 for every M1 command although AC3 is a failed check with exit 0. - Solution: No new change: the same concern was raised as F16 and fixed in `docs(issues): [#2984] align the recheck expectations with the cases they recheck`, pushed after the head Copilot reviewed. The reply is `Superseded by F16: ...`. - Current-tree verification: Read T5 and the scenarios table in `ISSUE.md`: AC3 is carved out of the exit 2 expectation. - Resolution reference: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657638201 From 8aa45541ec3548fddfaa4f9b18e813b8ded93d9c Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:20:35 +0000 Subject: [PATCH 28/41] docs(pr-reviews): [#2984] append the correction for the round 4 reply times Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index f82ffbf7f..43ae2bcfd 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 10:05" +last-updated-utc: "2026-11-22 10:20" --- @@ -333,6 +333,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 09:56 UTC - Correction: the round 3 entry stamped 2026-11-22 09:40 UTC was rewritten in place by an earlier commit (`docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`), which replaced "at 09:39Z" with "between 09:38:33Z and 09:38:37Z". That entry is restored to its first wording above. The reply times are the second wording: the three round 3 replies were posted between 09:38:33Z and 09:38:37Z, by the capture of the review comments. - 2026-11-22 09:59 UTC - Round 4: da2ce7's COMMENTED review `6011571146` (09:50:29Z, three findings F15 to F17; no ACK while the F12 thread is open). Three commits fixed them (pushed, exit 0), a probe of the current binary checked the F15 claim, and three replies were posted after the push at about 09:58Z (the F16 reply was edited once at 09:59Z to fix row names). Threads resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. - 2026-11-22 10:05 UTC - Round 5: Copilot's COMMENTED review `6011585846` (09:54:58Z, two findings F18 and F19), found while resolving round 4 threads (it arrived while round 4 was processed, so I should have listed all reviews before recording round 4). One commit fixed F18 (pushed, exit 0); F19 re-raises F16, already fixed. Replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN. +- 2026-11-22 10:20 UTC - Correction (round 4 entry): that entry says the three replies were posted "at about 09:58Z". The capture has them at 09:59:24Z, 09:59:27Z and 09:59:29Z (the F16 edit at 09:59:51Z is as logged). The entry is not rewritten; these are the correct times. From bdcc7a307dbb18d4f2e652334325e27446cf48d3 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:21:08 +0000 Subject: [PATCH 29/41] docs(issues): [#2984] log the round 6 spec changes --- .../open/2984-tracker-client-check-udp-url-validation/ISSUE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index d3e8422b2..fa64a9ae5 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 10:19" +last-updated-utc: "2026-11-22 10:21" semantic-links: skill-links: - create-issue @@ -139,6 +139,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - 2026-11-22 09:22 UTC - Claude Code (Claude Sonnet 5.5) - Recorded the maintainer's answers to both open questions as decisions: DNS failure is a failed check; the host and scheme validation also covers `http_trackers` and `health_checks` (new AC5) - PR 2985 - 2026-11-22 09:53 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fixes (F15, F16): HTTP expectations split by case (wrong scheme versus no host), recheck expectations aligned and the recheck row moved last - PR 2985 audit - 2026-11-22 10:00 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fix (Copilot F18): the plan now updates the existing panic-contract test and keeps panic-hook coverage by another trigger - PR 2985 audit +- 2026-11-22 10:21 UTC - Claude Code (Claude Sonnet 5.5) - Round 6 review fixes (F21, F23): the HTTP reproduction is recorded as V2 with its verbatim output (T2 and M2 done) and the replacement panic-hook coverage is placed in a seam inside `output.rs` - PR 2985 audit ## Acceptance Criteria From 987e85c67ecf376e406b1976499f02da7a860755 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:25:23 +0000 Subject: [PATCH 30/41] docs(pr-reviews): [#2984] add round 6 findings F20 to F23 to the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 61 ++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 43ae2bcfd..4e49d1619 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 10:20" +last-updated-utc: "2026-11-22 10:24" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 6 is da2ce7's COMMENTED review `6011655297` (four inline findings, F20 to F23, numbered after the record's F19) on the head `docs(pr-reviews): [#2984] add round 5 findings F18 and F19 to the PR 2985 audit`. Copilot's COMMENTED review `6011678308` (10:20:41Z, same head) has no inline comment and no open issue; its summary mentions omitted findings about test-design review checkpoints and exit-code verification evidence that are not retrievable, so it gets no row. + Round 5 is Copilot's COMMENTED review `6011585846` (09:54:58Z, two inline findings, F18 and F19 here; F19 re-raises F16) on the head `docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`; it was submitted during round 4 and found when the threads were listed before resolving. Round 4 is da2ce7's COMMENTED review `6011571146` (three inline findings, F15 to F17 in his numbering, kept here) on the head `docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`. @@ -74,6 +76,10 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F17 | `review-finding:pr-2985-f17` | Human | Nit | maintainability | ORIGINAL | FIXED | RESOLVED | | F18 | `review-finding:pr-2985-f18` | Copilot | Minor (inferred) | testing | ORIGINAL | FIXED | RESOLVED | | F19 | `review-finding:pr-2985-f19` | Copilot | Minor (inferred) | correctness | RE_RAISE_OF:F16 | NO_ACTION | SUPERSEDED | +| F20 | `review-finding:pr-2985-f20` | Human | Minor | link-integrity | ORIGINAL | FIXED | RESOLVED | +| F21 | `review-finding:pr-2985-f21` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | +| F22 | `review-finding:pr-2985-f22` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | +| F23 | `review-finding:pr-2985-f23` | Human | Suggestion | maintainability | ORIGINAL | FIXED | RESOLVED | ## Finding Details @@ -324,6 +330,58 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657638201 +### F20 - The audit cites the PR-branch commit 4cf09d58e by id + +- PR number: 2985 +- Source review ID: 6011655297 +- Reviewer finding ID: da2ce7 F20 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657671572 +- Concern: Line 320 of the audit and the F19 reply cited a PR-branch commit by id; durable references must cite the Conventional Commit subject because a rebase orphans ids. +- Solution: Both now name the head by its subject. +- Current-tree verification: The skill's commit-id check against `torrust/develop` prints nothing at the head after the fix. +- Resolution reference: `docs(pr-reviews): [#2984] cite the reviewed head by subject in finding F19` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657695990 + +### F21 - T2 cites a probe of the binary that the evidence file does not record + +- PR number: 2985 +- Source review ID: 6011655297 +- Reviewer finding ID: da2ce7 F21 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657671577 +- Concern: T2, the F15 reply and its row cited a run that `manual-verification-evidence.md` did not hold. +- Solution: The HTTP cases were run again for both lists and recorded as V2 with the commands and verbatim output; T2 and M2 are done and cite V2. +- Current-tree verification: Read V2 in the evidence file and T2 in `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] record the HTTP reproduction as V2 with its verbatim output` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657696142 + +### F22 - The round-4 entry puts the replies at about 09:58Z; the capture has them at 09:59:24Z to 09:59:29Z + +- PR number: 2985 +- Source review ID: 6011655297 +- Reviewer finding ID: da2ce7 F22 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657671579 +- Concern: The round 4 Processing Log entry gave an approximate reply time that disagrees with the captured `created_at` values. +- Solution: A correction entry is appended with the captured times; the round 4 entry is not rewritten. +- Current-tree verification: Read the Processing Log of this record. +- Resolution reference: `docs(pr-reviews): [#2984] append the correction for the round 4 reply times` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657696253 + +### F23 - Say where the replacement panic-hook trigger may live + +- PR number: 2985 +- Source review ID: 6011655297 +- Reviewer finding ID: da2ce7 F23 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657671584 +- Concern: A separate controlled trigger in the binary would be a production path that panics on demand; the Regression Test Strategy did not mention the test change. +- Solution: T3 and the Regression Test Strategy place the coverage in a unit test of a seam inside `output.rs` and rule out a binary path that panics on demand. +- Current-tree verification: Read T3 and the Regression Test Strategy in `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] say where the replacement panic-hook coverage may live` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657696360 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). @@ -334,6 +392,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 09:59 UTC - Round 4: da2ce7's COMMENTED review `6011571146` (09:50:29Z, three findings F15 to F17; no ACK while the F12 thread is open). Three commits fixed them (pushed, exit 0), a probe of the current binary checked the F15 claim, and three replies were posted after the push at about 09:58Z (the F16 reply was edited once at 09:59Z to fix row names). Threads resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. - 2026-11-22 10:05 UTC - Round 5: Copilot's COMMENTED review `6011585846` (09:54:58Z, two findings F18 and F19), found while resolving round 4 threads (it arrived while round 4 was processed, so I should have listed all reviews before recording round 4). One commit fixed F18 (pushed, exit 0); F19 re-raises F16, already fixed. Replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN. - 2026-11-22 10:20 UTC - Correction (round 4 entry): that entry says the three replies were posted "at about 09:58Z". The capture has them at 09:59:24Z, 09:59:27Z and 09:59:29Z (the F16 edit at 09:59:51Z is as logged). The entry is not rewritten; these are the correct times. +- 2026-11-22 10:24 UTC - Round 6: da2ce7's COMMENTED review `6011655297` (10:16:30Z, four findings F20 to F23; no ACK while the F12 thread is open) and Copilot's COMMENTED review `6011678308` (10:20:41Z, no inline finding, no row). Six commits fixed F20 to F23 (pushed, exit 0); four replies were posted after the push; the four threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. From 4d85227f65daf814a79ef0362259ce27886c58ff Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:26:02 +0000 Subject: [PATCH 31/41] docs(pr-reviews): [#2984] drop the commit id from the F20 title --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 4e49d1619..070f2203a 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -330,7 +330,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657638201 -### F20 - The audit cites the PR-branch commit 4cf09d58e by id +### F20 - The audit cites a PR-branch commit by id - PR number: 2985 - Source review ID: 6011655297 From fa9c997883ff23652b867ab4787db9cbce8db1a5 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:36:22 +0000 Subject: [PATCH 32/41] docs(issues): [#2984] add the test-development loop to the commit points Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index fa64a9ae5..d9737704e 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 10:21" +last-updated-utc: "2026-11-22 10:36" semantic-links: skill-links: - create-issue @@ -111,6 +111,8 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | T4 | Validation in config and fallible resolution | Commit after focused validation and required review. | | T5 | Evidence update | Commit after focused validation and required review. | +Test-development loop (T3), as `create-issue` requires for a plan that adds or changes tests: use the `write-unit-test` skill and make the smallest behaviour-focused increment; after each increment passes its focused validation, record an explicit design review before maintainer review and commit. The review is the prose-first Arrange-Act-Assert comparison: write temporary prose for each section, refactor until the code expresses it, remove redundant prose, and confirm the test exposes the one causal initial-state difference, its fixture owns only incidental mechanics, and the production Act plus the independently specified expected result stay visible. Record it in the task evidence. Complete it for every test-producing increment (the UDP cases, the HTTP cases, the unresolvable-host case, the rewritten end-to-end test and the panic-hook unit test) before starting the next, and stop for maintainer review after the final increment, before final verification, commit or pull request. The independent Task Reviewer does the final pre-PR review of the whole issue. + ## Progress Tracking ### Workflow Checkpoints @@ -140,6 +142,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. - 2026-11-22 09:53 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fixes (F15, F16): HTTP expectations split by case (wrong scheme versus no host), recheck expectations aligned and the recheck row moved last - PR 2985 audit - 2026-11-22 10:00 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fix (Copilot F18): the plan now updates the existing panic-contract test and keeps panic-hook coverage by another trigger - PR 2985 audit - 2026-11-22 10:21 UTC - Claude Code (Claude Sonnet 5.5) - Round 6 review fixes (F21, F23): the HTTP reproduction is recorded as V2 with its verbatim output (T2 and M2 done) and the replacement panic-hook coverage is placed in a seam inside `output.rs` - PR 2985 audit +- 2026-11-22 10:36 UTC - Claude Code (Claude Sonnet 5.5) - Round 7 review fix (F24): the test-development loop and design-review checkpoints are added to the Commit Points - PR 2985 audit ## Acceptance Criteria From 6fc49b77a21e505126a7c43b6ec3a588e810a804 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:36:55 +0000 Subject: [PATCH 33/41] docs(pr-reviews): [#2984] append the correction for the round 6 commit count Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 070f2203a..7b59e29b7 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 10:24" +last-updated-utc: "2026-11-22 10:36" --- @@ -393,6 +393,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 10:05 UTC - Round 5: Copilot's COMMENTED review `6011585846` (09:54:58Z, two findings F18 and F19), found while resolving round 4 threads (it arrived while round 4 was processed, so I should have listed all reviews before recording round 4). One commit fixed F18 (pushed, exit 0); F19 re-raises F16, already fixed. Replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN. - 2026-11-22 10:20 UTC - Correction (round 4 entry): that entry says the three replies were posted "at about 09:58Z". The capture has them at 09:59:24Z, 09:59:27Z and 09:59:29Z (the F16 edit at 09:59:51Z is as logged). The entry is not rewritten; these are the correct times. - 2026-11-22 10:24 UTC - Round 6: da2ce7's COMMENTED review `6011655297` (10:16:30Z, four findings F20 to F23; no ACK while the F12 thread is open) and Copilot's COMMENTED review `6011678308` (10:20:41Z, no inline finding, no row). Six commits fixed F20 to F23 (pushed, exit 0); four replies were posted after the push; the four threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. +- 2026-11-22 10:36 UTC - Correction (round 6 entry): that entry says "Six commits fixed F20 to F23". Before the first reply there were five commits: four fixes, `docs(issues): [#2984] record the HTTP reproduction as V2 with its verbatim output` (F21), `docs(issues): [#2984] say where the replacement panic-hook coverage may live` (F23), `docs(pr-reviews): [#2984] cite the reviewed head by subject in finding F19` (F20) and `docs(pr-reviews): [#2984] append the correction for the round 4 reply times` (F22), and one commit that only logs the spec changes, `docs(issues): [#2984] log the round 6 spec changes`. The audit commit for the round followed the replies. The entry is not rewritten; this is the correct count. From b753ea24429d12bf19c1d806161ab4fbb3a27de8 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 10:41:02 +0000 Subject: [PATCH 34/41] docs(pr-reviews): [#2984] add round 7 findings F24 and F25 to the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 33 ++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 7b59e29b7..3b6714b7a 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 10:36" +last-updated-utc: "2026-11-22 10:40" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 7 is da2ce7's COMMENTED review `6011770812` (two inline findings, F24 and F25, numbered after the record's F23) on the head `docs(pr-reviews): [#2984] drop the commit id from the F20 title`. + Round 6 is da2ce7's COMMENTED review `6011655297` (four inline findings, F20 to F23, numbered after the record's F19) on the head `docs(pr-reviews): [#2984] add round 5 findings F18 and F19 to the PR 2985 audit`. Copilot's COMMENTED review `6011678308` (10:20:41Z, same head) has no inline comment and no open issue; its summary mentions omitted findings about test-design review checkpoints and exit-code verification evidence that are not retrievable, so it gets no row. Round 5 is Copilot's COMMENTED review `6011585846` (09:54:58Z, two inline findings, F18 and F19 here; F19 re-raises F16) on the head `docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry`; it was submitted during round 4 and found when the threads were listed before resolving. @@ -80,6 +82,8 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F21 | `review-finding:pr-2985-f21` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | | F22 | `review-finding:pr-2985-f22` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | | F23 | `review-finding:pr-2985-f23` | Human | Suggestion | maintainability | ORIGINAL | FIXED | RESOLVED | +| F24 | `review-finding:pr-2985-f24` | Human | Minor | testing | ORIGINAL | FIXED | RESOLVED | +| F25 | `review-finding:pr-2985-f25` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | ## Finding Details @@ -382,6 +386,32 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657696360 +### F24 - The plan adds and changes tests but has no test-development loop or design-review checkpoint + +- PR number: 2985 +- Source review ID: 6011770812 +- Reviewer finding ID: da2ce7 F24 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657727063 +- Concern: T3 adds and rewrites tests and the panic-hook coverage moves to a new unit test, but the spec dropped the `create-issue` requirement for the `write-unit-test` skill, the smallest increment and an explicit design review after each passing increment. +- Solution: The Commit Points section now carries the loop, the prose-first Arrange-Act-Assert design review for each test-producing increment and the stop for maintainer review after the final increment. +- Current-tree verification: Read the Commit Points section of `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] add the test-development loop to the commit points` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657743411 + +### F25 - The round-6 entry says six commits fixed F20 to F23; five commits came before the replies + +- PR number: 2985 +- Source review ID: 6011770812 +- Reviewer finding ID: da2ce7 F25 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657727065 +- Concern: The round 6 Processing Log entry overstated the commit count. +- Solution: A correction entry lists the five commits by subject and gives the right count; the round 6 entry is not rewritten. +- Current-tree verification: Read the Processing Log of this record. +- Resolution reference: `docs(pr-reviews): [#2984] append the correction for the round 6 commit count` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657743561 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). @@ -394,6 +424,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 10:20 UTC - Correction (round 4 entry): that entry says the three replies were posted "at about 09:58Z". The capture has them at 09:59:24Z, 09:59:27Z and 09:59:29Z (the F16 edit at 09:59:51Z is as logged). The entry is not rewritten; these are the correct times. - 2026-11-22 10:24 UTC - Round 6: da2ce7's COMMENTED review `6011655297` (10:16:30Z, four findings F20 to F23; no ACK while the F12 thread is open) and Copilot's COMMENTED review `6011678308` (10:20:41Z, no inline finding, no row). Six commits fixed F20 to F23 (pushed, exit 0); four replies were posted after the push; the four threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. - 2026-11-22 10:36 UTC - Correction (round 6 entry): that entry says "Six commits fixed F20 to F23". Before the first reply there were five commits: four fixes, `docs(issues): [#2984] record the HTTP reproduction as V2 with its verbatim output` (F21), `docs(issues): [#2984] say where the replacement panic-hook coverage may live` (F23), `docs(pr-reviews): [#2984] cite the reviewed head by subject in finding F19` (F20) and `docs(pr-reviews): [#2984] append the correction for the round 4 reply times` (F22), and one commit that only logs the spec changes, `docs(issues): [#2984] log the round 6 spec changes`. The audit commit for the round followed the replies. The entry is not rewritten; this is the correct count. +- 2026-11-22 10:40 UTC - Round 7: da2ce7's COMMENTED review `6011770812` (10:34:47Z, two findings F24 and F25; no ACK while the F12 thread is open). Two commits fixed them, one each (pushed, exit 0); two replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. From 82ba87416d8ff9e0f88401501b75cd37c6799c7e Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 13:25:33 +0000 Subject: [PATCH 35/41] docs(issues): [#2984] add the pattern catalog and helper-boundary rule to the test loop Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index d9737704e..c5a6c4876 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 10:36" +last-updated-utc: "2026-11-22 13:25" semantic-links: skill-links: - create-issue @@ -111,7 +111,7 @@ Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. | T4 | Validation in config and fallible resolution | Commit after focused validation and required review. | | T5 | Evidence update | Commit after focused validation and required review. | -Test-development loop (T3), as `create-issue` requires for a plan that adds or changes tests: use the `write-unit-test` skill and make the smallest behaviour-focused increment; after each increment passes its focused validation, record an explicit design review before maintainer review and commit. The review is the prose-first Arrange-Act-Assert comparison: write temporary prose for each section, refactor until the code expresses it, remove redundant prose, and confirm the test exposes the one causal initial-state difference, its fixture owns only incidental mechanics, and the production Act plus the independently specified expected result stay visible. Record it in the task evidence. Complete it for every test-producing increment (the UDP cases, the HTTP cases, the unresolvable-host case, the rewritten end-to-end test and the panic-hook unit test) before starting the next, and stop for maintainer review after the final increment, before final verification, commit or pull request. The independent Task Reviewer does the final pre-PR review of the whole issue. +Test-development loop (T3), as `create-issue` requires for a plan that adds or changes tests: use the `write-unit-test` skill and make the smallest behaviour-focused increment; after each increment passes its focused validation, record an explicit design review before maintainer review and commit. The review is the prose-first Arrange-Act-Assert comparison: write temporary prose for each section, refactor until the code expresses it, remove redundant prose, and confirm the test exposes the one causal initial-state difference, its fixture owns only incidental mechanics, and the production Act plus the independently specified expected result stay visible. Record it in the task evidence. Complete it for every test-producing increment (the UDP cases, the HTTP cases, the unresolvable-host case, the rewritten end-to-end test and the panic-hook unit test) before starting the next, and stop for maintainer review after the final increment, before final verification, commit or pull request. Test authors consult the test refactoring-pattern catalog in `docs/testing/refactoring-patterns/` when a pattern applies. The design review judges helper boundaries by meaningful named actions and abstraction-level alignment, not by caller count: a single-use helper is valid when it hides only incidental mechanics. The independent Task Reviewer does the final pre-PR review of the whole issue. ## Progress Tracking @@ -143,6 +143,7 @@ Test-development loop (T3), as `create-issue` requires for a plan that adds or c - 2026-11-22 10:00 UTC - Claude Code (Claude Sonnet 5.5) - Round 5 review fix (Copilot F18): the plan now updates the existing panic-contract test and keeps panic-hook coverage by another trigger - PR 2985 audit - 2026-11-22 10:21 UTC - Claude Code (Claude Sonnet 5.5) - Round 6 review fixes (F21, F23): the HTTP reproduction is recorded as V2 with its verbatim output (T2 and M2 done) and the replacement panic-hook coverage is placed in a seam inside `output.rs` - PR 2985 audit - 2026-11-22 10:36 UTC - Claude Code (Claude Sonnet 5.5) - Round 7 review fix (F24): the test-development loop and design-review checkpoints are added to the Commit Points - PR 2985 audit +- 2026-11-22 13:25 UTC - Claude Code (Claude Sonnet 5.5) - Round 8 review fix (F26): the pattern-catalog pointer and the helper-boundary rule are added to the test-development loop - PR 2985 audit ## Acceptance Criteria From 6c2ab3bd2f0bb086289e6bbb267f3e94b6731ceb Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 13:29:57 +0000 Subject: [PATCH 36/41] docs(pr-reviews): [#2984] add round 8 finding F26 to the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 3b6714b7a..1efcff61a 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 10:40" +last-updated-utc: "2026-11-22 13:29" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 8 is da2ce7's COMMENTED review `6011840506` (one inline finding, F26, numbered after the record's F25) on the head `docs(pr-reviews): [#2984] add round 7 findings F24 and F25 to the PR 2985 audit`. + Round 7 is da2ce7's COMMENTED review `6011770812` (two inline findings, F24 and F25, numbered after the record's F23) on the head `docs(pr-reviews): [#2984] drop the commit id from the F20 title`. Round 6 is da2ce7's COMMENTED review `6011655297` (four inline findings, F20 to F23, numbered after the record's F19) on the head `docs(pr-reviews): [#2984] add round 5 findings F18 and F19 to the PR 2985 audit`. Copilot's COMMENTED review `6011678308` (10:20:41Z, same head) has no inline comment and no open issue; its summary mentions omitted findings about test-design review checkpoints and exit-code verification evidence that are not retrievable, so it gets no row. @@ -84,6 +86,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F23 | `review-finding:pr-2985-f23` | Human | Suggestion | maintainability | ORIGINAL | FIXED | RESOLVED | | F24 | `review-finding:pr-2985-f24` | Human | Minor | testing | ORIGINAL | FIXED | RESOLVED | | F25 | `review-finding:pr-2985-f25` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | +| F26 | `review-finding:pr-2985-f26` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | ## Finding Details @@ -412,6 +415,19 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657743561 +### F26 - The loop leaves out the pattern-catalog pointer and the helper-boundary rule + +- PR number: 2985 +- Source review ID: 6011840506 +- Reviewer finding ID: da2ce7 F26 +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657772265 +- Concern: The test-development loop in the Commit Points omitted the pointer to the test refactoring-pattern catalog and the rule that helper boundaries are judged by named actions and abstraction level, not caller count, which `create-issue` asks a plan to include. +- Solution: Both clauses are added to the loop paragraph. +- Current-tree verification: Read the Commit Points section of `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] add the pattern catalog and helper-boundary rule to the test loop` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4658298629 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). @@ -425,6 +441,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 10:24 UTC - Round 6: da2ce7's COMMENTED review `6011655297` (10:16:30Z, four findings F20 to F23; no ACK while the F12 thread is open) and Copilot's COMMENTED review `6011678308` (10:20:41Z, no inline finding, no row). Six commits fixed F20 to F23 (pushed, exit 0); four replies were posted after the push; the four threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. - 2026-11-22 10:36 UTC - Correction (round 6 entry): that entry says "Six commits fixed F20 to F23". Before the first reply there were five commits: four fixes, `docs(issues): [#2984] record the HTTP reproduction as V2 with its verbatim output` (F21), `docs(issues): [#2984] say where the replacement panic-hook coverage may live` (F23), `docs(pr-reviews): [#2984] cite the reviewed head by subject in finding F19` (F20) and `docs(pr-reviews): [#2984] append the correction for the round 4 reply times` (F22), and one commit that only logs the spec changes, `docs(issues): [#2984] log the round 6 spec changes`. The audit commit for the round followed the replies. The entry is not rewritten; this is the correct count. - 2026-11-22 10:40 UTC - Round 7: da2ce7's COMMENTED review `6011770812` (10:34:47Z, two findings F24 and F25; no ACK while the F12 thread is open). Two commits fixed them, one each (pushed, exit 0); two replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. +- 2026-11-22 13:29 UTC - Round 8: da2ce7's COMMENTED review `6011840506` (10:49:46Z, one finding F26; no ACK while the F12 thread is open). One commit fixed it (pushed, exit 0); the reply was posted after the push; the thread is resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. From 40bb20b81a7e88cf58280b1ecf09adfede6c9cd1 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 13:57:40 +0000 Subject: [PATCH 37/41] docs(issues): [#2984] make the specification the durable record of the maintainer decisions Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index c5a6c4876..fcd83b680 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 13:25" +last-updated-utc: "2026-11-22 13:57" semantic-links: skill-links: - create-issue @@ -63,7 +63,7 @@ This bug is not part of EPIC #2758 (CLI output contract migration). It was found ## Decisions (maintainer) -The maintainer answered both questions raised by the first draft in chat, on 2026-11-22, one day after this issue was created (2026-11-21). The chat is not a durable record: the maintainer is asked to restate both decisions in a comment on this pull request, and the comment URL will be cited here. Until then the decisions below are the author's record of that chat, not a quotation. +The maintainer (josecelano) decided both questions raised by the first draft on 2026-11-22, one day after this issue was created (2026-11-21). The decisions are recorded here, in this specification, which is the durable record: the maintainer's ACK or merge of the pull request that carries it is the confirmation, and the decisions need no other source. They were given in chat and entered here by the author, so this text is the author's wording of them. 1. **An unresolvable hostname is a failed check for that tracker**, not a configuration error: DNS is a network condition, and the check exists to report on tracker health. `udp::Checks` carries `remote_addr: SocketAddr` (`checks/udp.rs:15`), which cannot hold an address that did not resolve, so the implementation changes the result record: candidates are `remote_addr: Option` plus the configured URL, or a placeholder. The implementation PR shows the new record and this is the one allowed change to the output contract's result shape. 2. **The same host and scheme validation also applies to `http_trackers` and `health_checks`.** The rule is in In Scope. The first draft only assumed that a missing port is valid there and that nothing panics for those lists; the implementation must reproduce with a real run whether any HTTP URL form also panics or fails wrongly today, and record it in `manual-verification-evidence.md` before the fix. @@ -144,6 +144,7 @@ Test-development loop (T3), as `create-issue` requires for a plan that adds or c - 2026-11-22 10:21 UTC - Claude Code (Claude Sonnet 5.5) - Round 6 review fixes (F21, F23): the HTTP reproduction is recorded as V2 with its verbatim output (T2 and M2 done) and the replacement panic-hook coverage is placed in a seam inside `output.rs` - PR 2985 audit - 2026-11-22 10:36 UTC - Claude Code (Claude Sonnet 5.5) - Round 7 review fix (F24): the test-development loop and design-review checkpoints are added to the Commit Points - PR 2985 audit - 2026-11-22 13:25 UTC - Claude Code (Claude Sonnet 5.5) - Round 8 review fix (F26): the pattern-catalog pointer and the helper-boundary rule are added to the test-development loop - PR 2985 audit +- 2026-11-22 13:57 UTC - Claude Code (Claude Sonnet 5.5) - Decisions section: the maintainer chose to make this specification the durable record of his two decisions, confirmed by his ACK or merge, instead of a separate PR comment (finding F12) - PR 2985 audit ## Acceptance Criteria From af89320278bbea6e265aa532fc31210889826695 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 14:00:58 +0000 Subject: [PATCH 38/41] docs(issues): [#2984] cite the maintainer's decisions comment in the specification Co-Authored-By: Claude Sonnet 5.5 --- .../2984-tracker-client-check-udp-url-validation/ISSUE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index fcd83b680..dba20b1a7 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 13:57" +last-updated-utc: "2026-11-22 14:00" semantic-links: skill-links: - create-issue @@ -63,7 +63,7 @@ This bug is not part of EPIC #2758 (CLI output contract migration). It was found ## Decisions (maintainer) -The maintainer (josecelano) decided both questions raised by the first draft on 2026-11-22, one day after this issue was created (2026-11-21). The decisions are recorded here, in this specification, which is the durable record: the maintainer's ACK or merge of the pull request that carries it is the confirmation, and the decisions need no other source. They were given in chat and entered here by the author, so this text is the author's wording of them. +The maintainer (josecelano) decided both questions raised by the first draft on 2026-11-22, one day after this issue was created (2026-11-21). The decisions are recorded here, in this specification, which is the durable record: the maintainer's ACK or merge of the pull request that carries it is the confirmation, and the decisions need no other source. They were given in chat and entered here by the author, so this text is the author's wording of them. The maintainer also restated both decisions in his own words in a comment on pull request 2985: https://github.com/torrust/torrust-tracker/pull/2985#issuecomment-7080197804. 1. **An unresolvable hostname is a failed check for that tracker**, not a configuration error: DNS is a network condition, and the check exists to report on tracker health. `udp::Checks` carries `remote_addr: SocketAddr` (`checks/udp.rs:15`), which cannot hold an address that did not resolve, so the implementation changes the result record: candidates are `remote_addr: Option` plus the configured URL, or a placeholder. The implementation PR shows the new record and this is the one allowed change to the output contract's result shape. 2. **The same host and scheme validation also applies to `http_trackers` and `health_checks`.** The rule is in In Scope. The first draft only assumed that a missing port is valid there and that nothing panics for those lists; the implementation must reproduce with a real run whether any HTTP URL form also panics or fails wrongly today, and record it in `manual-verification-evidence.md` before the fix. @@ -145,6 +145,7 @@ Test-development loop (T3), as `create-issue` requires for a plan that adds or c - 2026-11-22 10:36 UTC - Claude Code (Claude Sonnet 5.5) - Round 7 review fix (F24): the test-development loop and design-review checkpoints are added to the Commit Points - PR 2985 audit - 2026-11-22 13:25 UTC - Claude Code (Claude Sonnet 5.5) - Round 8 review fix (F26): the pattern-catalog pointer and the helper-boundary rule are added to the test-development loop - PR 2985 audit - 2026-11-22 13:57 UTC - Claude Code (Claude Sonnet 5.5) - Decisions section: the maintainer chose to make this specification the durable record of his two decisions, confirmed by his ACK or merge, instead of a separate PR comment (finding F12) - PR 2985 audit +- 2026-11-22 14:00 UTC - Claude Code (Claude Sonnet 5.5) - Decisions section cites the maintainer's own comment on the pull request (finding F12) - PR 2985 audit ## Acceptance Criteria From 0045fb265cd255562df906c0a68a90701ff754c4 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 14:05:29 +0000 Subject: [PATCH 39/41] docs(pr-reviews): [#2984] close finding F12 in the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 1efcff61a..5bd03d645 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 13:29" +last-updated-utc: "2026-11-22 14:05" --- @@ -72,7 +72,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F9 | `review-finding:pr-2985-f9` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | | F10 | `review-finding:pr-2985-f10` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | | F11 | `review-finding:pr-2985-f11` | Human | Nit | metadata | ORIGINAL | FIXED | RESOLVED | -| F12 | `review-finding:pr-2985-f12` | Human | Minor | documentation | ORIGINAL | FOLLOW_UP | OPEN | +| F12 | `review-finding:pr-2985-f12` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | | F13 | `review-finding:pr-2985-f13` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | | F14 | `review-finding:pr-2985-f14` | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | | F15 | `review-finding:pr-2985-f15` | Human | Minor | correctness | ORIGINAL | FIXED | RESOLVED | @@ -240,11 +240,11 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Reviewer finding ID: da2ce7 F12 - Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657538043 - Concern: The decisions section attributed both answers to a chat session dated 2026-11-22 as 'the session that created this issue' and named this PR's review thread as the record, but the thread held no such statement and the issue was created on 2026-11-21; `fix-bug` asks for evidence that does not rely on chat history. -- Solution: The date and source wording is corrected (answered in chat on 2026-11-22, one day after the issue was created; the chat is not a durable record; the decisions are the author's record). The durable record, a PR comment in which the maintainer restates both decisions, is the maintainer's to write; the spec will cite its URL when it exists. The thread stays open until then. -- Current-tree verification: Read the Decisions section of `ISSUE.md`: the wording is corrected and says the maintainer comment is still to be cited. -- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554361 +- Solution: The date and source wording was corrected first (round 3). The maintainer then chose to make the specification the durable record of his two decisions, confirmed by his ACK or merge, and posted the decisions in his own words as a PR comment (https://github.com/torrust/torrust-tracker/pull/2985#issuecomment-7080197804, 2026-11-22 13:58 UTC), which the Decisions section cites. The first reply (round 3, https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554361) said the thread stayed open until the maintainer's comment; the final reply is the Reply URL below. +- Current-tree verification: Read the Decisions section of `ISSUE.md`: it names the date, says the specification is the durable record and cites the comment; `gh api repos/torrust/torrust-tracker/issues/comments/7080197804` shows the comment by the maintainer. +- Resolution reference: `docs(issues): [#2984] cite the maintainer's decisions comment in the specification` - Follow-up PR URL: N/A -- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4657554361 +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4658420524 ### F13 - Decision 2 is not carried through the rest of the spec @@ -442,6 +442,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 10:36 UTC - Correction (round 6 entry): that entry says "Six commits fixed F20 to F23". Before the first reply there were five commits: four fixes, `docs(issues): [#2984] record the HTTP reproduction as V2 with its verbatim output` (F21), `docs(issues): [#2984] say where the replacement panic-hook coverage may live` (F23), `docs(pr-reviews): [#2984] cite the reviewed head by subject in finding F19` (F20) and `docs(pr-reviews): [#2984] append the correction for the round 4 reply times` (F22), and one commit that only logs the spec changes, `docs(issues): [#2984] log the round 6 spec changes`. The audit commit for the round followed the replies. The entry is not rewritten; this is the correct count. - 2026-11-22 10:40 UTC - Round 7: da2ce7's COMMENTED review `6011770812` (10:34:47Z, two findings F24 and F25; no ACK while the F12 thread is open). Two commits fixed them, one each (pushed, exit 0); two replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. - 2026-11-22 13:29 UTC - Round 8: da2ce7's COMMENTED review `6011840506` (10:49:46Z, one finding F26; no ACK while the F12 thread is open). One commit fixed it (pushed, exit 0); the reply was posted after the push; the thread is resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. +- 2026-11-22 14:05 UTC - F12 closed: the maintainer posted his decisions comment (2026-11-22 13:58 UTC) and chose to make the specification the durable record; two spec commits followed (pushed, exit 0), the final reply was posted after the push, and the thread is resolved after the validator run. F12 is now FIXED/RESOLVED. This updates the row, which round 3 to round 8 entries above state as FOLLOW_UP/OPEN at their time. From 6ff01ee0261a1ec5f2ade33af696450fd6349bf9 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Sun, 22 Nov 2026 14:21:52 +0000 Subject: [PATCH 40/41] docs(issues): [#2984] record the capture procedure for the reproduction runs Co-Authored-By: Claude Sonnet 5.5 --- .../ISSUE.md | 7 ++++--- .../manual-verification-evidence.md | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md index dba20b1a7..edd2afc85 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md @@ -9,7 +9,7 @@ github-issue: 2984 spec-path: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md branch: "2984-tracker-client-check-udp-url-validation-spec" related-pr: null -last-updated-utc: "2026-11-22 14:00" +last-updated-utc: "2026-11-22 14:21" semantic-links: skill-links: - create-issue @@ -146,6 +146,7 @@ Test-development loop (T3), as `create-issue` requires for a plan that adds or c - 2026-11-22 13:25 UTC - Claude Code (Claude Sonnet 5.5) - Round 8 review fix (F26): the pattern-catalog pointer and the helper-boundary rule are added to the test-development loop - PR 2985 audit - 2026-11-22 13:57 UTC - Claude Code (Claude Sonnet 5.5) - Decisions section: the maintainer chose to make this specification the durable record of his two decisions, confirmed by his ACK or merge, instead of a separate PR comment (finding F12) - PR 2985 audit - 2026-11-22 14:00 UTC - Claude Code (Claude Sonnet 5.5) - Decisions section cites the maintainer's own comment on the pull request (finding F12) - PR 2985 audit +- 2026-11-22 14:21 UTC - Claude Code (Claude Sonnet 5.5) - Round 9 review fix (Copilot F27): the evidence records the actual capture procedure (`${PIPESTATUS[0]}`, stdout measured, stderr separate) for V1 and V2, and the scenarios name it - PR 2985 audit ## Acceptance Criteria @@ -172,8 +173,8 @@ Test-development loop (T3), as `create-issue` requires for a plan that adds or c | ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence | | --- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------ | --------------------------------------------- | -| M1 | Reproduce: UDP URL without port, without host, with wrong scheme, unresolvable host | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL | Panic record and `runtime_failure`, exit 1, empty stdout | DONE | `manual-verification-evidence.md` section V1 | -| M2 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat`, and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded: a failed check with exit 0 for the first two, exit 2 with `invalid_configuration` for `http:///` | DONE | `manual-verification-evidence.md` section V2 | +| M1 | Reproduce: UDP URL without port, without host, with wrong scheme, unresolvable host | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' ./target/debug/tracker_client check \| cat` for each URL, capturing the exit code with `${PIPESTATUS[0]}` as in the evidence file | Panic record and `runtime_failure`, exit 1, empty stdout | DONE | `manual-verification-evidence.md` section V1 | +| M2 | Reproduce: HTTP forms (wrong scheme, no host) in `http_trackers` and `health_checks` | `TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' ./target/debug/tracker_client check \| cat` (exit code captured with `${PIPESTATUS[0]}`), and the same with the URL in `health_checks`, for `ftp://127.0.0.1`, `udp://127.0.0.1:6969` and `http:///` | Observed outcome recorded: a failed check with exit 0 for the first two, exit 2 with `invalid_configuration` for `http:///` | DONE | `manual-verification-evidence.md` section V2 | | M3 | Final like-for-like recheck of M1 and M2 after the last production change | The same commands as M1 and M2 | Exit `2` and one `invalid_configuration` record for AC1, AC2 and AC5; a failed check and no panic for AC3 | TODO | `manual-verification-evidence.md` (section to be added) | Notes: diff --git a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md index fdc96ae7f..1d2360477 100644 --- a/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md +++ b/docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md @@ -1,7 +1,7 @@ --- doc-type: manual-verification-evidence issue-spec: docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md -last-updated-utc: "2026-11-22 10:18" +last-updated-utc: "2026-11-22 14:21" --- # Manual Verification Evidence @@ -29,10 +29,16 @@ last-updated-utc: "2026-11-22 10:18" For each ``: ```bash +# stdout goes to a pipe (the client refuses a terminal), stderr to a file TORRUST_CHECKER_CONFIG='{"udp_trackers":[""],"http_trackers":[],"health_checks":[]}' \ - ./target/debug/tracker_client check | cat + timeout 60 ./target/debug/tracker_client check 2>stderr.txt | cat >stdout.txt +code=${PIPESTATUS[0]} # the client's exit code, saved immediately after the pipeline +echo "exit=$code stdout_bytes=$(wc -c ` below, with the URL in that list and the other two lists empty: ```bash +# stdout goes to a pipe (the client refuses a terminal), stderr to a file TORRUST_CHECKER_CONFIG='{"udp_trackers":[],"http_trackers":[""],"health_checks":[]}' \ - ./target/debug/tracker_client check | cat + timeout 60 ./target/debug/tracker_client check 2>stderr.txt | cat >stdout.txt +code=${PIPESTATUS[0]} # the client's exit code, saved immediately after the pipeline +echo "exit=$code stdout_bytes=$(wc -c Date: Sun, 22 Nov 2026 14:28:11 +0000 Subject: [PATCH 41/41] docs(pr-reviews): [#2984] add round 9 finding F27 to the PR 2985 audit Co-Authored-By: Claude Sonnet 5.5 --- docs/pr-reviews/pr-2985-review/PR-REVIEW.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md index 5bd03d645..1a98d09ca 100644 --- a/docs/pr-reviews/pr-2985-review/PR-REVIEW.md +++ b/docs/pr-reviews/pr-2985-review/PR-REVIEW.md @@ -1,7 +1,7 @@ --- pr-number: 2985 pr-url: https://github.com/torrust/torrust-tracker/pull/2985 -last-updated-utc: "2026-11-22 14:05" +last-updated-utc: "2026-11-22 14:27" --- @@ -43,6 +43,8 @@ deliver findings through GitHub and have no repository-artifact obligation. ## Findings +Round 9 is Copilot's COMMENTED review `6012705403` (14:21:15Z, one inline finding, F27) on the head `docs(pr-reviews): [#2984] close finding F12 in the PR 2985 audit`. + Round 8 is da2ce7's COMMENTED review `6011840506` (one inline finding, F26, numbered after the record's F25) on the head `docs(pr-reviews): [#2984] add round 7 findings F24 and F25 to the PR 2985 audit`. Round 7 is da2ce7's COMMENTED review `6011770812` (two inline findings, F24 and F25, numbered after the record's F23) on the head `docs(pr-reviews): [#2984] drop the commit id from the F20 title`. @@ -87,6 +89,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 | F24 | `review-finding:pr-2985-f24` | Human | Minor | testing | ORIGINAL | FIXED | RESOLVED | | F25 | `review-finding:pr-2985-f25` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | | F26 | `review-finding:pr-2985-f26` | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | +| F27 | `review-finding:pr-2985-f27` | Copilot | Minor | documentation | ORIGINAL | FIXED | RESOLVED | ## Finding Details @@ -428,6 +431,19 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - Follow-up PR URL: N/A - Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4658298629 +### F27 - The reproduction steps do not record how the exit code and stdout were captured + +- PR number: 2985 +- Source review ID: 6012705403 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4658476773 +- Concern: The V1 and V2 steps show `| cat` without `pipefail` or `PIPESTATUS`, so they would report `cat`'s status, and they do not say how the exit code, stdout byte count and separate streams were captured. +- Solution: V1 and V2 record the actual capture procedure (stderr to a file, stdout through `cat` into a file, the client's exit code saved from `${PIPESTATUS[0]}` right after the pipeline, stdout measured with `wc -c`) and say that the pipeline status alone would be `cat`'s; the scenarios name `${PIPESTATUS[0]}`. +- Current-tree verification: Read the Steps Performed of V1 and V2 in the evidence file and the scenarios table in `ISSUE.md`. +- Resolution reference: `docs(issues): [#2984] record the capture procedure for the reproduction runs` +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2985#discussion_r4658491876 + ## Processing Log - 2026-11-21 15:23 UTC - Round 1: da2ce7's APPROVED review `6006228624` (15:14:29Z, six findings) and Copilot's COMMENTED review `6006218464` (15:12:25Z, two findings, both about a `||` row prefix that is not in the files). Six commits fixed F1 to F6, one per finding (pushed, exit 0, head on GitHub then `docs(issues): [#2984] identify the build and toolchain of the reproduction`). Eight replies were posted between 15:23:24Z and 15:23:40Z (after the push), and this record was written after them, not before (late start). @@ -443,6 +459,7 @@ Round 1 is da2ce7's APPROVED review `6006228624` (six inline findings, F1 to F6 - 2026-11-22 10:40 UTC - Round 7: da2ce7's COMMENTED review `6011770812` (10:34:47Z, two findings F24 and F25; no ACK while the F12 thread is open). Two commits fixed them, one each (pushed, exit 0); two replies were posted after the push; the two threads are resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. - 2026-11-22 13:29 UTC - Round 8: da2ce7's COMMENTED review `6011840506` (10:49:46Z, one finding F26; no ACK while the F12 thread is open). One commit fixed it (pushed, exit 0); the reply was posted after the push; the thread is resolved after the validator run. F12 remains FOLLOW_UP/OPEN, waiting for the maintainer's PR comment. - 2026-11-22 14:05 UTC - F12 closed: the maintainer posted his decisions comment (2026-11-22 13:58 UTC) and chose to make the specification the durable record; two spec commits followed (pushed, exit 0), the final reply was posted after the push, and the thread is resolved after the validator run. F12 is now FIXED/RESOLVED. This updates the row, which round 3 to round 8 entries above state as FOLLOW_UP/OPEN at their time. +- 2026-11-22 14:27 UTC - Round 9: Copilot's COMMENTED review `6012705403` (14:21:15Z, one finding F27). One commit fixed it (pushed, exit 0); the reply was posted after the push; the thread was resolved before this row was written (the first attempt to write it failed on a script error), and the validator was run after. The maintainer's ACK lines at 14:06:46Z and 14:17:01Z name earlier heads.