Repository navigation
Description
Part of EPIC #2758. Order 2 of 11, wave 1.
Goal
github-review-threads reply-status reports threads without a reply as a JSON result on stdout with a kind and exit 0, and the skills that rely on the old exit 1 are updated in the same change.
Background
Today reply-status exits 1 and writes a missing_reply diagnostic to stderr when an unresolved thread has no reply (contrib/dev-tools/github/github-review-threads/src/main.rs, around the missing_reply record, and tests/cli.rs). The ADR docs/adrs/20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md says a thread without a reply is an answer to what the caller asked, so it is a result with exit 0. Failure to fetch or parse stays exit 1, a usage error exit 2. resolve-review-threads/SKILL.md (Batch Pattern and checklist) says the command 'exits with code 1 and a missing_reply JSON record'; fetch-review-threads/SKILL.md also describes reply-status. The batch scripts under resolve-review-threads/scripts/ do not call reply-status; verify that. Callers must now branch on the result kind (for example with jq -e), not on the exit code.
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
- Define the result: one JSON object on stdout with a
kind(for exampleall_repliedandmissing_reply) and the per-thread rows (has_reply). - Exit
0for both kinds;1only if the tool could not answer;2for usage and TTY refusal (unchanged). - Update unit and CLI tests, including the fixture-based tests in
tests/cli.rs. - Update
resolve-review-threads/SKILL.md,fetch-review-threads/SKILL.mdand any other skill or doc that cites the exit1, with thejq -ebranching recipe.
Out of scope
- Changing
fetch,listorshowoutput. - Editing the ADR (the close-out issue does).
- Changing the batch resolver scripts unless they are found to depend on the exit code.
Acceptance criteria
reply-statuson a threads file with a thread without a reply prints one JSON result with akindand exits0.- On a fully replied file it prints the matching
kindand exits0. - A fetch or parse failure exits
1with empty stdout and a JSON diagnostic; a usage error exits2. - The skills describe the new branching and no document claims exit
1for a missing reply.
The full specification (implementation plan, verification plan, files this issue may touch) is added by the spec PR under docs/issues/open/.
Activity
test(github-review-threads): [torrust#2761] cover malformed threads J…
docs(skills): [torrust#2761] make the reply-status gate fail on could…
docs(issues): [torrust#2761] record the prose-first test design revie…
docs(pr-reviews): [torrust#2761] audit Copilot review round 1 of PR 2775
feat(github-review-threads): [#2761] report a missing reply as a resu…
Merge torrust#2775: feat(github-review-threads): [torrust#2761] repor…
docs(issues): [torrust#2761] leave the spec-only PR checkpoint untick…
docs(issues): [torrust#2761] name both process gaps in the retrospect…
docs(issues): [torrust#2761] state that reviewers ACKed in the merge …
docs(issues): [torrust#2761] record in the progress log why no retros…
docs(issues): [torrust#2758] use the bare DONE status for the torrust…
chore(issues): archive closed issue #2761 spec to docs/issues/closed
Merge #2779: chore(issues): archive closed issue #2761 spec to docs/i…
Merge #2771: docs(issues): [#2758] add the specs of the CLI output co…