# The PR your dbt CI passes

> Delete an accepted_values test and CI goes green — because the test is gone. Nothing compares the PR to what you agreed.

- Page: https://coremodels.io/recipe/ci-contract-gate
- JSON: https://coremodels.io/recipe/ci-contract-gate.json
- Connector: [dbt](https://coremodels.io/connector/dbt) (Import)
- [Start with this recipe →](https://go.coremodels.io/app/new/dbt/ci-contract-gate) No warehouse credential. No dbt Cloud token. Read-only.

Try it on a branch: remove an accepted_values test from a model and open a PR. Every check passes. dbt tests what is in the branch, so a removed test is simply a test that no longer runs, and branch-versus-main tooling compares the PR to the previous commit — which also no longer has it once merged. The thing nobody compares against is what the team actually agreed the column means. This gate does that: on every PR, the compiled manifest is checked against the governed model, and a removed permitted-value set, a widened enum, a type that quietly changed or a dataset that vanished each come back as a named finding with a stable code. Set it to fail on errors and the PR that would have slipped through stops. The report comes back as markdown you can post as the PR comment, every run feeds a history trail, and the badge shows the current state — because unknown and passing are different claims.

## What you do

1. Import the manifest you consider correct today (main) as the baseline.
2. Audit a PR's manifest against it: removed value sets, widened enums, silent retypes, vanished datasets, as named findings.
3. Start on errors only. A gate that fails on day one for untriaged warnings is switched off in a week.

## The story behind this recipe

- [Every Check You Run Compares the PR to the Last Commit](https://coremodels.io/connector/dbt/h9-ci-gate): Here is a two-minute experiment worth doing on a branch before you read further.

## Guides for this recipe

### Engineering

- [Two Loops and an Empty Diff: dbt Contract Automation in CI](https://coremodels.io/connector/dbt/t4-automation)

All dbt recipes: https://coremodels.io/connector/dbt#recipes
