Gate5 Consumer-Driven Mock Contract Checks
Objective
Ensure client-facing payload contracts remain compatible before release by validating generated mock responses from the authoritative Platform API OpenAPI spec.
CI Gates
contracts-governance must run both:
bash contracts/scripts/mock-smoke-test.shbash contracts/scripts/mock-consumer-contract-test.sh
Consumer Scope
Current consumer-driven assertions include:
- Trading CLI lane expectations on
/v1/research/market-scanand/v1/strategies. - OpenClaw lane expectations on
/v2/conversations/sessionsand/v2/conversations/sessions/{sessionId}/turns.
Failure Semantics
Merge is blocked when either check fails for any of:
- route/routing breakage,
- missing required client envelope fields,
- non-conforming session/turn shape for OpenClaw lane flows.
Traceability
contracts/scripts/mock-smoke-test.shcontracts/scripts/mock-consumer-contract-test.sh.github/workflows/contracts-governance.ymldocs/architecture/INTERFACES.md