Repository navigation
Description
Parent EPIC: #2758 - Migrate the CLI tools to the global output contract
Goal
Every result object that tracker_client writes on stdout carries a schema version, so a consumer can detect a breaking change of the output shape instead of failing on it.
Background
#2768 changed the check result from a top-level array to {"results": [...]}, a breaking change. tracker_client has no schema version, so it was recorded only as a note in its I/O contract doc (console/tracker-client/docs/contracts/tracker-cli-io-contract.md) and README, which leave a version to a later issue of the EPIC (PR review audit of #2956, row F7). This issue owns it. The global CLI output contract ADR (docs/adrs/20260519000000_define_global_cli_output_contract.md) defines no version field for stdout-result-data tools today.
Decisions (maintainer)
- D1: the rule lives in the global contract ADR, for every
stdout-result-datatool; this issue applies it totracker_client. Other tools adopt it when they next change shape. This issue must merge before Close the CLI contract migration: update the ADR notes and the EPIC #2770, which also edits that ADR. - D2: the field is
schema_version, an integer, at the top level of every stdout result object ({"schema_version": 1, ...}), not on stderr diagnostics. - D3: the first value is
1, marking the shape aftertracker_client: TTY refusal and JSON-only output #2768.
Scope
- Amend the global contract ADR with the rule.
- Add the field to every result:
http announce,http scrape,udp announce,udp scrape,check(each in both--formatvalues) and thecheck monitor udpsummary, through one result writer inunified/output.rsthat takes the value instead of a rendered string. - Update the contract doc and README, and every repository consumer of the stdout (package tests, e2e checker helper, skills that pipe it to
jq).
Out of scope: versions for other tools, masking the tracker key (separate bug), any other shape change.
Acceptance Criteria
- AC1: Every stdout result of
tracker_clienthas a top-level integerschema_versionequal to1. - AC2: The contract doc states when the version is bumped and lists the change that the current value marks.
- AC3: The global contract ADR states the rule for all
stdout-result-datatools. - AC4: Every consumer of the
tracker_clientstdout in the repository still works.
The full specification (implementation plan, verification plan) is added in a spec-only PR under docs/issues/open/.
Activity
docs(issues): [torrust#3006] link spec-only PR torrust#3008
docs(issues): [torrust#2758] address da2ce7's review 6023338079 of PR…
docs(issues): [torrust#3004] fix the review round 1 findings in the spec
docs(issues): [torrust#3006] move http scrape entries under files and…
docs(issues): [torrust#3006] say that --format text is pretty-printed…
docs(pr-reviews): [torrust#3006] audit record of the first review rou…
docs(issues): [torrust#3006] trace the D4 and D5 answers and keep dec…
docs(pr-reviews): [torrust#3006] record review rounds 2 and 3 of PR t…
docs(issues): [torrust#3006] say that agent-reply-validator uses a sc…
docs(pr-reviews): [torrust#3006] record review round 4 of PR torrust#…
docs(issues): [torrust#3006] state the test-loop gates and the comple…
docs(pr-reviews): [torrust#3006] record review round 5 of PR torrust#…
docs(pr-reviews): [torrust#3006] record review rounds 6 and 7 of PR t…
docs(issues): [torrust#3006] make T2 red-green increments agree with …
docs(pr-reviews): [torrust#3006] record review rounds 8 and 9 of PR t…
docs(issues): [torrust#3006] name the first-run-green exception in th…
docs(pr-reviews): [torrust#3006] record review rounds 10 and 11 of PR t…
docs(pr-reviews): [torrust#3006] tie the F27 row to its thread root
docs(pr-reviews): [torrust#3006] record review round 12 of PR torrust…
docs(pr-reviews): [torrust#3006] record no-change findings F32 and F3…
docs(pr-reviews): [torrust#3006] record review round 14 of PR torrust…
docs(issues): [#2758] add #3004 and #3006 to the EPIC and the #2770 s…
Merge #3007: docs(issues): [#2758] add #3004 and #3006 to the EPIC an…
docs(issues): [#3006] spec for a schema version in tracker_client res…
Merge #3008: docs(issues): [#3006] spec for a schema version in track…
Merge #3027: docs(issues): [#2758] start #2766 after #2387 SI-1 inste…