Something went wrong. Try again.
personal memory agent
Something went wrong. Try again.
Python
1234567891011121314151617181920212223242526272829303132333435363738# SPDX-License-Identifier: AGPL-3.0-only# Copyright (c) 2026 sol pbc
"""Detect breaking changes in the generated native-client OpenAPI contract."""
from __future__ import annotations
import jsonimport sysfrom pathlib import Path
from solstone.convey.contract.assemble import build_documentfrom solstone.convey.contract.diff import classify_changes
ARTIFACT_PATH = Path("docs/openapi/convey-clients.json")
def main() -> int: current = build_document() committed = json.loads(ARTIFACT_PATH.read_text(encoding="utf-8")) breaking = classify_changes(current, committed) if not breaking: return 0
for item in breaking: print(item, file=sys.stderr) print( "OpenAPI contract breaking changes detected: " f"{len(breaking)} item(s) above. If intentional, run `make openapi` " "to re-pin and notify native-client owners; otherwise revert.", file=sys.stderr, ) return 1
if __name__ == "__main__": raise SystemExit(main())