"""Contract parity tests checking that all schema contracts match version 1.0.0.""" import json from pathlib import Path def test_all_contract_schemas_version_1_0_0(): contracts_dir = Path("specs/006-article-consolidation-runtime/contracts") schema_files = list(contracts_dir.glob("*.schema.json")) assert len(schema_files) >= 5 for sf in schema_files: data = json.loads(sf.read_text(encoding="utf-8")) version = data.get("x-contract-version") or data.get("version") # Assert each schema declares version 1.0.0 assert version == "1.0.0", f"Schema {sf.name} version is {version}, expected 1.0.0"