Skip to content

schemalock test --json stdout mode (Python + Rust parity) #16

Description

@ToryMic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    drips-waveStellar Wave Program — Drips issueenhancementNew feature or requestgood first issueGood for newcomersmediumWorth 150 Points (Base + 50 Complexity Bonus)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions