Skip to content

feat: dbt PR review — layered (deterministic + advisory) reviewer for dbt/SQL PRs #855

Description

@anandgupta42

Summary

Ship a AI code reviewer specialized for dbt/SQL, producing a single signed verdict (APPROVE / COMMENT / REQUEST_CHANGES) where every blocking finding is backed by a deterministic engine call, not a model opinion.

Motivation

Generic AI reviewers miss dbt/SQL-specific risk: query non-equivalence in "refactors", column-lineage/DAG blast radius, PII exposure, warehouse-cost anti-patterns, and dbt config/contract changes. We have the deterministic engine (altimate-core) to prove these — wire it into a PR reviewer.

Scope

  • Layer 1 (authoritative, the only layer that blocks): altimate-core over parsed SQL ASTs — query equivalence, column lineage / blast radius, PII classification, A–F grade, AST anti-pattern lint.
  • Layer 2 (fallback): thin self-verifying catalog for raw-diff/Jinja signals not yet AST.
  • Layer 3 (advisory, never blocks): an LLM reviewer grounded in layers 1–2 for intent/naming/business-logic/test-coverage commentary, clamped to ≤ warning.
  • Signed, replayable verdict envelope keyed to the dbt manifest; CLI + GitHub Action; comment and gate modes.

Acceptance

  • Deterministic verdict + advisory comments on a PR; only layer-1 engine findings can block.
  • Validated against a real dbt repo's PR history (catches a real non-equivalence bug, FP-safe on intentional refactors).
  • Depends on @altimateai/altimate-core >= 0.4.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions