Repository navigation
Description
Description
Provide machine-readable output for the operator commands used in CI: active-version, auth status, build, config gc, config validate, deploy, healthcheck, provision and rollback. Main currently provides a JSON format only for config diff.
The interface is decided: each in-scope command accepts --format json, never a boolean --json. Existing human-readable output remains the default. PR #388 contains the proposed implementation and specification but is not merged.
Steps to reproduce
Inspection steps (no commands/tests executed):
- Inspect current config-diff-only output format and the other command argument structs.
- Inspect provision logging.
- Compare current human-oriented results with the schemas and stream policy proposed in PR #388.
Expected behavior
Scripts receive the approved JSON schema on stdout on success and failure; diagnostics and child output cannot corrupt it. Existing invocations and config diff --format json remain compatible.
Impact
Operators currently parse prefixed log lines or unstable prose to gate pipelines and capture deployment/lifecycle results.
Proposed fix
Honor the original process requirement: review and approve the output specification before accepting implementation. The spec must settle enum sharing versus diff-only values, the human format name, stdout/stderr policy, failure representation, version/compatibility guarantees and bundled typed-command stub handling. It must define every command’s result schema.
Review PR #388 against that approved contract, including child-process/log routing and per-command success/failure paths. Its proposed OutputFormat { Text, Json } and versioned envelope are branch choices pending the required approval and merge; do not present them as an existing mainline guarantee.
Done when
- An output spec resolving all six design questions and per-command schemas is approved; record the approval before implementation acceptance.
- All nine in-scope commands accept
--format jsonand emit the approved success/failure JSON on stdout. - Human-readable output stays the default; existing invocations keep their behavior.
- No boolean
--jsonflag is added. - Diagnostics, logs and child stdout are routed so they cannot corrupt JSON data.
-
config diff --format jsonremains unchanged, and bundled typed-command stubs follow the approved policy. - Tests parse and assert structure for every in-scope command, including failures.
- CLI docs publish the format/schema and compatibility policy.
- All required CI gates pass on the merge candidate.
Related
PR #388 is the fully covering open implementation PR; current config-diff-only output format.
Activity
[-]Add --json output across the CLI[/-][+]Add --format json to operator CLI commands[/+]