Skip to content
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

**Breaking: `dbt_cost_estimate` is BigQuery only, so Snowflake and Databricks are no longer gated by `maxScanBytes`.** The tool used to give a scan figure on Snowflake and Databricks from the warehouse planner's EXPLAIN (bytes assigned there count partitions before runtime pruning and usually overstate what runs). It now answers `supported: false` on every warehouse but BigQuery and compiles nothing, so the Claude plugin's scan check (`maxScanBytes`, 10 GiB by default) no longer holds a `dbt run`, `build` or `show` on those two warehouses; the command runs with a line saying why. On BigQuery the scan figure is unchanged, and `history: true` now also reads what a model's earlier runs cost (billed `INFORMATION_SCHEMA.JOBS` queries; see the dbt tools page).

**Breaking: in `gate` mode, `altimate review` blocks only on engine findings, on pattern rules named in `rubric.blockingRules`, and on one proven-new PII pattern finding.** Before, any critical finding in a `blockOn` category could block, including pattern rules such as the regex PII check. Now pattern-rule findings comment but don't block unless their id is named in `rubric.blockingRules`; the AI lane never blocks. One pattern finding still blocks without being named: a highly sensitive PII column (SSN, passport or card number, date of birth) proven new when the base or the head can't be compiled (proven only when the review reads the base file's SQL fully). To keep another pattern rule blocking, add its id to `rubric.blockingRules`. (#1722)

### Changed

- **`altimate review` reads `.altimate/review.yml` from the base branch.** A PR can no longer relax the policy it is reviewed under; settings it changes are listed in the comment and take effect after merge. The `--mode` and `--severity` flags (the action's `mode` and `severity_threshold`) can only tighten a base policy, and `allowForceTier: false` rejects `--force-tier`. (#1722)
- **`altimate review` flags PII only for columns the change newly exposes**, not for PII columns the base already surfaced. Without a compiled base, a PII column is a non-blocking warning that may predate the PR, unless the base SQL cannot have exposed it (see the next entry). (#1721)
- **`altimate review` reports three PII exposures it used to call pre-existing.** Without a compiled base, a PII output column is reported as new, and can block, when the base file's own SQL cannot have exposed that output column name: it does not name it outside comments, its final query names every column in its own select list (no `*`, `COLUMNS(…)`, whole-row reference, struct expansion or Unicode-escaped name such as `U&"…"`), the review reads that query fully (a CTE column list, a parenthesised UNION, an integer division `//` or a column named like an unaliased `ref` leave it undecided), and it holds no Jinja but `ref`, `source`, `config`, `this` and `if`/`for`/`set` tags. A renamed PII output (`email as contact`) is then new. A table compiled under another schema is the same table only when the model's code reads it the same way on both sides (the same `ref`, `source` or table name; the quote style and spacing inside a `ref` or `source` call do not count, a quoted SQL name is compared as written), or, for a model compiled under a name its `ref` does not show (an alias, a version or a source `identifier:`), when no relation in the model's code was added or replaced (a table read through an ephemeral model counts the same way); a schema, `source`, `var` or package a relation is built from, swapped in the model's code, is reported, and so is a `{% set %}` variable it is built from whose plain string value was replaced (`'masked'` → `'raw'`; the quote style and `{# … #}` comments do not count). Where the code cannot decide (such a model only gained a relation, the SQL is a shape the review does not fully parse or lists no relation, as when a macro emits the query, two different relations share one table name or one was added or removed beside an unchanged one, a `ref` gained or lost a package argument, or such a `{% set %}` changed in another way), the column is a non-blocking warning that may predate the PR, and such a warning never hides another PII finding. Renaming a CTE or subquery alias, turning a CTE into a subquery, qualifying a column, adding a join, or reading a CTE through `select *` instead of naming its columns, is not a change for a computed PII column (`lower(email) as email`), nor is an environment whose schemas sort differently. A UNION branch that computes PII under a name the base already exposed (`lower(ssn) as email`) is reported, also after a first branch that selects `*` from a CTE or subquery whose columns are all known, and so is a swap of which table each branch's computation reads (`md5(email)` from `a` and `lower(email)` from `b` reversed) or of which column sits in which argument (`coalesce(m.email, r.email)` reversed, where `m` masks it). Now reported that was not before: qualifying a raw table name (`from customers` → `from analytics.customers`), and replacing any relation, even an unrelated join, in a model compiled under a name its `ref` does not show. Not reliably detected yet: any later-branch column, raw or computed, at or after a `*` over a table, a `ref()`, a CTE that itself selects `*` or a `using`/`natural` join (its columns are matched only by their position among the select items; a new column past the last of them is a non-blocking warning), and any column of a later branch that itself selects `*`. A source schema changed in YAML is a non-blocking warning, for every `source()` in the reviewed models, when the same PR edits a `schema:`, `database:` or `identifier:` key in a source YAML (or deletes one) and also changes a model that reads a source; a PR that edits only the YAML gets no finding, and a `+schema` for sources in `dbt_project.yml`, a schema from `var()` or `env_var()` or set through a YAML anchor or folded value, and changes made outside the PR are not detected. Comparing source YAML per source and table (so a moved source or an edit to an unrelated source no longer turns every `source()` read into a warning) moved to a follow-up. (#1875)

## [0.12.12] - 2026-11-20

**dbt Power User features now work from the command line, and an owner can send a workspace request back for changes.** Nine new tools estimate what a dbt model or query would scan before it runs (BigQuery dry run, Snowflake and Databricks from the planner's EXPLAIN), read the last dbt run, check a model's docs coverage, report DataPilot project health, time a model's CTEs, draw its SQL graph, map raw SQL tables to `ref()` and `source()`, read the defer setting, and reply to comments on shared dbt docs. Call them with `altimate-code tool run` or from another coding agent through `mcp serve`. The new `altimate-code integrations` command connects GitHub, Jira and Linear with your own credentials. On workspaces with review on, a request can be sent back with a comment, then changed and sent again. The TUI says what changed in the workspace's skills and knowledge since your last session. Also in this release: stricter SQL checks in the tool CLI and MCP server, the agent keeps your changes instead of reverting them, `altimate review` reviews only the PR's own changes, and Snowflake key-pair login reads every private-key format.
Expand Down
90 changes: 83 additions & 7 deletions docs/docs/usage/dbt-pr-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ rubric:
highly sensitive PII column proven new when the base or the head cannot be
compiled, so the engine has nothing to compare (see the **PII** bullet under
"What the PR comment shows"). The advisory AI lane never blocks.
- **Upgrading a `gate` setup.** Before this policy, any critical finding in a
`blockOn` category could block, including pattern rules such as the regex
PII check. Now pattern-rule findings comment but don't block, except the one
highly sensitive PII finding described in the previous bullet. To keep
another pattern rule blocking, add its id to `rubric.blockingRules`.

### What the PR comment shows

Expand All @@ -337,13 +342,84 @@ rubric:
non-blocking rerun with nothing new and the same headline as the bot's last
review only updates the summary.
- **PII:** flagged only for PII columns the change newly exposes, not for
columns the base already surfaced. That comparison needs the base version's
SQL; when it can't be compiled, PII columns are reported as non-blocking
warnings that may predate the PR. One case still blocks without a compiled
base: the diff adds a highly sensitive column (an SSN, a passport or card
number, a date of birth) to a `marts/` or `reporting/` model, the base file's
own SQL cannot expose it (it does not name the column, select `*`, or call a
macro), and the column reaches the model's output unmasked, directly or
columns the base already surfaced. A table read under another schema is the
same table only when the model's own code reads it the same way on both sides,
compiled into another environment: the same `ref` or `source` call or table
name (the quote style and spacing inside a `ref` or `source` call aside; a
quoted SQL name is compared as written). So qualifying a raw table name
(`from customers` → `from analytics.customers`) is reported: the qualified
name may be another table. A model whose compiled table name is not the name
in its `ref` (an `alias`, a version such as `ref('customers', v=2)`, a custom
alias macro, a source `identifier:`) counts as the same table when no
relation in the model's code was added or replaced (removing a join to a
table with another name is fine). When a relation was replaced, even an unrelated join, the compiled
name cannot be tied to the unchanged call, so it counts as a different table
and can block; this also holds for a table read through an ephemeral model
(its compiled CTE reads a table the model's code never names). A changed
schema, `source`, `var` or package (`ref('a', 'm')` → `ref('b', 'm')`) a
relation is built from is a different table, and so is one built from a
`{% set %}` variable (`{{ s }}.customers`) when a plain string value of that
variable was replaced by another (`'masked'` → `"raw"`, in any of its
assignments; the quote style and `{# … #}` comments do not count), and,
under another schema, a quoted name whose case changed. When the code cannot
decide (such a model only gained a relation; its SQL is a shape the review
does not fully parse and no relation it lists was replaced, or it lists none,
as when a macro emits the query; it reads two different relations with one
table name, such as two `source()` calls for `customers`, or a second one was
added or removed beside an unchanged one; a `ref` gained or lost a package
argument; a `{% set %}` the relation names changed in another way, such as an
expression, a block or an added assignment; or another `{% set %}` variable
changed while a relation is built from Jinja), the column is reported as a
non-blocking warning that may predate the PR. Renaming a CTE or a subquery
alias, turning a CTE into a subquery, qualifying a column (`email`,
`l.email`, `leads.email`), adding a join, or reading a CTE through `select *`
instead of naming its columns, is not a change: a computed PII column
(`lower(email) as email`) is compared by how it is computed from the source
columns, not by how they are written or what its CTEs are called. Which
column sits in which argument does count (`coalesce(m.email, r.email)`
reversed, where `m` masks the column, is reported). A source whose schema changes only in YAML
is flagged the same way when the same PR edits a `schema:`, `database:` or
`identifier:` key in a source YAML (a YAML file that declares `sources:`; a
deleted one counts; a schema set through a YAML anchor or a folded
multi-line value is not recognised) and also changes a model that reads a source; the warning
then covers every `source()` the reviewed models read, not only the edited
source. A PR that edits only the YAML gets no PII finding, and a `+schema`
set for sources in `dbt_project.yml`, a schema from `var()` or `env_var()`,
and changes made outside the PR are not detected. A UNION branch that
computes PII under a name the base already exposed (`lower(ssn) as email`) is
reported. After a first branch that selects `*` from a CTE or subquery whose
columns are all known, each later-branch column is matched to the output
column it lands in (`select *, 'web' as channel from c` puts `channel` after
all of `c`'s columns). After a `*` over a table, a `ref()`, a CTE that
itself selects `*`, or a `using`/`natural` join (which outputs each merged
column once), the columns are unknown, so any later-branch column (raw or
computed) at or after that `*`'s position may go unreported: it is matched
only by its position among the first branch's select items, which the `*`
throws off (one past the last of them is a non-blocking warning). Any column

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The parenthetical 'one past the last of them is a non-blocking warning' is narrower than the code. A later-branch column at any position past the first branch's last select item is unmapped and gets the warning, so 'past the last of them' is the accurate wording. The earlier text said this correctly.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/docs/usage/dbt-pr-review.md, line 398:

<comment>The parenthetical 'one past the last of them is a non-blocking warning' is narrower than the code. A later-branch column at any position past the first branch's last select item is unmapped and gets the warning, so 'past the last of them' is the accurate wording. The earlier text said this correctly.</comment>

<file context>
@@ -384,12 +392,12 @@ rubric:
+  column once), the columns are unknown, so any later-branch column (raw or
+  computed) at or after that `*`'s position may go unreported: it is matched
+  only by its position among the first branch's select items, which the `*`
+  throws off (one past the last of them is a non-blocking warning). Any column
+  of a later branch that itself selects `*` (`… union all select * from s`)
+  is not reliably detected yet either. That
</file context>
Suggested change
throws off (one past the last of them is a non-blocking warning). Any column
throws off (a column past the last of them is a non-blocking warning). Any column

of a later branch that itself selects `*` (`… union all select * from s`)
is not reliably detected yet either. That
comparison needs the base version's SQL; when it can't be compiled, a PII
column is reported as a non-blocking warning that may predate the PR, unless
the base file's own SQL cannot have exposed that output column name: then it
is reported as new, as with a compiled base, and can block. The base cannot
have exposed the name when it does not name it anywhere outside comments
(string literals count), its final query has its own select list naming each
column (no `*`, no dynamic column selector such as `COLUMNS(…)`, no source
selected as a whole row such as `select c` or `to_json(c)`, no struct or array
expansion such as `unnest(payload)`, no Unicode-escaped name such as
`U&"e\006Dail"`; a final `table c` or `from c` selects
every column), the review reads that base query fully (comments, string
literals and quoted names aside; a CTE column list such as `with x(a, b) as`,
a parenthesised UNION, an integer division `//`, a column named like an
unaliased `ref`, or a quote, block comment or dollar tag left unclosed leave
it undecided), and it holds no Jinja but `ref`, `source`, `config`, `this` and
`if`/`for`/`set` tags (a macro call, a variable or an `{% include %}` could
emit any column). The proof is about the output name, so a renamed PII output
(`email as contact`) is reported as new. The pattern check also blocks
without a compiled base when the diff adds a highly sensitive column (an SSN,
a passport or card number, a date of birth) to a `marts/` or `reporting/`
model, the base file's own SQL cannot expose that column (by the same test),
and the column reaches the model's output unmasked, directly or
through CTEs and subqueries, from the added line or from anywhere else in the
model. A column that is hashed, masked or dropped everywhere it is read
(`sha2(ssn)`, `right(ssn, 4)`, `* exclude (ssn)`) stays a warning; one that
Expand Down
Loading
Loading