Repository navigation
fix(review): precision and new rules from a replay of human-caught defects on public dbt PRs #1739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/review-ac-gaps
Are you sure you want to change the base?
Changes from all commits
5aee978
513f5fa
2e777d2
9ecb489
ce0f246
1f25ecf
948289e
900946d
26ca71e
502f835
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,13 +19,45 @@ const MAX_FILES = 20 | |
| export interface AiReviewFile { | ||
| path: string | ||
| status: string | ||
| /** Model name for a model; the file's base name for any other dbt file. */ | ||
| model: string | ||
| /** dbt role of the file (`model_sql`, `macro`, `schema_yml`, `test`, …); omitted means a model. */ | ||
| kind?: string | ||
| /** Unified diff (added/removed lines) for this file. */ | ||
| diff?: string | ||
| /** dbt-compiled (preferred) or raw SQL for context. */ | ||
| /** Current content: dbt-compiled (preferred) or raw SQL for a model, the file itself otherwise. */ | ||
| sql?: string | ||
| } | ||
|
|
||
| /** Order under the file cap: models first, then the files whose defects reach the most models. */ | ||
| const KIND_ORDER = ["model_sql", "python_model", "macro", "test", "snapshot", "schema_yml", "source_yml", "seed", "project_config"] | ||
| const KIND_LABEL: Record<string, string> = { | ||
| macro: "macro (Jinja; changes every model that calls it)", | ||
| test: "singular data test", | ||
| snapshot: "snapshot", | ||
| schema_yml: "schema yml (tests, contracts, descriptions)", | ||
| source_yml: "sources yml", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The new Prompt for AI agents |
||
| seed: "seed CSV", | ||
| project_config: "project config", | ||
| python_model: "Python model", | ||
| } | ||
| const FENCE: Record<string, string> = { schema_yml: "yaml", source_yml: "yaml", project_config: "yaml", seed: "csv", python_model: "python" } | ||
|
|
||
| function kindRank(kind: string | undefined): number { | ||
| const i = KIND_ORDER.indexOf(kind ?? "model_sql") | ||
| return i < 0 ? KIND_ORDER.length : i | ||
| } | ||
|
|
||
| /** Files the lane sends, in priority order, capped at MAX_FILES. */ | ||
| export function selectAiFiles(files: AiReviewFile[]): AiReviewFile[] { | ||
| return files | ||
| .filter((f) => f.status !== "deleted" && (f.diff || f.sql)) | ||
| .map((f, i) => ({ f, i })) | ||
| .sort((a, b) => kindRank(a.f.kind) - kindRank(b.f.kind) || a.i - b.i) | ||
| .map(({ f }) => f) | ||
| .slice(0, MAX_FILES) | ||
| } | ||
|
|
||
| export interface AiReviewInput { | ||
| files: AiReviewFile[] | ||
| /** Deterministic engine findings — grounding the AI must NOT duplicate. */ | ||
|
|
@@ -81,7 +113,7 @@ function truncate(s: string | undefined, n: number): string { | |
| } | ||
|
|
||
| /** Assemble the user message (mechanical formatting — not IP). */ | ||
| function buildUserMessage(input: AiReviewInput): string { | ||
| export function buildUserMessage(input: AiReviewInput): string { | ||
| const parts: string[] = [] | ||
| if (input.prTitle) parts.push(`PR title: ${truncate(input.prTitle, 200)}`) | ||
| if (input.prBody) parts.push(`PR description:\n${truncate(input.prBody, 1500)}`) | ||
|
|
@@ -97,9 +129,13 @@ function buildUserMessage(input: AiReviewInput): string { | |
|
|
||
| parts.push("\n## CHANGED FILES (review for what the engine missed):") | ||
| for (const f of input.files.slice(0, MAX_FILES)) { | ||
| parts.push(`\n### ${f.path} (${f.status})`) | ||
| const label = f.kind && KIND_LABEL[f.kind] | ||
| parts.push(`\n### ${f.path} (${f.status}${label ? `, ${label}` : ""})`) | ||
| if (f.diff) parts.push("Diff:\n```diff\n" + truncate(f.diff, MAX_DIFF_CHARS) + "\n```") | ||
| if (f.sql) parts.push("Current SQL:\n```sql\n" + truncate(f.sql, MAX_DIFF_CHARS) + "\n```") | ||
| if (f.sql) { | ||
| const isModel = !f.kind || f.kind === "model_sql" | ||
| parts.push(`${isModel ? "Current SQL" : "Current file"}:\n\`\`\`${FENCE[f.kind ?? ""] ?? "sql"}\n` + truncate(f.sql, MAX_DIFF_CHARS) + "\n```") | ||
| } | ||
| } | ||
| parts.push("\nReturn ONLY the JSON array per the output contract.") | ||
| return parts.join("\n") | ||
|
|
@@ -118,8 +154,8 @@ export async function runAiReview(input: AiReviewInput): Promise<AiReviewResult> | |
| findings, | ||
| status: { ...status, durationMs: Date.now() - startedAt }, | ||
| }) | ||
| const files = input.files.filter((f) => f.status !== "deleted" && (f.diff || f.sql)) | ||
| if (!files.length) return done([], { state: "skipped", reason: "no changed model SQL to review" }) | ||
| const files = selectAiFiles(input.files) | ||
| if (!files.length) return done([], { state: "skipped", reason: "no changed dbt files to review" }) | ||
|
|
||
| const message = buildUserMessage({ ...input, files }) | ||
| const controller = new AbortController() | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -140,24 +140,10 @@ const detectClock: Detector = (c) => { | |||||
| }) | ||||||
| } | ||||||
|
|
||||||
| // 4. SELECT * added (warehouse cost + fragility on columnar warehouses). | ||||||
| const detectSelectStar: Detector = (c) => { | ||||||
| const hit = c.added.find((l) => /^\s*select\s+\*/i.test(stripComments(l)) && !/select\s+\*\s+from\s+\{\{/i.test(l)) | ||||||
| if (!hit) return null | ||||||
| return makeFinding({ | ||||||
| severity: "suggestion", | ||||||
| category: "warehouse_cost", | ||||||
| title: `${c.model}: SELECT * scans all columns`, | ||||||
| body: | ||||||
| "`SELECT *` reads every column on a columnar warehouse (Snowflake/BigQuery) and makes the model fragile to " + | ||||||
| "upstream column adds. Select only the columns you need.", | ||||||
| file: c.file.path, | ||||||
| model: c.model, | ||||||
| confidence: "high", | ||||||
| evidence: { tool: "dbt-patterns", result: { rule: "select_star", line: hit.trim() } }, | ||||||
| ruleKey: "warehouse_cost:select-star", | ||||||
| }) | ||||||
| } | ||||||
| // 4. SELECT * — covered by the catalog's "SELECT * in final projection" rule, which | ||||||
| // fires only when the model's final SELECT reads straight from another relation. | ||||||
| // A `select *` from a CTE or an import CTE is the dbt style-guide idiom, and | ||||||
| // columnar engines prune the unused columns, so it is not flagged per line. | ||||||
|
|
||||||
| // 5. LEFT/RIGHT JOIN silently collapsed to INNER by a WHERE/AND on the outer table. | ||||||
|
|
||||||
|
|
@@ -188,7 +174,8 @@ const detectFanout: Detector = (c) => { | |||||
| const newJoins = c.added.filter((l) => /\bjoin\b/i.test(stripComments(l)) && !/\bcross\s+join\b/i.test(l)) | ||||||
| if (newJoins.length < 1) return null | ||||||
| return makeFinding({ | ||||||
| severity: "warning", | ||||||
| // A "may": the join's cardinality is unknown here (1 partial match in 254 on replay). | ||||||
| severity: "suggestion", | ||||||
| category: "fanout", | ||||||
| title: `${c.model}: new join before an aggregate may fan out and inflate metrics`, | ||||||
| body: | ||||||
|
|
@@ -308,11 +295,37 @@ const detectDedupLoadTimestamp: Detector = (c) => { | |||||
| return null | ||||||
| } | ||||||
|
|
||||||
| const NOT_COLUMN = new Set([ | ||||||
| "year", "month", "day", "week", "quarter", "hour", "minute", "second", "epoch", "dow", "doy", "from", "as", "date", "timestamp", | ||||||
| "timestamp_ntz", "timestamp_tz", "datetime", "time", "boolean", "bool", "int", "integer", "bigint", "smallint", "numeric", "decimal", | ||||||
| "float", "double", "real", "varchar", "char", "string", "text", "current_date", "current_timestamp", "now", "null", "true", "false", | ||||||
| "interval", "with", "zone", "at", "precision", | ||||||
| ]) | ||||||
|
|
||||||
| /** True when a partition-defeating function in the line wraps a bare column (not a literal, var or clock). */ | ||||||
| function wrapsColumn(line: string): boolean { | ||||||
| const s = line.replace(/'(?:[^']|'')*'/g, "''").replace(/\{\{[\s\S]*?\}\}/g, " ") | ||||||
| for (const m of s.matchAll(/\b(extract|date_trunc|date|year|month|cast|trunc)\s*\(/gi)) { | ||||||
| let depth = 1 | ||||||
| let i = (m.index ?? 0) + m[0].length | ||||||
| const start = i | ||||||
| while (i < s.length && depth > 0) { | ||||||
| if (s[i] === "(") depth++ | ||||||
| else if (s[i] === ")") depth-- | ||||||
| i++ | ||||||
| } | ||||||
| const args = s.slice(start, i - 1) | ||||||
| const idents = [...args.matchAll(/(?<![\w.'])([a-z_][\w]*(?:\.[a-z_][\w]*)*)(?!\s*\()/gi)].map((x) => x[1].toLowerCase()) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Qualified columns written directly after a Jinja relation are no longer detected, so common Prompt for AI agents
Suggested change
|
||||||
| if (idents.some((x) => !NOT_COLUMN.has(x.split(".").pop()!))) return true | ||||||
| } | ||||||
| return false | ||||||
| } | ||||||
|
|
||||||
| // 11. Function/cast wrapped around a column in an added WHERE — defeats partition pruning. | ||||||
| const detectPartitionFunction: Detector = (c) => { | ||||||
| const hit = c.added.find((l) => { | ||||||
| const s = stripComments(l) | ||||||
| return /^\s*(where|and)\b/i.test(s) && /\b(extract|date_trunc|date|year|month|cast|trunc)\s*\(/i.test(s) | ||||||
| return /^\s*(where|and)\b/i.test(s) && wrapsColumn(s) | ||||||
| }) | ||||||
| if (!hit) return null | ||||||
| return makeFinding({ | ||||||
|
|
@@ -677,7 +690,26 @@ const detectSelfJoin: Detector = (c) => { | |||||
|
|
||||||
| // 39. Window function without PARTITION BY (whole-table window — often unintended). | ||||||
| const detectWindowNoPartition: Detector = (c) => { | ||||||
| const hit = c.added.find((l) => /\bover\s*\(/i.test(stripComments(l)) && !/partition\s+by/i.test(l)) | ||||||
| // Read each OVER clause whole: `over (` on one line and `partition by` on the next is partitioned. | ||||||
| const changed = c.added.map((l) => stripComments(l).trim()).filter((l) => /\bover\s*\(/i.test(l)) | ||||||
| const whole = stripComments(c.newSql ?? "") | ||||||
| const sql = /\bover\s*\(/i.test(whole) ? whole : changed.join("\n") | ||||||
| const unpartitioned = [...sql.matchAll(/\bover\s*\(/gi)].some((m) => { | ||||||
| const open = m.index! + m[0].length - 1 | ||||||
| let depth = 0 | ||||||
| let end = sql.length | ||||||
| for (let i = open; i < sql.length; i++) { | ||||||
| if (sql[i] === "(") depth++ | ||||||
| else if (sql[i] === ")" && --depth === 0) { | ||||||
| end = i | ||||||
| break | ||||||
| } | ||||||
| } | ||||||
| const lineStart = sql.lastIndexOf("\n", m.index!) + 1 | ||||||
| const head = sql.slice(lineStart, open + 1).trim() | ||||||
| return changed.some((l) => l.includes(head)) && !/partition\s+by/i.test(sql.slice(open, end)) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This prefix-based association can report an unchanged whole-table window when the PR adds another window with the same Prompt for AI agents |
||||||
| }) | ||||||
| const hit = unpartitioned ? changed[0] : undefined | ||||||
| if (!hit) return null | ||||||
| return pattern( | ||||||
| c, | ||||||
|
|
@@ -789,7 +821,6 @@ const detectMultiCountDistinct: Detector = (c) => { | |||||
|
|
||||||
| const MODEL_DETECTORS: Detector[] = [ | ||||||
| detectClock, | ||||||
| detectSelectStar, | ||||||
| detectCrossJoin, | ||||||
| detectFanout, | ||||||
| detectNotIn, | ||||||
|
|
@@ -824,6 +855,64 @@ const MODEL_DETECTORS: Detector[] = [ | |||||
| detectMultiCountDistinct, | ||||||
| ] | ||||||
|
|
||||||
| /** | ||||||
| * A changed macro: the catalog rules marked `macros`, and `var('x')` read with no | ||||||
| * default when `x` isn't set in dbt_project.yml (in a package, every project that | ||||||
| * doesn't set it fails to compile). | ||||||
| */ | ||||||
| export const ADAPTERS = ["bigquery", "snowflake", "databricks", "spark", "redshift", "postgres", "trino", "athena", "duckdb", "exasol", "synapse", "sqlserver", "fabric", "oracle", "clickhouse", "presto"] | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Add Prompt for AI agents
Suggested change
|
||||||
|
|
||||||
| /** The adapter a macro file is specific to, from its directory or its macros' `<adapter>__` prefix. */ | ||||||
| function macroAdapter(p: string, sql: string): string | undefined { | ||||||
| const seg = p.toLowerCase().split("/").find((s) => ADAPTERS.includes(s)) | ||||||
| if (seg) return seg | ||||||
| const names = [...sql.matchAll(/\{%-?\s*macro\s+(\w+?)__\w+/g)].map((m) => m[1].toLowerCase()) | ||||||
| return names.length && names.every((n) => n === names[0]) && ADAPTERS.includes(names[0]) ? names[0] : undefined | ||||||
| } | ||||||
|
|
||||||
| export function detectMacroPatterns( | ||||||
| file: ChangedFile, | ||||||
| newSql: string, | ||||||
| rubric: Rubric, | ||||||
| projectVars: Set<string>, | ||||||
| catalogCtx?: CatalogContext, | ||||||
| ): Finding[] { | ||||||
| if (fileKind(file) !== "macro" || file.status === "deleted") return [] | ||||||
| const { added, removed } = splitDiff(file.diff) | ||||||
| // An adapter's own variant (`macros/…/bigquery/x.sql`, `{% macro bigquery__x %}`) runs only on that | ||||||
| // adapter, so portability advice applies only where that adapter lacks the construct. | ||||||
| const adapter = macroAdapter(file.path, newSql) | ||||||
| const out = evaluateCatalog(file, newSql, added, removed, rubric, catalogCtx).filter((f) => { | ||||||
| if (!adapter || f.evidence?.tool !== "rule-catalog" || (f.evidence.result as { portability?: boolean })?.portability !== true) return true | ||||||
| const worksOn = (f.evidence.result as { worksOn?: string[] }).worksOn | ||||||
| return !!worksOn && !worksOn.includes(adapter) | ||||||
| }) | ||||||
| const model = modelNameFromPath(file.path) | ||||||
| const seen = new Set<string>() | ||||||
| for (const line of added) { | ||||||
| for (const m of stripComments(line).matchAll(/\bvar\(\s*['"]([\w.]+)['"]\s*\)/g)) { | ||||||
| const name = m[1] | ||||||
| const esc = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") | ||||||
| if (seen.has(name) || projectVars.has(name) || new RegExp(`var\\(\\s*['"]${esc}['"]\\s*,`).test(newSql)) continue | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: A default on another Prompt for AI agents |
||||||
| seen.add(name) | ||||||
| out.push( | ||||||
| makeFinding({ | ||||||
| severity: "suggestion", | ||||||
| category: "materialization", | ||||||
| title: `${model}: var('${name}') read with no default in a macro`, | ||||||
| body: `\`var('${name}')\` has no default and isn't set in dbt_project.yml, so any project that calls this macro without setting it fails to compile. Pass a default: \`var('${name}', <default>)\`.`, | ||||||
| file: file.path, | ||||||
| model, | ||||||
| confidence: "high", | ||||||
| evidence: { tool: "dbt-patterns", result: { rule: "macro-var-no-default", var: name } }, | ||||||
| ruleKey: `materialization:macro-var-no-default`, | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Distinct missing variables in one macro are deduplicated into a single finding because their Prompt for AI agents
Suggested change
|
||||||
| }), | ||||||
| ) | ||||||
| } | ||||||
| } | ||||||
| return out.filter((f) => !exclusionReason(f, rubric)) | ||||||
| } | ||||||
|
|
||||||
| /** Run the dbt anti-pattern detectors over a changed MODEL file. */ | ||||||
| export function detectModelPatterns( | ||||||
| file: ChangedFile, | ||||||
|
|
@@ -1430,9 +1519,30 @@ export function detectSchemaYmlPatterns( | |||||
| if (canCommit) { | ||||||
| const oldSet = extractTestOccurrences(oldDoc ?? {}) | ||||||
| const newSet = extractTestOccurrences(isDeletedFile ? {} : newDoc) | ||||||
| // A test that moved with a column rename (old column gone, a new column on | ||||||
| // the same model carries the same test) is not a removal. | ||||||
| const cols = (set: Set<string>) => { | ||||||
| const m = new Map<string, Set<string>>() | ||||||
| for (const k of set) { | ||||||
| const [mod, col] = k.split("\x00") | ||||||
| if (!m.has(mod)) m.set(mod, new Set()) | ||||||
| m.get(mod)!.add(col) | ||||||
| } | ||||||
| return m | ||||||
| } | ||||||
| const oldCols = cols(oldSet) | ||||||
| const newCols = cols(newSet) | ||||||
| const movedTo = (model: string, column: string, testField: string) => | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Prompt for AI agents |
||||||
| !!column && | ||||||
| !newCols.get(model)?.has(column) && | ||||||
| [...newSet].some((k) => { | ||||||
| const [mod, col, tf] = k.split("\x00") | ||||||
| return mod === model && tf === testField && !!col && !oldCols.get(model)?.has(col) | ||||||
| }) | ||||||
| for (const key of oldSet) { | ||||||
| if (newSet.has(key)) continue | ||||||
| const [model, column, testField] = key.split("\x00") | ||||||
| if (movedTo(model, column, testField)) continue | ||||||
| // `testField` may carry a `\x01<to>\x02<field>` discriminator for | ||||||
| // `relationships` tests so multiple relationships on the same column | ||||||
| // don't collapse to one removal (MINOR #4). Strip it for display; | ||||||
|
|
@@ -1626,14 +1736,15 @@ export function detectSchemaYmlPatterns( | |||||
| : `Add \`not_null\` to \`${g.column}\`'s \`data_tests:\` on \`${g.model}\` (contract is not enforced, so a \`constraints:\` entry would be inert — use a data_test).` | ||||||
| findings.push( | ||||||
| makeFinding({ | ||||||
| severity: clampSeverity("test_coverage", "warning", "high"), | ||||||
| severity: "suggestion", | ||||||
| category: "test_coverage", | ||||||
| title: `${filename}: grain column \`${g.column}\` in unique_combination_of_columns lacks \`not_null\` on \`${g.model}\``, | ||||||
| body: | ||||||
| `The \`unique_combination_of_columns\` test on \`${g.model}\` names \`${g.column}\` as a grain key, but no \`not_null\` ` + | ||||||
| `coverage is declared for it (either as a \`constraints:\` entry on a contracted model, or as a \`data_tests: [not_null]\` ` + | ||||||
| `on a view). A NULL grain-key value silently passes the uniqueness test, so a fan-out or duplicate bug can ship without ` + | ||||||
| `any test catching it. ${recommendation}`, | ||||||
| `on a view). The uniqueness test still catches duplicates (rows with NULL keys group together), but nothing stops NULL ` + | ||||||
| `grain keys themselves, and as an incremental \`unique_key\` a NULL never matches on merge, so those rows are re-inserted every run. ` + | ||||||
| `${recommendation}`, | ||||||
| file: file.path, | ||||||
| model: g.model, | ||||||
| column: g.column, | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -203,3 +203,46 @@ export function dedupe(findings: Finding[]): Finding[] { | |||||
| } | ||||||
| return [...byId.values()] | ||||||
| } | ||||||
|
|
||||||
| /** A finding's title without its leading `<model or file>: `, with backticked | ||||||
| * names blanked, so the same rule on different models/columns shares a key. */ | ||||||
| export function ruleTitle(f: Pick<Finding, "title">): string { | ||||||
| return f.title | ||||||
| .replace(/^[\w.\-/]+: /, "") | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Prompt for AI agents |
||||||
| .replace(/ \(\+\d+ more\)$/, "") | ||||||
| .replace(/`[^`]*`/g, "`…`") | ||||||
| } | ||||||
|
|
||||||
| /** | ||||||
| * Merge repeats of one rule within one file (one finding per column of a grain | ||||||
| * test, one per join onto the same kind of key) into a single finding that | ||||||
| * lists every instance. Critical findings stay separate: each one can block. | ||||||
| */ | ||||||
| export function mergeRepeats(findings: Finding[]): Finding[] { | ||||||
| const groups = new Map<string, Finding[]>() | ||||||
| const out: Finding[] = [] | ||||||
| for (const f of findings) { | ||||||
| if (f.severity === "critical") { | ||||||
| out.push(f) | ||||||
| continue | ||||||
| } | ||||||
| const key = [f.file, f.category, f.severity, !!f.degraded, ruleTitle(f)].join("|") | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Prompt for AI agentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: This delimiter-joined grouping key is ambiguous when a file or title contains Prompt for AI agents
Suggested change
|
||||||
| const g = groups.get(key) | ||||||
| if (g) g.push(f) | ||||||
| else groups.set(key, [f]) | ||||||
| } | ||||||
| for (const g of groups.values()) { | ||||||
| if (g.length === 1) { | ||||||
| out.push(g[0]) | ||||||
| continue | ||||||
| } | ||||||
| g.sort((a, b) => tieKey(a).localeCompare(tieKey(b))) | ||||||
| const [first, ...rest] = g | ||||||
| out.push({ | ||||||
| ...first, | ||||||
| title: `${first.title} (+${rest.length} more)`, | ||||||
| body: `${first.body}\n\nSame rule, also here:\n${rest.map((f) => `- ${f.title.replace(/^[\w.\-/]+: /, "")}`).join("\n")}`, | ||||||
| }) | ||||||
| } | ||||||
| return out | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The AI lane does not see every changed dbt file: deleted files are filtered out, and
analysis/other classified dbt files are never added to its input. Say “eligible non-deleted files in these supported roles” or expand the implementation to cover all changed dbt kinds.Prompt for AI agents