Goal
Both CLIs write the JSON report only to a file (--json-report). Add --json so the report is printed to stdout — making CI assertions possible without a temp file, matching the pattern sorseal verify --json uses in the sister repo.
Scope
- Add
--json to the test subcommand in both CLIs: schemalock/cli.py and rust/src/main.rs.
- When set, print the same payload as
--json-report to stdout instead of (or in addition to) the console summary; --json and --json-report may be combined.
- Keep exit codes unchanged (0 all pass / 1 any fail / 2 error).
- Extend scripts/parity_check.py (or a new case) so the
--json stdout output is compared between the two implementations.
Why
Machine-readable stdout is the building block for CI and the future GitHub Action; today CI scrapes human console text. It also strengthens the cross-language equivalence claim by comparing the stdout path, not just the file path.
Success criteria
schemalock test --json prints a single valid JSON document on stdout and exits 0/1 exactly as the console mode.
- Python and Rust
--json stdout output is byte-identical against the shared mock server (correct and broken contracts).
pytest, cargo test --locked, fmt/clippy/ruff, and the parity job all pass.
Goal
Both CLIs write the JSON report only to a file (
--json-report). Add--jsonso the report is printed to stdout — making CI assertions possible without a temp file, matching the patternsorseal verify --jsonuses in the sister repo.Scope
--jsonto thetestsubcommand in both CLIs: schemalock/cli.py and rust/src/main.rs.--json-reportto stdout instead of (or in addition to) the console summary;--jsonand--json-reportmay be combined.--jsonstdout output is compared between the two implementations.Why
Machine-readable stdout is the building block for CI and the future GitHub Action; today CI scrapes human console text. It also strengthens the cross-language equivalence claim by comparing the stdout path, not just the file path.
Success criteria
schemalock test --jsonprints a single valid JSON document on stdout and exits 0/1 exactly as the console mode.--jsonstdout output is byte-identical against the shared mock server (correct and broken contracts).pytest,cargo test --locked, fmt/clippy/ruff, and the parity job all pass.