Adds tests/contracts/test_openapi_baseline.py which loads the live
FastAPI app and diffs its OpenAPI schema against a checked-in baseline.
Fails on:
- Any removed path or operation
- Any removed response status code on an existing operation
- Any new required request body field (would break existing clients)
Passes silently on additive changes. The baseline is regenerated by
running tests/contracts/regenerate_baseline.py — only when a contract
change has been reviewed and every consumer (admin-compliance,
developer-portal, SDKs) has been updated in the same change set.
This is the safety harness for the Phase 1 backend-compliance refactor:
every subsequent refactor commit must keep this test green.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>