Repository navigation
feat(review): close remaining review gaps: action dbt_prepare, data-test adequacy, parse-only column changes - #1726
Draft
RaghwendraSingh wants to merge 3 commits into
Draft
RaghwendraSingh wants to merge 3 commits into
RaghwendraSingh wants to merge 3 commits into
Conversation
…erge-base and catalog artifacts - new action inputs: `dbt_prepare` (`none` default | `compile` | `full`), `dbt_command`, `dbt_profiles_dir` - `compile` runs `dbt compile` on the head and compiles the PR's merge-base into `target-base/` in a temporary worktree (fetching and deepening a shallow checkout when needed); `full` adds `dbt docs generate` - a base compile that fails is a warning: the review still runs and marks those models unverified - inputs reach the script only through env, never interpolated - docs: the manual base-compile snippet now compiles the merge-base, not the base branch's tip - the example workflow is renamed `examples/dbt-pr-review.yml` (was named after one internal repo) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ows split across lines are read whole Found by replaying the PRs behind known escaped defects: - without compiled SQL, output columns come from the raw model's final SELECT (Jinja blanked; a Jinja expression in the list makes it unknown). `on_schema_change='fail'` with new columns now fires on the two real escapes it targets, in a parse-only CI setup - `row_number() over (…)` windows are read from the whole file, so an `ORDER BY` on its own line is seen: the "dedup has no ORDER BY" rule no longer fires falsely on multi-line windows, and the load-timestamp rule sees them. A window counts only when an added line falls inside it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nherited warn/thresholds, loosened project thresholds - a test added or changed in the PR that compares a model with itself (`dbt_utils.equality`/`equal_rowcount`/… against its own `ref`, or a `relationships` test to its own column) passes by construction (warning) - new tests that inherit `severity: warn` or an `error_if` threshold from `dbt_project.yml` (walked from the top through the project name and folders, deeper wins) are reported once per yml (suggestion) - a `dbt_project.yml` change that turns a folder's tests to `warn` or sets an `error_if` threshold is reported (warning) - reads dbt 1.8+ `arguments:` too; all findings are catalog origin (never block) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
full receipts (1 session)
orchestrator ·
|
| subagent | cost |
|---|---|
| Goal: an evidence-backed, cited landscape of (a) dbt PR review tools, (b) data-… | 2,134,743 tokens |
| Goal: determine what gaps altimate-code's dbt PR review has, by comparing what… | 5,303,299 tokens |
| Label dbt PR review comments by reading each one. Instructions: read /private/t… | 2,794,842 tokens |
| Label dbt PR review comments by reading each one. Instructions: read /private/t… | 3,244,430 tokens |
| Label escaped-defect candidates by READING them (no keyword bucketing). Directo… | 2,570,116 tokens |
| Repo: /Users/raghwendrasingh/code/altimateai/altimate-code (current branch feat… | 4,836,719 tokens |
| You are doing an ADVERSARIAL review of a set of Jira tickets that plan improvem… | 763,761 tokens |
| Label dbt PR review comments by reading each one. Instructions: read /private/t… | 3,351,198 tokens |
| Label escaped-defect candidates by READING them (no keyword bucketing). Directo… | 4,214,327 tokens |
| Label dbt PR review comments by reading each one. Instructions: read /private/t… | 2,821,134 tokens |
| Label dbt PR review comments by reading each one. Instructions: read /private/t… | 1,795,004 tokens |
| You are doing an ADVERSARIAL review of a stack of changes to an open-source dbt… | 4,084,798 tokens |
| Repo: /Users/raghwendrasingh/code/altimateai/altimate-code. Module: packages/op… | 8,815,483 tokens |
| Label dbt PR review comments by reading each one. Instructions: read /private/t… | 2,592,769 tokens |
| Research task, read-only (do not push, comment, or open PRs anywhere).Goal: dec… | 1,198,872 tokens |
| Judge each of altimate-code's own inline PR review comments by reading it. Inpu… | 1,673,212 tokens |
| Label escaped-defect candidates by READING them (no keyword bucketing). Directo… | 2,862,492 tokens |
| Goal: read a Notion doc tree about an "agentic data engineering software factor… | 1,335,636 tokens |
| Goal: test whether the bug classes that real reviewers catch on dbt PRs at one… | 6,608,416 tokens |
Generated by aireceipts
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Stacked on #1725 (← #1724 ← #1723 ← … ← #1719); merge in that order. Draft.
Type of change
What does this PR do?
This closes the remaining acceptance-criteria gaps in the review stack. Two of the fixes came from replaying the PRs behind known escaped defects.
dbt_prepare). Defaultnone, so nothing changes for existing users.compilerunsdbt compileon the head, then compiles the PR's merge-base intotarget-base/in a temporary worktree. A shallow checkout is fetched and deepened when needed.fullalso runsdbt docs generate.equality/equal_rowcountagainst its ownref, or arelationshipstest to its own column) passes by construction;severity: warnor anerror_ifthreshold fromdbt_project.ymlare reported;dbt_project.ymlchange that loosens those thresholds for a folder is reported.dbt parse-only CI. Without compiled SQL, output columns come from the raw model's final SELECT; a Jinja expression in the list makes it unknown. In a parse-only replay,on_schema_change='fail'with new columns now fires on the two real escapes it targets.order byis on its own line, and the load-timestamp rule sees such windows.How did you verify your code works?
review-action.test.ts:dbt_prepareis opt-in, reads inputs only from env, and builds intotarget-base/.review-test-adequacy.test.ts: self-comparison, inheritedwarn/error_if, loosened thresholds, dbt 1.8+arguments:.review-incremental-semantics.test.ts: multi-line windows, raw-SQL column delta.bun typecheckis clean, and the real-world corpus is unchanged (15/15 caught, 0/5 false positives).dbt_preparerun locally against a real dbt 1.10 DuckDB project. The head compiled intotarget/, the merge-base compiled intotarget-base/(the base still has the removed column), and the temporary worktree was cleaned up.on_schema_changenow catches two of them (two escapes each).Cost side effects
dbt_prepare: compileadds onedbt compileper side of the PR in CI, andfulladdsdbt docs generate(warehouse queries for the catalog). Both are opt-in; the defaultnoneadds nothing. No model calls.Screenshots / recordings
N/A (CLI / action).
Checklist
🤖 Generated with Claude Code
Summary by cubic
Closes the remaining acceptance-criteria gaps in the dbt review stack: adds an opt-in
dbt_prepareaction input for building the artifacts the full review needs, and fixes two classes of missed findings — data tests that can't do their job, and column-set rules that skipped work in parse-only CI.New
dbt_prepareaction inputnone;compilerunsdbt compileon the head and the PR's merge-base intotarget-base/, andfullalso runsdbt docs generate.Review gap fixes
equality/equal_rowcount/relationships) or that inheritseverity: warnor anerror_ifthreshold fromdbt_project.yml, plusdbt_project.ymlchanges that loosen those thresholds.on_schema_change='fail'fires in parse-only CI; a Jinja expression in the list leaves it unknown.ORDER BYno longer triggers a false "no ORDER BY" and the load-timestamp rule sees such windows.Written for commit 7da6850. Summary will update on new commits.