ENGINEERING

Verify consumer contracts against a proposed spec change

When a provider opens a spec-change PR, replay every registered consumer contract against the proposed schema and block the merge if any consumer's expectations would break.

CategoryEngineering
Enginesim
Difficultyadvanced
Triggerevent
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerSpec-change pull request openedGitHubGitHub
  • ActionFetch proposed spec and consumer contractsPostgreSQLPostgres
  • ActionReplay each consumer contract against specShell
  • LogicAny consumer contract failing?
  • ActionPage provider on-call on failurePagerDutyPagerDuty
  • OutputSet blocking or passing commit statusGitHubGitHub

What it does

Runs consumer-driven contract verification on spec changes. It collects the contracts each consumer has registered (the requests they send and responses they expect), validates them against the proposed provider spec, and fails the check the moment a consumer expectation is no longer satisfiable.

When to use it

Use this when you practice consumer-driven contracts and need provider-side enforcement: the provider should not be able to merge a spec change that silently breaks a known consumer. It complements unit tests by checking real, registered expectations rather than assumptions.

How it works

  1. 1A pull request touching the spec triggers the run from GitHub.
  2. 2The flow fetches the proposed spec and pulls all registered consumer contracts from a Postgres registry.
  3. 3A shell step replays each contract against the proposed spec and records pass or fail.
  4. 4A logic branch checks for any failed contract.
  5. 5On failure it sets a blocking commit status on the GitHub PR and pages the provider on-call via PagerDuty with the failing consumers.
  6. 6On success it sets a passing status.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect ShellRun sandboxed commands inside the workspace.
  4. 4
    Connect PagerDutyIncidents, on-call, escalations.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.