Show HN: Pacto – OCI-distributed contracts for cloud-native services

  • Posted 9 hours ago by edu-diaz
  • 1 points
https://github.com/trianalab/pacto
Author here.

I work as a platform engineer and kept running into the same problem: services are described in fragments across different tools.

APIs live in OpenAPI specs. Deployment assumptions end up in Helm values. Runtime details are hidden in Kubernetes manifests. Configuration lives in environment variables. Dependencies are often documented in READMEs or tribal knowledge.

There is no single machine-readable contract that describes how a service actually behaves operationally.

So I started building Pacto.

Pacto defines a contract for cloud-native services that captures things like:

• interfaces (HTTP, gRPC, events) • runtime semantics (stateless, stateful, hybrid) • dependencies between services • configuration schema • scaling expectations

All of this lives in a single pacto.yaml file and can be packaged and distributed as an OCI artifact.

The idea is that platforms, CI systems, and tooling can reason about services without guessing or reverse-engineering deployments.

For example the CLI can already:

• validate service contracts • detect breaking operational changes (pacto diff) • resolve dependency graphs • package contracts as OCI artifacts

One part I found particularly useful is making state semantics explicit, for example:

runtime.state.type: stateless | stateful | hybrid

That allows platforms to reason about storage, lifecycle and scaling without relying on implicit assumptions.

The project is still early but already usable. Curious to hear feedback from other platform or infrastructure engineers.

0 comments