"""Envelope tests for ``muse annotate --json``.""" from __future__ import annotations import json import pytest from tests.cli_test_helper import CliRunner runner = CliRunner() class TestAnnotateEnvelope: def test_show_has_envelope(self) -> None: # annotate with no mutation flags = show mode r = runner.invoke(None, ["annotate", "--json"]) assert r.exit_code == 0, r.output d = json.loads(r.output) for field in ("muse_version", "schema", "timestamp", "warnings"): assert field in d, f"missing {field}" assert "schema_version" not in d