You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
package-coverage-check: NDJSON errors, usage exit 2, TTY refusal and a JSON summary #2762
package-coverage-check follows the stdout-result-data contract for all three subcommands, and the coverage workflow consumes the new summary result.
Background
contrib/dev-tools/checks/package-coverage-check/src/main.rs writes plain-text errors to stderr (package-coverage-check: <error>), exits 1 for every failure including a usage error, does not refuse a TTY, and summary prints Markdown. ADR docs/adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md (section 3) requires NDJSON errors, usage error exit 2, TTY refusal, and summary returning one JSON object that carries the Markdown (for example in a markdown field). .github/workflows/generate_coverage_pr.yaml calls matrix (output into $GITHUB_OUTPUT), compare (redirected to a file) and summary (appended to $GITHUB_STEP_SUMMARY, around lines 49-54 and 150-160); the summary step must extract the field.
The contract in short: see the ADRs docs/adrs/20260519000000_define_global_cli_output_contract.md and docs/adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md.
In scope
NDJSON error records with a kind on stderr for every failure; empty stdout on failure.
Usage errors exit 2; runtime failures exit 1.
TTY refusal (exit 2, tty_refusal record) for all subcommands.
summary emits one JSON object with the Markdown in a markdown field; update generate_coverage_pr.yaml to extract it (for example jq -r .markdown).
Tests for the new shapes.
Out of scope
Changing the coverage computation or the matrix and compare result schemas beyond what the contract needs.
Editing the ADR.
Acceptance criteria
Every failure writes one JSON record with a kind to stderr and nothing to stdout.
A usage error exits 2; a runtime failure exits 1.
Running with stdout on a TTY exits 2 with a tty_refusal record.
summary prints one JSON object whose markdown field is the former report.
The workflow step summary shows the same Markdown as before.
The full specification (implementation plan, verification plan, files this issue may touch) is added by the spec PR under docs/issues/open/.
Activity
Merge #2771: docs(issues): [#2758] add the specs of the CLI output co…
fix(package-coverage-check): [torrust#2762] keep pipefail on the summ…
docs(pr-reviews): [torrust#2762] record the PR 2810 review round 1 audit
docs(pr-reviews): [torrust#2762] address PR 2810 review round 2
docs(pr-reviews): [torrust#2762] address PR 2810 review round 3
docs(pr-reviews): [torrust#2762] add the PR 2810 review retrospective
test(package-coverage-check): [#2762] failing tests for the CLI outpu…
fix(package-coverage-check): [#2762] follow the CLI output contract
docs(issues): [#2762] record verification evidence and progress
Merge torrust#2810: fix(package-coverage-check): [torrust#2762] follo…
docs(issues): [torrust#2762] take the close-out stamps from the commi…
docs(issues): [torrust#2762] address PR 2820 review round 1
docs(issues): [#2762] close out the package-coverage-check issue
Merge #2820: docs(issues): close out the package-coverage-check issue
Merge #2966: docs(issues): close out the tracker_client JSON-only issue