Skip to content

Update multiple microservices

Use Polygraph to change a contract that several services touch.

You're adding a field to an event or message shape that three services share (one publisher, two consumers). Before the publisher change can land, you need to be sure the consumers don't break. The work is a single change (in a monorepo this would be one PR).

Add `acme/orders-service`, `acme/billing-service`, and `acme/notifications-service`
to this session.
Add a `currency` field to the `OrderPlaced` event.
- `orders-service` publishes it
- `billing-service` and `notifications-service` consume it.

The agent reads every consumer before touching the publisher. That order prevents the "publisher ships, consumers explode" problem. Polygraph helps you detect which downstream consumers may break with the changes. Open PRs to consumer repos to gracefully handle the publisher changes prior to shipping them out.

Everything is tracked in a single session so you and your agents don't lose context.

For contract changes, merge order matters. Usually the publisher merges last and consumers first, so consumers tolerate the new field before it appears on the wire. Encode that in the session:

Once both consumer PRs are reviewed and green in CI, mark them ready. Hold
the publisher PR as a draft.

Once the consumer changes are live, you can resume the session with polygraph session resume <session-id> and prompt:

Mark the publisher PR as ready for review.