Skip to content

feat(tracker-client): [#2768] refuse a terminal and write JSON only - #2956

Merged
josecelano merged 6 commits into
torrust:developfrom
josecelano-bot:2768-tracker-client-json-only
Nov 19, 2026
Merged

josecelano merged 6 commits into
torrust:developfrom
josecelano-bot:2768-tracker-client-json-only

Conversation

@josecelano-bot

@josecelano-bot josecelano-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2768. Part of EPIC #2758.

tracker_client is a stdout-result-data command of the global CLI output contract. This PR makes it follow section 4 and the no-plain-text rule.

What changes:

  • TTY refusal at entry, before the arguments are read: exit 2, one {"kind":"tty_refusal",...} record on stderr, nothing on stdout.
  • One output module (unified/output.rs) writes every result (stdout) and diagnostic (stderr). No print macro and no print allow is left in the crate.
  • tracing is JSON on stderr.
  • A panic is a panic JSON record on stderr (a panic hook installed first in main); the process then ends with the usual runtime_failure record, exit 1.
  • check writes {"results": [...]} in both --format values. It wrote a top-level array before: a breaking change, documented in the README and the contract doc (release note).
  • --help, --version and clap usage errors are JSON records on stderr (help, version, usage_error); help and version exit 0, usage errors exit 2.
  • The body of an unrecognized HTTP announce or scrape answer moves from stdout to an unrecognized_response stderr record; stdout stays empty and the exit code stays 1. The non-bencode fallback is now JSON (raw_bytes), not a plain text line.
  • The legacy entry points of the removed binaries (checker/{app,service,console,printer,logger}, http/app, udp/app) printed directly and nothing called them since Remove the deprecated tracker client binaries #2765, so they are deleted instead of converted.

Tests: tests/output_contract.rs (10 tests, three use a pseudo-terminal through rustix). Run against the unchanged tool, 8 of the first 9 fail (evidence R1); the panic test was added in review round 1. The crate has 72 passing tests, linter all and clippy --workspace --all-targets are clean.

Manual verification (evidence V1 to V4): real tracker over UDP and HTTP, TTY refusal under script, check and monitor, and the e2e runner under a pseudo-terminal (the checker step exits 0, the runner exits 0). M4 used an existing local tracker image with --skip-build.

Left out on purpose: the runtime-failure record repeats the request URL, which the ADR redaction rule would remove. It was like that before; reported as a follow-up.

🤖 Generated with Claude Code

josecelano-bot and others added 2 commits November 18, 2026 19:23
… only

tracker_client is a stdout-result-data command of the global CLI output
contract. It now refuses to run when stdout is a terminal (exit 2, one
tty_refusal record on stderr), writes every result and diagnostic through one
output module, logs tracing as JSON on stderr, and writes the check results as
one object, {"results": [...]}, in both formats. --help, --version and clap
usage errors are JSON records on stderr, and the body of an unrecognized HTTP
response moves from stdout to an unrecognized_response record on stderr.

The legacy entry points of the removed binaries (checker app, service,
console, printer and logger, http app and udp app) printed directly and nothing
called them since torrust#2765: they are deleted, and the crate-level print allow with
them. New black-box tests in tests/output_contract.rs cover the terminal
refusal (pseudo-terminal), the object envelope and the stderr records.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… verification

Mark T1 to T5 and AC1 to AC4 done with their evidence, add the progress log
entry, and record the red run against the unchanged tool, the green run and
the real-tracker and pseudo-terminal runs (V1 to V4) in the evidence file.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An accepted UDP tracker URL without a port can trigger a panic that emits plain text, violating the CLI’s JSON-only error-output contract.

1 open issue
What changed in this PR

This PR advances the global CLI output migration for tracker_client, adding terminal refusal and structured JSON output while removing unused legacy entry points.

Changes:

  • Refuses terminal stdout before argument parsing and routes results, diagnostics, help, and version output through JSON.
  • Wraps checker results in {"results": [...]} and moves undecodable HTTP response bodies to stderr.
  • Adds output-contract regression tests, documents breaking changes, and records verification evidence.
File Description
project-words.txt Adds terminology used by pseudo-terminal tests.
docs/​issues/​open/​2768-2758-tracker-client-json-only/​manual-verification-evidence.md Records regression and manual verification results.
docs/​issues/​open/​2768-2758-tracker-client-json-only/​ISSUE.md Updates implementation progress and acceptance evidence.
console/​tracker-client/​tests/​tracker_client.rs Adapts help assertions to JSON stderr.
console/​tracker-client/​tests/​output_contract.rs Adds terminal-refusal and JSON output tests.
console/​tracker-client/​src/​lib.rs Removes direct-print lint allowances.
console/​tracker-client/​src/​console/​clients/​unified/​udp.rs Routes UDP output through shared writers.
console/​tracker-client/​src/​console/​clients/​unified/​output.rs Adds shared result and diagnostic writers.
console/​tracker-client/​src/​console/​clients/​unified/​mod.rs Exposes output helpers and updates module documentation.
console/​tracker-client/​src/​console/​clients/​unified/​http.rs Separates successful results from undecodable-response diagnostics.
console/​tracker-client/​src/​console/​clients/​unified/​check.rs Wraps results and converts parser outcomes to JSON.
console/​tracker-client/​src/​console/​clients/​unified/​app.rs Adds terminal refusal and JSON tracing on stderr.
console/​tracker-client/​src/​console/​clients/​udp/​mod.rs Removes the legacy app export.
console/​tracker-client/​src/​console/​clients/​udp/​app.rs Deletes the unused UDP entry point.
console/​tracker-client/​src/​console/​clients/​http/​mod.rs Removes the legacy app export.
console/​tracker-client/​src/​console/​clients/​http/​app.rs Deletes the unused HTTP entry point.
console/​tracker-client/​src/​console/​clients/​checker/​service.rs Deletes the unused checker service.
console/​tracker-client/​src/​console/​clients/​checker/​printer.rs Deletes the legacy printing interface.
console/​tracker-client/​src/​console/​clients/​checker/​monitor/​udp.rs Routes monitor events and summaries through shared writers.
console/​tracker-client/​src/​console/​clients/​checker/​mod.rs Removes deleted legacy module exports.
console/​tracker-client/​src/​console/​clients/​checker/​logger.rs Deletes the unused legacy logger.
console/​tracker-client/​src/​console/​clients/​checker/​error.rs Adds JSON usage, help, and version outcomes.
console/​tracker-client/​src/​console/​clients/​checker/​console.rs Deletes the direct-print console implementation.
console/​tracker-client/​src/​console/​clients/​checker/​app.rs Deletes the unused checker entry point.
console/​tracker-client/​src/​bin/​tracker_client.rs Emits structured diagnostics and terminal-refusal status.
console/​tracker-client/​README.md Documents output rules and breaking changes.
console/​tracker-client/​docs/​contracts/​tracker-cli-io-contract.md Updates channel, terminal, and exit-code contracts.
console/​tracker-client/​Cargo.toml Adds Unix pseudo-terminal test support through rustix.
Cargo.lock Records the new test dependency linkage.

Review effort: Balanced

josecelano-bot and others added 2 commits November 18, 2026 21:08
The default panic hook writes plain text to stderr, so a check configuration
with a UDP tracker URL that has no port (accepted by the validation, then
unwrapped while it is resolved) broke the rule that every stderr line is
JSON. Install a hook at the start of main that writes one panic record
without chaining the default hook, and add a black-box test with that input.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK a4d2a22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The README’s check-result example contains an extra bracket and an improperly closed Markdown fence, making the JSON invalid and rendering the License section as code.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Low severity Fix malformed JSON example and unclosed code fence

console/​tracker-client/​README.md:201

[Minor][F2] Fix the JSON example and close its Markdown fence. The extra ] makes the documented check result invalid JSON, and placing the closing backticks immediately after } does not close the fenced block, so the License section is rendered as code. Remove the duplicate bracket and put the closing fence on its own line.

1 resolved since last review

Review effort: Balanced

da2ce7
da2ce7 previously approved these changes Nov 19, 2026

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at a4d2a220b7c97df02152b1d9ac1d16adfa53188a. Recomputed from the bytes at this head, against the merge base 7e8df95ec; git merge-tree against develop 7a4c16eaf merges with no conflicts (develop is 2 commits ahead of the merge base and neither touches a changed file).

Process: a feature plus a review fix, checked against open-pull-request, commit-changes, process-pr-review, add-rust-dependency and write-unit-test, and against the issue spec and the EPIC's rule for docs and skills.

The change against its claim: run checks the terminal before it parses (exit 2, one tty_refusal record with the ADR's text); tracing is JSON on stderr; every former print site writes through unified/output.rs (the spec's AC4 grep exits 1, the workspace denies the print lints and the crate-level allow is gone); check wraps its results in {"results": [...]}; help, version and usage outcomes are stderr records with exits 0 and 2 at both parse sites; the HTTP fallback is an unrecognized_response record. A panic in a check task gives the panic record, then runtime_failure (checks/udp.rs:107 is the unwrap). The pseudo-terminal tests release every copy of the slave before reading, and the parse-order test fails if parsing comes first. No code references the deleted modules.

Consistency: links resolve; the audit's fixed sections match the template; the validator's logic run offline against the capture passes (1 row, 2 log entries, 0 failures). The review posted on this head after the last audit commit has a body finding with no audit row yet; F1 re-raises it.

Hygiene: four Conventional subjects with [#2768], bodies match their diffs, author equals committer; each commit carries one attribution footer line (no rule in the tree on it), and the description carries one attribution footer line too. git diff --check is clean, the commit-id check prints nothing, and the only closing keyword is Closes #2768, the implemented issue.

Findings: F1 to F4 Minor (the README example and fence, the unpiped check example, skills that still run the tool on a terminal, the stale description), F5 to F8 Nit. None blocks: each is repairable after merge and none changes what the code does.

Checked, no finding: test functions by revision (69, 71, 72); rustix already locked at 1.1.6; fooi follows the dictionary's other bencode fragments; in-progress is a valid status; the scrape test body fails the scrape decoder because it has no files key.

Checks

On the loop's compute node at this head, against the merge base 7e8df95ec (receipt server-gates-kranich-1217): the repository's pre-commit gate and lint roster exit 0 (465 s wall), and the audit validator passes this pull request's record (1 row, 2 log entries, 0 failures). In a fresh per-PR target directory, cargo test --workspace passes 4212 tests with 0 failed and 5 ignored across 124 binaries (373 s wall), and cargo clippy --workspace --all-targets --all-features -- -D warnings is clean (44 s wall). cargo deny check exits 5 with the same 35 license rejections and four advisories as on develop, so this pull request changes nothing in that result. F1 checked against the bytes at posting: lines 199 and 200 of console/tracker-client/README.md both hold ], and line 201 is } followed by the closing backticks. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Publish (Release): completed/skipped; Publish (Development): completed/skipped; Context: completed/success; Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-client): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Build on windows-latest (stable): completed/success; Build on macos-latest (stable): completed/success; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (nightly): completed/success; Docker E2E: completed/skipped; Test (Docker) (release): completed/success; Shipped Features: completed/success; Workspace Packaging: completed/success; Unit (stable): completed/success; Unit (nightly): completed/success; Documented Clippy Allows: completed/success; Layer Boundary Bans: completed/success; Docs Lint: completed/success; Generate Coverage Report: completed/success; Discover Package Coverage: completed/success". At posting, develop is f212ae33b.

Comment thread console/tracker-client/README.md Resolved
Comment thread console/tracker-client/README.md Resolved
Comment thread console/tracker-client/Cargo.toml Resolved
@da2ce7

da2ce7 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

ACK a4d2a22 — terminal refusal before parsing, JSON-only stdout and stderr through one output module, the panic record and the review audit record verified from the bytes at this head

@josecelano

Copy link
Copy Markdown
Member

ACK a4d2a22

…e the skills and contract

Address round 2 of the review of PR 2956:

- README: close the `check` example (extra `]`, unclosed fence) and pipe the command.
- Pipe the `tracker_client` commands in six skills and note the terminal refusal; fix the
  skill links in `public-trackers-for-testing` that named deleted files.
- Document the `panic` record and the `tracing` writer; note that no schema version exists yet.
- Record the rationale for the `rustix` dev-dependency in the spec.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK 9e11779

@josecelano
josecelano requested a review from da2ce7 November 19, 2026 08:32

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 1ca733c75486a1f7a565eaf86b7972ef04ffd216. Recomputed from the bytes at this head, against the merge base 7e8df95ec; git merge-tree against develop 53916fd2b merges with no conflicts (develop is 33 commits ahead of the merge base and none touches a file this PR changes).

Process: two commits since the last review, a docs fix and an audit update, checked against process-pr-review, open-pull-request and the EPIC's rule for docs and skills.

The change against its claim: 9e117792c does what its message says, and F1 to F8 of the previous round are fixed: the README example closes and pipes to jq, the six skills pipe every call except a syntax line under the new note and two troubleshooting placeholders, the skill links name files that exist, the description counts 10 and 72, the tracing writer and the panic record are documented, and the rustix rationale is in the spec with facts that hold. Two of its new sentences go further than the code or the plan (F9, F10).

Consistency: 1ca733c75 records the previous round. Every thread and the automated review's body finding now has a reply, a row and a resolution; the fixed sections match the template; the validator's logic run offline against the capture passes (10 rows, 3 log entries, 0 failures). The record cites two branch commits by id (F11), and one row credits a commit with a fix made in the description (F12). An ADR merged on develop after the merge base bears on the panic record's location (F13).

Hygiene: Conventional subjects with [#2768], bodies match their diffs, author equals committer; each new commit carries one attribution footer line (no rule in the tree on it), and the description carries one attribution footer line too. git diff --check is clean, and the only closing keyword is Closes #2768. The commit-id check prints 9e117792c and a4d2a220b (F11).

Findings: F9 to F12 Minor, F13 Suggestion. None blocks: each is repairable before or after merge and none changes what the code does.

Checked, no finding: unsafe_code is warn and warnings = deny raises it, so the rationale's "denies unsafe" holds; the lock has no portable-pty or pty-process; openpty is used in the spec; each row's severity matches its source bracket.

Checks

On the loop's compute node at this head, against the merge base 7e8df95ec (receipt server-gates-kranich-1237): the repository's pre-commit gate and lint roster exit 0 (536 s wall), and the audit validator passes this pull request's record (10 rows, 3 log entries, 0 failures). In this PR's own target directory at 9e117792c, whose Rust sources this head leaves unchanged (it adds one audit commit), cargo test --workspace passes 4212 tests with 0 failed and 5 ignored across 124 binaries (73 s wall, incremental), and cargo clippy --workspace --all-targets --all-features -- -D warnings is clean. F11 checked against the bytes at posting: lines 47 and 198 of the audit record cite the branch commits a4d2a220b and 9e117792c by id. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "". At posting, develop is 3aa88bf19.

decode is an `unrecognized_response` record on stderr (with the decoded or raw body) followed by the
runtime-failure record; stdout stays empty and the exit code is `1`. A panic is a
`{"kind":"panic","message":"...","location":"..."}` record on stderr (the panic hook replaces the
default plain-text message); the process then ends through the usual runtime-failure path, exit `1`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Minor][F9] A panic outside the check tasks does not end with the runtime-failure record and exit 1

Only the three check probes run in spawned tasks (unified/check.rs:129-141), where a panic becomes a JoinError and then runtime_failure. The http and udp subcommands (unified/app.rs:78-79) and check monitor udp run in the future that #[tokio::main] blocks on, so a panic there writes the panic record and then unwinds out of main: the process exits with the default panic status 101 and writes no runtime-failure record. No input found at this head reaches such a panic (the expects at udp/checker.rs:125 and :128 need a bound socket without a local port), but this sentence states it for every panic, and the description says the same. Narrow it to check, or exit 1 after the record when the panic is in the main future.

introduce a schema version and migration note.
introduce a schema version and migration note. `tracker_client` has no schema version yet: the
`check` result change of issue #2768 is recorded as a documented breaking change here and in the
README, and a schema version is left to a later issue of the EPIC.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Minor][F10] The schema version is deferred to an issue that does not plan it

No open spec of the EPIC (2763, 2766, 2767, 2769 and the close-out 2770) mentions a schema version for tracker_client, so "left to a later issue of the EPIC" points at no plan. Say that no issue tracks it yet, or open one and name it here.


- 2026-11-18 21:11 UTC - Started audit after the reply of round 1, not before it (late start): the record was written once the reply URL existed.
- 2026-11-18 21:11 UTC - Round 1: Copilot's review `5964711849` (submitted 2026-11-18T20:41:22Z, the poller cursor) with one finding. The fix was committed at 21:08:50Z (`git log --format=%cI`) and pushed (fork branch updated, `push_exit=0`). The reply was posted at 21:11:26Z (forge `created_at`), after the push; the thread was resolved by its thread ID, and a GraphQL refresh at 21:11:36Z (`date -u`) showed 0 unresolved threads. `validate-audit-record.py` was not run: it uses plain `gh` and needs the maintainer's permission.
- 2026-11-19 08:27 UTC - Round 2: Copilot's review `5970782901` (07:12:39Z, one body finding) and da2ce7's APPROVED review `5971038339` (07:37:22Z, eight inline findings), all on head `a4d2a220b`; the maintainer and da2ce7 had posted their ACK of that head already. One commit fixed all nine (`9e117792c`, pushed with `push_exit=0`); the PR description was edited; eight replies were posted, then the eight threads were resolved (GraphQL: 0 unresolved). The audit row for Copilot's F2 was written now, as the review had no thread. `validate-audit-record.py` was not run (it uses plain gh).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Minor][F11] The record cites branch commits by id

This entry names 9e117792c and line 47 names a4d2a220b; the commit-id check of open-pull-request prints both, because neither is on develop. A rebase before merge would leave them pointing at nothing. Name the commit subject instead (here docs(tracker-client): [#2768] fix the README example and update the skills and contract), and for this log entry append a correction rather than editing it, as process-pr-review step 5 asks.

- Concern: The PR description's test counts and feature list were stale (9 tests, 71 crate tests, no panic hook).
- Solution: Edited the PR description: 10 tests, 72 crate tests, panic record listed.
- Current-tree verification: checked in the tree after the push of the round 2 commit; see the reply.
- Resolution reference: `docs(tracker-client): [#2768] fix the README example and update the skills and contract`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Minor][F12] F6 credits a commit with a fix made in the description

The description edit lives outside the tree, so process-pr-review asks for the durable URL of the response that states it as the resolution reference; the reply this row cites (#discussion_r4626109994) is that response and says the edit was made with the forge CLI. 9e117792c does not touch the description. The Current-tree verification line above also points at the tree. Cite the reply URL here and say how the description was checked.

`fields`). Every stderr line is one JSON object. A response a tracker returns that the client cannot
decode is an `unrecognized_response` record on stderr (with the decoded or raw body) followed by the
runtime-failure record; stdout stays empty and the exit code is `1`. A panic is a
`{"kind":"panic","message":"...","location":"..."}` record on stderr (the panic hook replaces the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion][F13] Weigh the panic record's location against the ADR that landed on develop

docs/adrs/20261118045443_errors_do_not_record_source_locations.md (on develop after the merge base) rules that errors do not record or print source locations, and keeps file and line for server-side tracing. A panic record is not an error type and the hook does not call Location::caller(), so the rule's letter does not reach it, but this line makes a source path part of the documented output, the coupling of interface to implementation that the ADR's second objection names. Decide whether the record keeps location, and say so here.

@da2ce7

da2ce7 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

ACK 1ca733c — the eight findings of the previous round fixed and every review thread replied to, recorded and resolved, with the audit validator logic passing and a clean trial merge with develop, verified from the bytes at this head

@josecelano

Copy link
Copy Markdown
Member

ACK 1ca733c

@josecelano
josecelano merged commit 1829126 into torrust:develop Nov 19, 2026
22 checks passed
josecelano added a commit that referenced this pull request Nov 19, 2026
ce7ba91 docs(pr-reviews): [#2768] add round 3 finding F12 to the PR 2966 audit (josecelano-bot)
f254134 docs(pr-reviews): [#2768] add the round 2 findings F10 and F11 to the PR 2966 audit (josecelano-bot)
73083f6 docs(pr-reviews): [#2768] cite the first head by subject and F4 by its reply in the PR 2966 audit (josecelano-bot)
97e003d docs(pr-reviews): [#2768] record round 1 in the review audit of PR #2966 (josecelano-bot)
da356dd docs(issues): [#2768] correct the close-out after review round 1 (josecelano-bot)
8c6c8f5 docs(issues): [#2768] close out the tracker_client JSON-only issue (josecelano-bot)

Pull request description:

  Related to #2768 (child of EPIC #2758), closed by PR #2956. This close-out PR does not use a closing keyword.

  - Moves `docs/issues/open/2768-2758-tracker-client-json-only/` to `docs/issues/closed/` (`status: done`, `spec-path`, `related-pr: 2956`, `last-updated-utc`).
  - Ticks the remaining workflow checkpoints (da2ce7 approved the final head of PR #2956 after two review rounds) and adds the progress log entry.
  - Adds `implementation-retrospective.md` (what changed during review: the panic hook, the pseudo-terminal test hang, the documentation sweep that review had to ask for).
  - Marks the EPIC #2758 row of #2768 as DONE with the new path, as #2762, #2764 and #2765 did.

  Checked: `rg '2768-2758-tracker-client-json-only'` finds only the moved spec files and the EPIC row (both updated); the old PR 2771 audit is a historical record and is kept. Documentation only; the pre-commit gate passed.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  da2ce7:
    ACK ce7ba91 — F1 to F12 fixed and every one of the eleven review threads replied to, recorded and resolved, with the audit validator logic passing and a clean trial merge with develop, verified from the bytes at this head
  josecelano:
    ACK ce7ba91

Tree-SHA512: 8d22bebcd3925962665e20574b4d981087f2a32b4871ec28f16ffe7d5281652e8cc1470cf67239eab43739fde694b8ae788ec3ac864830c771b43e982fe82114
josecelano added a commit that referenced this pull request Nov 23, 2026
…DP URL validation fix

c452bc4 docs(pr-reviews): [#2984] add round 9 finding F27 to the PR 2985 audit (josecelano-bot)
6ff01ee docs(issues): [#2984] record the capture procedure for the reproduction runs (josecelano-bot)
0045fb2 docs(pr-reviews): [#2984] close finding F12 in the PR 2985 audit (josecelano-bot)
af89320 docs(issues): [#2984] cite the maintainer's decisions comment in the specification (josecelano-bot)
40bb20b docs(issues): [#2984] make the specification the durable record of the maintainer decisions (josecelano-bot)
6c2ab3b docs(pr-reviews): [#2984] add round 8 finding F26 to the PR 2985 audit (josecelano-bot)
82ba874 docs(issues): [#2984] add the pattern catalog and helper-boundary rule to the test loop (josecelano-bot)
b753ea2 docs(pr-reviews): [#2984] add round 7 findings F24 and F25 to the PR 2985 audit (josecelano-bot)
6fc49b7 docs(pr-reviews): [#2984] append the correction for the round 6 commit count (josecelano-bot)
fa9c997 docs(issues): [#2984] add the test-development loop to the commit points (josecelano-bot)
4d85227 docs(pr-reviews): [#2984] drop the commit id from the F20 title (josecelano-bot)
987e85c docs(pr-reviews): [#2984] add round 6 findings F20 to F23 to the PR 2985 audit (josecelano-bot)
bdcc7a3 docs(issues): [#2984] log the round 6 spec changes (josecelano-bot)
8aa4554 docs(pr-reviews): [#2984] append the correction for the round 4 reply times (josecelano-bot)
cf14c8e docs(pr-reviews): [#2984] cite the reviewed head by subject in finding F19 (josecelano-bot)
a7fc1bd docs(issues): [#2984] say where the replacement panic-hook coverage may live (josecelano-bot)
a7c5f66 docs(issues): [#2984] record the HTTP reproduction as V2 with its verbatim output (josecelano-bot)
a4f410b docs(pr-reviews): [#2984] add round 5 findings F18 and F19 to the PR 2985 audit (josecelano-bot)
bfe4e17 docs(pr-reviews): [#2984] add round 4 findings F15 to F17 to the PR 2985 audit (josecelano-bot)
402f412 docs(issues): [#2984] plan the update of the existing panic-contract test (josecelano-bot)
29b7b02 docs(pr-reviews): [#2984] restore the round 3 log entry and append the correction (josecelano-bot)
241feac docs(issues): [#2984] log the round 5 spec fixes and update last-updated-utc (josecelano-bot)
20da01d docs(issues): [#2984] align the recheck expectations with the cases they recheck (josecelano-bot)
c9c2c52 docs(issues): [#2984] split the HTTP expectations by case: wrong scheme versus no host (josecelano-bot)
4cf09d5 docs(pr-reviews): [#2984] correct the reply times in the PR 2985 audit round 3 entry (josecelano-bot)
480ac7d docs(pr-reviews): [#2984] add round 3 findings F12 to F14 to the PR 2985 audit (josecelano-bot)
8a28371 docs(issues): [#2984] carry decision 2 through the goal, plan, scenarios and risks (josecelano-bot)
d87b2fe docs(issues): [#2984] correct the date and source of the recorded decisions (josecelano-bot)
40a8729 docs(issues): [#2984] record the maintainer decisions on the open questions (josecelano-bot)
9620966 docs(pr-reviews): [#2984] add round 2 findings F9 to F11 to the PR 2985 audit (josecelano-bot)
6d62c18 docs(issues): [#2984] bring the spec progress log and last-updated up to date (josecelano-bot)
558b200 docs(issues): [#2984] rerun the two control cases and record them verbatim (josecelano-bot)
6b43164 docs(issues): [#2984] say how the scheme is detected and cover localhost:6969 in AC4 (josecelano-bot)
0368ccb docs(pr-reviews): [#2984] add the PR 2985 review audit (josecelano-bot)
26eed88 docs(issues): [#2984] identify the build and toolchain of the reproduction (josecelano-bot)
954d392 docs(issues): [#2984] record the reproduction stderr verbatim (josecelano-bot)
391f6b6 docs(issues): [#2984] split the manual scenario into reproduction and recheck rows (josecelano-bot)
628a147 docs(issues): [#2984] state that the scheme check reads the raw entry (josecelano-bot)
25d2856 docs(issues): [#2984] drop the network-free claim for the unresolved-host test (josecelano-bot)
6dda785 docs(issues): [#2984] name the result representation for an unresolved UDP host (josecelano-bot)
dfc93ae docs(issues): add issue specification for #2984 (josecelano-bot)

Pull request description:

  ## Summary

  Adds the issue specification and the initial reproduction evidence for #2984: `tracker_client check` panics on a UDP tracker URL without a usable address (no port, no host, a non-`udp` scheme or an unresolvable host) instead of reporting a configuration error. The spec proposes rejecting such entries during configuration validation (exit `2`, `invalid_configuration`) and making address resolution fallible. It records two maintainer decisions: an unresolvable hostname is a failed check for that tracker (the result record gains a way to hold an unresolved address), and the same host and scheme validation also applies to `http_trackers` and `health_checks` (AC5). The HTTP reproduction is a planned task, not yet done.

  This is a spec-only PR: no production code or test is changed. Related to #2984.

  ## Files touched

  - `docs/issues/open/2984-tracker-client-check-udp-url-validation/ISSUE.md`
  - `docs/issues/open/2984-tracker-client-check-udp-url-validation/manual-verification-evidence.md` (reproduction V1, outcome: Reproduced)

  ## Validation

  - `linter markdown` and `linter cspell` pass; the pre-commit checks (including the frontmatter validator) pass.
  - The reproduction was run on `torrust/develop` after PR #2956; the commands and output are in the evidence file.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  josecelano:
    ACK c452bc4

Tree-SHA512: ab18d623f5f8eaffb3f945587e26c1d53384244b6d626862e0a3df789ac1bd741ca2280f4ba70b880d65b1d2fc2b16e8947db63c7c068bff80cac4272f1d6624
josecelano added a commit that referenced this pull request Nov 24, 2026
…er_client results

8130123 docs(pr-reviews): [#3006] record review round 14 of PR #3008 (josecelano-bot)
21dff9b docs(pr-reviews): [#3006] record no-change findings F32 and F33 as superseded (josecelano-bot)
69466ca docs(pr-reviews): [#3006] record review round 12 of PR #3008 (josecelano-bot)
a9e63db docs(pr-reviews): [#3006] tie the F27 row to its thread root (josecelano-bot)
32138b8 docs(pr-reviews): [#3006] record review rounds 10 and 11 of PR #3008 (josecelano-bot)
25f1dd0 docs(issues): [#3006] name the first-run-green exception in the T2 row and the loop (josecelano-bot)
378de2e docs(pr-reviews): [#3006] record review rounds 8 and 9 of PR #3008 (josecelano-bot)
45e486a docs(issues): [#3006] make T2 red-green increments agree with the test loop (josecelano-bot)
6099880 docs(pr-reviews): [#3006] record review rounds 6 and 7 of PR #3008 (josecelano-bot)
779e0fe docs(pr-reviews): [#3006] record review round 5 of PR #3008 and drop branch commit ids (josecelano-bot)
93a1f20 docs(issues): [#3006] state the test-loop gates and the completion-review rule (josecelano-bot)
ce5c5ba docs(pr-reviews): [#3006] record review round 4 of PR #3008 (josecelano-bot)
ecb74bf docs(issues): [#3006] say that agent-reply-validator uses a schema version (josecelano-bot)
df39a52 docs(pr-reviews): [#3006] record review rounds 2 and 3 of PR #3008 and correct a log entry (josecelano-bot)
a2c0fc4 docs(issues): [#3006] trace the D4 and D5 answers and keep decisions and ACs in order (josecelano-bot)
050778b docs(pr-reviews): [#3006] audit record of the first review round of PR #3008 (josecelano-bot)
b4ebacd docs(issues): [#3006] say that --format text is pretty-printed JSON (josecelano-bot)
001b226 docs(issues): [#3006] move http scrape entries under files and name all consumers (josecelano-bot)
076c87b docs(issues): [#3006] link spec-only PR #3008 (josecelano-bot)
82f79ad docs(issues): [#3006] spec for a schema version in tracker_client results (josecelano-bot)

Pull request description:

  Related to #3006 (EPIC #2758)

  ## Summary

  Spec-only PR: adds the issue specification for #3006, which adds a schema version to every `tracker_client` stdout result. #2768 changed the `check` result from a top-level array to `{"results": [...]}` without a version (PR review audit of #2956, row F7); this issue owns the version.

  The maintainer's decisions are recorded in the spec:

  - D1: the rule lives in the global CLI output contract ADR, for every `stdout-result-data` tool; this issue applies it to `tracker_client`. This issue merges before #2770, which also edits that ADR.
  - D2: a top-level integer `schema_version` on every stdout result object, not on stderr diagnostics.
  - D3: the first value is `1`. It marks two breaking shape changes: the `check` array-to-object change of #2768 and the `http scrape` change of D4.
  - D4 (decided in this review): the `http scrape` result, today a top-level map keyed by info-hash, moves under `files` (`{"schema_version": 1, "files": {"<info-hash>": {...}}}`), and the ADR rule adds that a result object never uses data as its top-level keys.
  - D5 (decided in this review): the UDP result keeps its variant tag, with the field beside it (`{"schema_version": 1, "Scrape": {...}}`).

  The spec also names the four render paths that today pass a rendered string to `output::write_result`, so the implementation replaces that writer with one that takes the value and adds the field, and it lists the package tests, six skills and the README as consumers to update.

  ## Files

  - `docs/issues/open/3006-2758-tracker-client-schema-version/ISSUE.md` (new): the specification.
  - `docs/pr-reviews/pr-3008-review/PR-REVIEW.md` (new): the review audit record of this PR.

  No code changes. Implementation waits for this PR to merge. The EPIC row for #3006 and its order before #2770 are in the coordinator's PR #3007.

  ## Validation

  - `linter all` passes.
  - Pre-commit checks (frontmatter validator included) pass.
  - The audit validator (`validate-audit-record.py`) passes on the record.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
  <!-- coderabbit-ai-generated:v1 -->

  ## Summary by CodeRabbit

  * **Documentation**
    * Added a planned specification for versioning tracker client output, including the proposed output shape, compatibility considerations, implementation steps, and verification criteria. The implementation is not yet complete.
    * Added a PR review audit covering 31 findings, their dispositions and resolutions, review-thread status, validation results, and processing history. It distinguishes re-raised findings and records threads that remain open.
  <!-- end of auto-generated comment: release notes by coderabbit.ai -->

ACKs for top commit:
  josecelano:
    ACK 8130123

Tree-SHA512: 3e79aee7fa9b78331ff307a28ae97767282cfbb6354076ba748e1da947288ce3ce526ce2671313ee75d99a42a8ecede148ea40394667ec406c5fb67717183f6f

This branch was previously deployed

1 inactive deployment
coverage — 1ca733c7 Deployed Nov 19, 2026 by josecelano-bot via Generate Coverage Report #3345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tracker_client: TTY refusal and JSON-only output

4 participants