{
  "id": "dbt/ci-contract-gate",
  "slug": "ci-contract-gate",
  "name": "The PR your dbt CI passes",
  "tagline": "Delete an accepted_values test and CI goes green — because the test is gone. Nothing compares the PR to what you agreed.",
  "description": "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.",
  "url": "https://coremodels.io/recipe/ci-contract-gate",
  "json": "https://coremodels.io/recipe/ci-contract-gate.json",
  "markdown": "https://coremodels.io/recipe/ci-contract-gate.md",
  "status": "early-access",
  "connectors": [
    {
      "slug": "dbt",
      "name": "dbt",
      "url": "https://coremodels.io/connector/dbt",
      "recipeUrl": "https://coremodels.io/connector/dbt/recipe/ci-contract-gate",
      "capabilities": [
        "import"
      ]
    }
  ],
  "steps": [
    "Import the manifest you consider correct today (main) as the baseline.",
    "Audit a PR's manifest against it: removed value sets, widened enums, silent retypes, vanished datasets, as named findings.",
    "Start on errors only. A gate that fails on day one for untriaged warnings is switched off in a week."
  ],
  "start": {
    "label": "Start with this recipe →",
    "href": "https://go.coremodels.io/app/new/dbt/ci-contract-gate",
    "note": "No warehouse credential. No dbt Cloud token. Read-only."
  },
  "stories": [
    {
      "slug": "h9-ci-gate",
      "title": "Every Check You Run Compares the PR to the Last Commit",
      "summary": "Here is a two-minute experiment worth doing on a branch before you read further.",
      "audience": "strategy",
      "url": "https://coremodels.io/connector/dbt/h9-ci-gate"
    }
  ],
  "guides": [
    {
      "slug": "t4-automation",
      "title": "Two Loops and an Empty Diff: dbt Contract Automation in CI",
      "summary": "Try this on a branch first, because it reframes what the gate is for. Take a model with an `accepted_values` test, delete the test, and open a pull request.",
      "audience": "engineering",
      "url": "https://coremodels.io/connector/dbt/t4-automation"
    }
  ]
}
