Impact consumers and evidence¶
Impact analysis walks the declared dependencies of the changed service. This page covers the consumers it finds through other edges and how it judges the age of the evidence behind each one.
Configuration-reference consumers¶
A service that takes a configuration schema from the changed service by ref
is a consumer too. Pacto selects its configuration in the new revision and
checks its inline and environment values against that schema. With a
dependency too, the stricter of the range and values verdicts speaks.
- Values that pass give
compatible. - Values that fail give
incompatible, and the note lists each violation asconfiguration <name>: <violation> against <provider>@<version>. - A selection that fails in a 2.4 consumer gives
incompatible. unknownremains when the consumer's values or the new schema cannot be read, or an older consumer's selection fails, and the note says why.
These consumers carry declared confidence and feed the
release gate: a BREAKING change with one of
them never ends clear.
A configuration reference that is neither digest-pinned nor locked cannot be
placed on a revision. When such references name the changed service, by
repository or by name, the
answer adds a CONFIG_REF_CONSUMERS_UNRESOLVED limitation and its
completeness is partial, so the gate stays unverified.
Policy referrers¶
A service that references a policy the changed service publishes is a
consumer too, with via: policy_reference. Pacto checks the referrer's
contract against the new revision's policy:
- A contract that passes gives
compatible. - A contract that fails gives
incompatible, whatever the classification. The gate isblockedwhen the referrer runs on a known target andunverifiedotherwise. unknownremains when the check cannot decide, and the answer adds a countedPOLICY_REFERRERS_UNCHECKEDlimitation.
A BREAKING change with referrers never ends clear. Policy references that
are neither digest-pinned nor locked add POLICY_REF_CONSUMERS_UNRESOLVED and
make the answer partial. A change of any classification with an unchecked or
unresolved referrer ends unverified: the diff can miss a policy the provider
tightened, so a referrer Pacto could not check is never taken as safe. A
referrer the viewer may not see is never named; the answer counts it in
hidden (consumers.hidden in the dashboard).
A golden path that references the policy runs nowhere, so it is never a
consumer and never holds the gate. The answer lists it in templates to
review: a service created from it checks against the new policy.
Observed consumers¶
Observed edges come from OpenTelemetry traces via --traces <file>. Beyond
corroborating declared consumers, traces surface observed-only (shadow)
consumers: services seen calling the changed service without declaring the
dependency. With traces they appear as direct consumers at observed confidence.
Consumers from the organization index¶
Every pacto publish, pacto push and pacto ci --publish writes one entry
per published version to <registry>/pacto-index. <registry> comes from the
provider reference as for the target snapshot:
ghcr.io/acme/contracts/ledger tries ghcr.io/acme/pacto-index, then
ghcr.io/pacto-index. --index names another <registry>/pacto-index, with
no tag or digest, and --index none reads none. Any --root skips it, since
--root names the consumers. A --local tree that holds the changed service
also skips it: impact judges that local copy, which the published consumers
do not depend on.
pacto impact lists the index by tag and reads each service's newest entry.
It refuses an entry not bound to its tag, its index host and its service's
bundle repository, then pulls each selected consumer's bundle by digest and
judges its declared dependency. Each code below makes the answer partial, so a
BREAKING change never ends clear on the index alone:
| Code | Meaning |
|---|---|
CONSUMER_INDEX_NOT_FOUND |
No candidate holds an index |
CONSUMER_INDEX_UNAVAILABLE |
The registry refused or failed the listing |
CONSUMER_INDEX_TRUNCATED |
A read bound or the timeout stopped the read |
CONSUMER_INDEX_ENTRY_INVALID |
Entries malformed, unbound or unconfirmed by their own repository were not used; a service whose newest entry is refused counts as not indexed |
CONSUMER_INDEX_UNCHECKED |
No target snapshot to check the index against: only a snapshot adds the running revisions with their dependencies |
CONSUMER_NOT_INDEXED |
A published declared consumer the fleet holds has no usable entry; it stays in the answer |
The answer reports the read in consumerIndex. pacto_impact over stdio reads
the index; over HTTP and in the dashboard it is never read.
Target snapshot consumers¶
The operator of each cluster publishes a signed target snapshot to
<registry>/pacto-targets:cluster-<uid> every 5 minutes, where <registry>
is the operator chart's top-level registry value; with no registry it
publishes none. It publishes whether or not delivery runs. pacto impact and pacto ci read it with registry read
access alone, so CI finds the consumers that run without a kubeconfig. See
Where consumers come from for how Pacto
finds the repository and pins a cluster.
A snapshot carries every target source the installation accepted, each as
its own fleet source with its own asOf and completeness:
targets-<uid>, kindtarget-snapshot: the Pacto resources of the cluster, read from their status. Their consumers carrydeclaredconfidence.targets-<uid>-workloads, kindkubernetes-workloads: workloads no Pacto targets, as inferred services. An inferred service never counts as a consumer and its health never gates impact.targets-<uid>-evidence, kindevidence-http: the targets the cluster's Evidence Server accepted from any producer,pacto agentincluded. They count as observed targets, as--evidence-urldoes.
The installation key signs the snapshot. Build the cluster's trust entry from
the public key in the installation key Secret, which only the operator writes,
or copy the one the helm upgrade notes print. The detected ConfigMap names
the cluster:
kubectl -n pacto-operator-system get secret pacto-operator-installation-key \
-o jsonpath='{.data.public\.b64}' | base64 -d
kubectl -n pacto-operator-system get configmap pacto-operator-detected \
-o jsonpath='{.data.detected\.json}' | jq -r .cluster
Wrap the key at 64 characters between -----BEGIN PUBLIC KEY----- and
-----END PUBLIC KEY----- for publicKey, name the entry
installation-<first 8 characters of cluster> and scope it with
streams: ["<cluster>/pacto-targets/snapshot"].
A snapshot counts only when a trust entry scoped to its cluster verified its
signature and its asOf is less than 15 minutes old. Otherwise every section
reads partial, stale or unavailable with a TARGET_SNAPSHOT_*
limitation (see
Sources), and a
BREAKING change with consumers ends unverified. A section the publisher
could only read in part, such as an Evidence Server that did not answer,
makes its own source and the answer partial, and the other sections still
answer.
Announced breaks¶
A provider announces a deliberate break in
breaks. On a
BREAKING change each announced, direct and declared consumer carries a
break state, printed under it:
accepted: the consumer's declared owner signed a counted acceptance of exactly this break (provider, version and the digest of its announcement) withpacto accept --break, or the consumer's own published ranges admit the new version, a source shows where it runs and no revision that refuses it runs there. An accepted consumer never blocks.announced: nothing accepts it. A record by somebody other than the declared owner, or signed by CI or an agent, names who may accept.expired: the announcement'sexpires, else the datepacto cirecorded (commit time + 30 days), has passed, or no date is recorded (expiry unknown: run pacto ci or declare expires).
A listing of acceptances that could not all be read makes the answer partial
(ACCEPTANCES_TRUNCATED), never accepted. An HTTP MCP server and a dashboard
viewer who is not signed in read no acceptances: the answer notes
ACCEPTANCES_NOT_READ and the break reads acceptances not read.
Range coverage¶
ranges counts the direct declared consumers of the changed service:
declared when the consumer declares a range, accepted when a counted
acceptance accepts it and is not yet published, else unknown, listed with the
range its inferred record proposes (20 at most):
Ranges: 3 declared and 1 accepted of 5 dependency edges (80%)
unknown: reports -> ledger (proposed ^2.4.0)
policy echoes the --policy the answer was
held to, and a warn policy that applies adds a POLICY_WARNING note.
A possible break on an inferred interface¶
When a spec file is only inferred (an interfaces[api], interfaces[events]
or interfaces[grpc] entry in pacto.inferred.yaml and no interface of that
name in pacto.yaml), Pacto runs the same spec diff it runs on a declared
interface, between the old and the new file. Its breaking findings become an
advisory in advisories: the interface, the inferred source path:line, the
findings, the direct consumers (each inferred, with compatibility unknown)
and the YAML that declares the interface. The CLI prints one line after the
gate:
possible break (inferred) payments api openapi/v1.yaml:1: openapi.paths[/payments].methods[GET].parameters[currency:query] GET /payments query param 'currency' added; consumers (inferred, unknown): web
An advisory never blocks and never clears. It never changes the
classification or the version pacto publish requires. A change that is not
BREAKING reads unverified with the gate code INFERRED_POSSIBLE_BREAK; a
BREAKING change keeps its own gate. Without the old record or a spec file
that reads, Pacto reports no advisory. To classify the change, add the declare YAML to
pacto.yaml. pacto diff, pacto ci, pacto_impact and Change analysis
show the same advisory.
Evidence freshness¶
Impact judges evidence against the 24 hours before the snapshot's asOf.
A consumer whose target evidence is older, or missing, gets confidence
unknown, an evidence entry that says how old it is and a counted
CONSUMER_EVIDENCE_STALE limitation. Stale evidence never raises confidence.
An observed call last seen before that window, in the snapshot or in a
--traces file, no longer corroborates. Its caller stays in the list with
confidence unknown, so it cannot drop out of the answer. A live source such
as Mira reports no window, and its evidence says "no observation window".
With --include-observed and no observed edge anywhere, the answer adds
OBSERVED_EVIDENCE_ABSENT: observed-only consumers cannot be found. An
observed call to a name that matches more than one service, or that is neither
a service nor an external system, raises OBSERVED_IDENTITY_UNRESOLVED and
makes the answer partial. A call to an external system that the
external catalog or a host name
identifies, such as api.stripe.com, is no consumer of a service and raises
nothing.
What's next¶
- Impact analysis: the analysis these consumers feed, its confidence model and its release gate
- Ask what happens if: impact for a service that becomes unavailable, is removed or regresses