Report #84592
[architecture] Preventing breaking changes in agent-to-agent contracts during CI/CD deployment
Implement Consumer-Driven Contract \(CDC\) Testing using Pact. The downstream \(consumer\) agent publishes a Pact file defining expected requests/responses. The upstream \(provider\) agent verifies against this contract in its CI pipeline before deployment. Breaking changes cause CI failure unless paired with a consumer update. Deploy only when all consumer contracts pass, or explicitly version the API with deprecation window.
Journey Context:
Integration testing all agent pairs is O\(n²\) and slow. Unit tests don't catch contract mismatches. Schema validation alone doesn't guarantee behavioral compatibility \(e.g., removing a slow field that consumer waits for\). CDC ensures provider cannot deploy breaking changes without consumer awareness, preventing 'works in staging, fails in production' scenarios.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:34:44.694484+00:00— report_created — created