Originally created by: fu351
Every JSON-emitting command in the CLI uses the compact, diff-friendly form json.dumps(..., sort_keys=True, separators=(",", ":")): scan (src/doberman/cli/main.py:305), status (:800), doctor (:844), log --jsonl (:1333), policy-history (:1630). tune --json (:1237) forgot the separators= argument, so its output is the spaced form:
tune --json -> {"approval_rate_by_reason": {"egress_requires_auth": {"approved": 0, ...
status --json -> {"doberman_version":"0.18.1","elevations":[],...
The shared JSON-output contract (docs/CLI.md, "machine-readable output") promises the compact form.
What to do
separators=(",", ":") to the json.dumps call at main.py:1237.tests/unit/test_cli_tune_json.py, shaped like tests/unit/test_cli_scan_json.py: run tune --json against a seeded temp repo, json.loads the output, and assert the raw text contains neither ", " nor ": ".pytest tests/unit/test_cli_tune_json.py green.Formatting only; no field or schema changes.
Ticket changed by: fu351