Skip to content

docs(adrs): [#2715] scope the CLI output contract and keep exit codes to 0, 1 and 2 - #2748

Merged
josecelano merged 10 commits into
torrust:developfrom
josecelano-bot:2715-cli-output-contract-scope-and-exit-code-policy
Nov 6, 2026
Merged

josecelano merged 10 commits into
torrust:developfrom
josecelano-bot:2715-cli-output-contract-scope-and-exit-code-policy

Conversation

@josecelano-bot

Copy link
Copy Markdown
Contributor

Summary

Records the two decisions the global CLI output contract ADR left open (#2715).

  • Scope: the contract covers operator binaries and the AI-agent and CI tools, wherever they live. Developer-only diagnostics (profiling, benchmarks, examples, tests) stay out.
  • Exit codes: only 0, 1 and 2. A distinct outcome is a kind: a stdout result with exit 0 when it is the answer asked for, a stderr diagnostic with exit 1 when the command could not answer. no-stdout-result checks exit 1 on a finding.
  • Form: a new root ADR, an "Amended by" note in ADR 20260519000000, and an index entry.

Follow-up (not in this PR): github-review-threads reply-status should return a missing reply as a result with exit 0.

Closes #2715

🤖 Generated with Claude Code

josecelano-bot and others added 2 commits November 6, 2026 10:25
…it codes and ADR form

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…t codes to 0, 1 and 2

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@josecelano
josecelano requested review from da2ce7 and a balanced review from Copilot November 6, 2026 10:35
@josecelano josecelano self-assigned this Nov 6, 2026

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

2 open issues
What changed in this PR

Documents the remaining open decisions from #2715 about the global CLI output contract: what programs the contract applies to and how exit codes should be used.

Changes:

  • Add a new root ADR formalizing scope and the 0/1/2 exit code + kind outcome policy
  • Add an “Amended by” pointer note to the existing global CLI output contract ADR
  • Update the ADR index and the #2715 issue spec status/evidence to reflect completion
File Description
docs/​issues/​open/​2715-cli-output-contract-scope-and-exit-code-policy/​ISSUE.md Records maintainer decisions, updates task/AC statuses, and adds verification evidence.
docs/​adrs/​index.md Registers the new ADR in the ADR index table.
docs/​adrs/​20261106102632_scope_the_cli_output_contract_and_keep_exit_codes_to_zero_one_two.md New ADR defining scope and exit code/outcome (kind) policy, plus alternatives and consequences.
docs/​adrs/​20260519000000_define_global_cli_output_contract.md Adds “Amended by” note pointing to the new ADR and clarifying precedence.

Review effort: Lite

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

The ADR contains contradictory guidance on usage-error exit codes and omits the in-scope package-coverage-check tool from its classification and migration follow-ups.

4 open issues

Review effort: Balanced

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.

@josecelano

Copy link
Copy Markdown
Member

ACK 2bd814c

@josecelano
josecelano requested a balanced review from Copilot November 6, 2026 14:22
@josecelano
josecelano merged commit 5400e58 into torrust:develop Nov 6, 2026
1 check passed

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

2 open issues
2 resolved since last review

Review effort: Lite

Comment on lines +143 to +145
- Original issue: #1798; poller that raised the questions: #2581
- Torrust Index ADR-T-010:
<https://github.com/torrust/torrust-index/blob/develop/adr/010-global-command-line-output-contract.md>
---
pr-number: 2748
pr-url: https://github.com/torrust/torrust-tracker/pull/2748
last-updated-utc: "2026-11-06 14:14"
josecelano added a commit that referenced this pull request Nov 6, 2026
…ssues/closed

07d35a1 chore(issues): archive closed issue #2715 spec to docs/issues/closed (josecelano-bot)

Pull request description:

  Archives the spec for issue #2715 (closed on GitHub) from `docs/issues/open/` to `docs/issues/closed/`.

  - Verified #2715 is `CLOSED` on GitHub (closed by #2748)
  - Updated frontmatter (`status: done`, `spec-path`, `last-updated-utc`) and the workflow checkboxes
  - Repaired the live path references in ADR `20261106102632`; the PR 2716 review record is a historical record and is unchanged
  - AC3 and task T4 (follow-up issues for `github-review-threads reply-status` and `package-coverage-check`) are not done here: the progress log records that the maintainer moved them to a new migration EPIC
  - `linter markdown` and the frontmatter validator pass

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

ACKs for top commit:
  josecelano:
    ACK 07d35a1

Tree-SHA512: c8ca2af6a9c5e26f5e66d151ecd76b10deb55f898e41a7c0d9b478a986c8cbb2aba00ee600a0e95243a1b45da05875b96e5d9238cffe12f58c68909b79c98c31
@da2ce7

da2ce7 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Post-merge note: this pull request requested a review from this account and was closed without one at its final head. A post-merge review will not be done: It recorded an architecture decision on the scope of the command-line output contract and its exit codes, changing only documents under docs/, with no executable code, build or CI effect.

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.

Decide the scope and the exit-code policy of the global CLI output contract

4 participants