Skip to content
Latchkey

Pact verification results not published to broker in CI

A provider can verify pacts locally without telling the broker. If publishing of results is off, the matrix has no success row, so can-i-deploy later reports the version as unverified even though verification passed.

What this error means

Provider verification passes in the logs, but the broker shows no verification result and can-i-deploy says the version is not verified.

Pact
Verifying a pact between web-consumer and orders-provider ... OK
INFO: Skipping publishing of verification results as
publishVerificationResults / PACT_BROKER_PUBLISH_VERIFICATION_RESULTS is not set.

Common causes

Result publishing is not enabled

The verifier ran without publishVerificationResults: true (or the env flag), so it verified but did not report back to the broker.

The provider version was not supplied

Publishing results needs a provider version; without it the verifier cannot record a matrix row.

How to fix it

Enable result publishing with a provider version

  1. Set publishVerificationResults: true in the verifier options.
  2. Pass the provider version (the commit sha) and its branch.
  3. Re-run so the broker records a success row.
provider.verify.js
await new Verifier({
  provider: 'orders-provider',
  providerVersion: process.env.GIT_SHA,
  providerVersionBranch: process.env.GIT_BRANCH,
  publishVerificationResult: true,
}).verifyProvider();

Only publish from CI, not local runs

Guard publishing behind a CI check so local verification does not write results, while CI always records them.

provider.verify.js
publishVerificationResult: process.env.CI === 'true'

How to prevent it

  • Enable verification result publishing in every CI provider build.
  • Always pass the provider version and branch when publishing results.
  • Do not publish results from developer machines.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →