Repository navigation
feat(review): opt-in test-gap check and focused AI batches; verifier reads every changed file #1772
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-ai-input-coverage
Are you sure you want to change the base?
Changes from all commits
360c973
df35070
dfff807
cff2bb8
1022799
4b738d8
3a44ed5
a2d91ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,15 @@ import { readStreamStep, type StepToolCall } from "../llm/stream-text" | |
|
|
||
| const log = Log.create({ service: "ai-verify" }) | ||
|
|
||
| // Connection profiles, env files, key material and Terraform variables hold credentials: never sent to a model. | ||
| const CREDENTIAL_FILE = | ||
| /(^|\/)(profiles\.ya?ml|\.env(\.[^/]*)?|\.netrc|\.pgpass|id_(rsa|dsa|ecdsa|ed25519)|[^/]+\.(pem|key|p12|pfx|tfvars))$/i | ||
|
|
||
| /** A path whose content may hold credentials; the AI lane and the verifier never read or show it. */ | ||
| export function isCredentialPath(path: string): boolean { | ||
| return CREDENTIAL_FILE.test(path) | ||
| } | ||
|
|
||
| /** What the verifier may read: the PR's files, the engine, and the dbt project. */ | ||
| export interface AiVerifyEvidence { | ||
| dialect?: string | ||
|
|
@@ -41,6 +50,8 @@ export interface AiVerifyEvidence { | |
| prBody?: string | ||
| /** Head-side line numbers each changed file adds (see `addedLinesByFile`). */ | ||
| addedLines: Map<string, Set<number>> | ||
| /** Every file the PR changes, repo-relative, including tests and CI outside the dbt project. */ | ||
| prFiles?: string[] | ||
| } | ||
|
|
||
| export type Decision = "keep" | "discard" | "summary" | ||
|
|
@@ -382,12 +393,27 @@ export function hunkAround(diff: string | undefined, line?: number): string { | |
| : text || "(the line is outside the diff)" | ||
| } | ||
|
|
||
| /** Most PR file paths listed in a verifier message. */ | ||
| const PR_FILES_MAX = 40 | ||
|
|
||
| /** The user message for one batch: the PR title and each candidate with its hunk. Not the whole file, not the grounding. */ | ||
| export function buildVerifyMessage( | ||
| prTitle: string | undefined, | ||
| candidates: Array<{ id: string; finding: Finding; diff?: string }>, | ||
| prFiles: string[] = [], | ||
| ): string { | ||
| const parts = [`PR: ${(prTitle ?? "(untitled)").slice(0, 200)}`, "", "Candidates:"] | ||
| const parts = [`PR: ${(prTitle ?? "(untitled)").slice(0, 200)}`] | ||
| // A test-coverage claim is checked against the PR's own test files, which may sit outside the dbt project. | ||
| if (prFiles.length && candidates.some((c) => c.finding.category === "test_coverage")) { | ||
| const shown = prFiles.slice(0, PR_FILES_MAX) | ||
| parts.push( | ||
| "", | ||
| "Files this PR changes (read_file can open any of them):", | ||
| ...shown.map((p) => `- ${p}`), | ||
| ...(prFiles.length > shown.length ? [`- … and ${prFiles.length - shown.length} more`] : []), | ||
| ) | ||
| } | ||
| parts.push("", "Candidates:") | ||
| for (const { id, finding: f, diff } of candidates) { | ||
| parts.push( | ||
| "", | ||
|
|
@@ -784,8 +810,9 @@ export function verifierTools( | |
| ...ev.addedLines.keys(), | ||
| ...graph.parents.map((p) => p.path), | ||
| ...graph.downstream.map((d) => d.path), | ||
| ...(ev.prFiles ?? []), | ||
|
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: The verifier's read allowlist now includes every PR file, including paths the user excluded with Prompt for AI agents
Contributor
Author
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. Fixed in 31cb5c4: |
||
| ]), | ||
| ] | ||
| ].filter((p) => !isCredentialPath(p)) | ||
| /** A requested path inside the review scope, as the repo-relative path to read; a project-relative path resolves too. */ | ||
| const resolve = (p: unknown): string | undefined => { | ||
| const want = String(p ?? "").replace(/^\.?\/+/, "") | ||
|
|
@@ -799,11 +826,11 @@ export function verifierTools( | |
| graph.parents.find((p) => p.name === name && (p.kind === "model" || p.kind === "snapshot"))?.path ?? | ||
| graph.downstream.find((d) => d.name === name)?.path | ||
| const side = z.enum(["old", "new"]).optional().describe("old=base, new=head (default)") | ||
| const scope = NA("outside review scope (changed files, their dbt parents and direct downstream models only)") | ||
| const scope = NA("outside review scope (files the PR changes, their dbt parents and direct downstream models only)") | ||
|
|
||
| return { | ||
| read_file: { | ||
| description: "Up to 200 numbered lines of a changed file, its dbt parents or direct children.", | ||
| description: "Up to 200 numbered lines of any file the PR changes (tests and CI included), a dbt parent or direct child.", | ||
| input: z.object({ | ||
| path: z.string(), | ||
| side, | ||
|
|
@@ -920,8 +947,9 @@ export function verifierTools( | |
| async run({ pattern, glob }) { | ||
| if (!ev.grepProject) return NA("project search unavailable") | ||
| if (String(pattern).length < 2) return NA("pattern needs at least 2 characters") | ||
| const hits = await ev.grepProject(String(pattern), glob as string | undefined) | ||
| if (!hits) return NA("the search failed (git error, timeout, or a glob outside the project); this is not evidence of absence") | ||
| const found = await ev.grepProject(String(pattern), glob as string | undefined) | ||
| if (!found) return NA("the search failed (git error, timeout, or a glob outside the project); this is not evidence of absence") | ||
| const hits = found.filter((h) => !isCredentialPath(h.path)) | ||
| return hits.length ? hits.map((h) => `${h.path}:${h.line}: ${h.text}`).join("\n") : "no matches" | ||
| }, | ||
| }, | ||
|
|
@@ -1176,6 +1204,7 @@ export async function runAiVerify( | |
| finding: input.findings[i], | ||
| diff: fileByPath.get(input.findings[i].file)?.diff, | ||
| })), | ||
| ev.prFiles, | ||
| ) | ||
| return { idx, ids, message } | ||
| }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -986,7 +986,9 @@ export function redundantJoinPredicates(sql: string): string[] { | |||||
| } else if (rel) i += rel[0].length | ||||||
| const tail = /^\s+(?:as\s+)?(\w+)\s+on\b/i.exec(s.slice(i)) ?? /^\s+on\b/i.exec(s.slice(i)) | ||||||
| if (!tail) { | ||||||
| joins.push({ preds: [], start: m.index!, end: i, inner, outer }) | ||||||
| // A join with no ON (`cross join params as p`): step over its alias so the chain continues. | ||||||
| const bare = /^\s+(?:as\s+)?(?!(?:natural|inner|left|right|full|cross|outer|join|lateral|on|using|where|group|order|qualify|having|union|limit|window|select|from)\b)\w+\b/i.exec(s.slice(i)) | ||||||
|
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 Prompt for AI agents
Suggested change
Contributor
Author
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. Follow-up: low priority, tracked. The result is a missed redundant predicate, never a false one. |
||||||
| joins.push({ preds: [], start: m.index!, end: i + (bare?.[0].length ?? 0), inner, outer }) | ||||||
| continue | ||||||
| } | ||||||
| const fallback = rel?.[1].split(".").pop()?.toLowerCase() | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ import { | |
| type NotReviewed, | ||
| partitionChangedFiles, | ||
| hasOldSide, | ||
| isExcludedPath, | ||
| walkDiffLines, | ||
| walkDiffRows, | ||
| } from "./diff-filter" | ||
|
|
@@ -61,12 +62,10 @@ import { | |
| import { type AiContextFile, type AiLaneStatus, type AiReviewFile, type AiReviewInput, type AiReviewResult, aiInputBudget, safeReason, selectAiFiles, selectAiFilesByQuota } from "./ai-review" | ||
| import { type MacroCard, type ModelCard, attachContextCards } from "./ai-context-card" | ||
| import { ruleTier } from "./rule-tiers" | ||
| import { type AiVerifyEvidence, numberedSlice } from "./ai-verify" | ||
| import { type AiVerifyEvidence, isCredentialPath, numberedSlice } from "./ai-verify" | ||
| import type { ColumnReach } from "../native/dbt/column-reach" | ||
|
|
||
| const AI_SUPPORTING_KINDS = new Set(["macro", "test", "snapshot", "schema_yml", "source_yml", "seed", "project_config"]) | ||
| // Connection profiles hold warehouse credentials: never send their diff or content to the AI lane. | ||
| const AI_CREDENTIAL_FILE = /(^|\/)profiles\.ya?ml$/i | ||
|
|
||
| /** | ||
| * The deterministic review recipe. | ||
|
|
@@ -289,6 +288,8 @@ export interface OrchestrateInput { | |
| aiVerify?: boolean | ||
| /** Fixed-string search over the dbt project at head, for the verifier. */ | ||
| grepProject?: AiVerifyEvidence["grepProject"] | ||
| /** Every file the PR changes (repo-relative), including files outside the dbt project; the verifier may read them. */ | ||
| prFiles?: string[] | ||
| /** PR metadata passed to the AI reviewer for intent checking. */ | ||
| prTitle?: string | ||
| prBody?: string | ||
|
|
@@ -302,6 +303,8 @@ export interface OrchestrateInput { | |
| layout?: DbtProjectLayout | ||
| /** Names `ref()` can resolve to at head (repo resources + installed packages); undefined = unknown. */ | ||
| resourceNames?: () => Promise<Set<string> | undefined> | ||
| /** `{% docs %}` names installed packages define; undefined when that can't be known. */ | ||
| packageDocNames?: () => Promise<Set<string> | undefined> | ||
| /** What the review covered: base resolution and files left out of scope. */ | ||
| scope?: Omit<ReviewScope, "unverified" | "notReviewed"> & { notReviewed?: NotReviewed[] } | ||
| /** Drop the regex catalog's cross-engine portability findings (single known engine). */ | ||
|
|
@@ -2378,20 +2381,31 @@ export async function runReview(input: OrchestrateInput): Promise<VerdictEnvelop | |
| // dozens of yml files; serial `git show` per file adds up). | ||
| // A `{% docs name %}` block in any of the project's .md files at head (cached per name). | ||
| const docLookups = new Map<string, Promise<boolean>>() | ||
| // Docs blocks of installed packages (cached); undefined when they can't be known. | ||
| let pkgDocs: Promise<Set<string> | undefined> | undefined | ||
| const packageDocs = () => (pkgDocs ??= input.packageDocNames?.().catch(() => undefined) ?? Promise.resolve(undefined)) | ||
| const docExists = (name: string) => { | ||
| if (!docLookups.has(name)) { | ||
| const block = new RegExp(`\\{%-?\\s*docs\\s+${name}\\s*-?%\\}`) | ||
| docLookups.set( | ||
| name, | ||
| (input.grepProject?.(`docs ${name}`, "*.md") ?? Promise.resolve([])) | ||
| // An unavailable search (undefined) is no evidence the block is missing. | ||
| .then((hits) => hits === undefined || hits.some((h) => block.test(h.text))) | ||
| .then(async (hits) => hits === undefined || hits.some((h) => block.test(h.text)) || !!(await packageDocs())?.has(name)) | ||
| // A failed search is no evidence the block is missing. | ||
| .catch(() => true), | ||
| ) | ||
| } | ||
| return docLookups.get(name)! | ||
| } | ||
| // The project defines docs blocks of its own (any `{% docs x %}` in its .md files), and its | ||
| // installed packages' blocks are known: a package may define the name otherwise. | ||
| let docsAny: Promise<boolean> | undefined | ||
| const projectHasDocs = () => | ||
| (docsAny ??= (input.grepProject?.("docs", "*.md") ?? Promise.resolve([])) | ||
|
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. SUGGESTION: the generic
Contributor
Author
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. Follow-up: low priority, tracked. Hitting the cap makes the rule go silent (a missed finding, not a wrong one); grepping for 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: The generic Prompt for AI agents
Contributor
Author
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. Same as r4627012892; tracked. |
||
| .then(async (hits) => !!hits?.some((h) => /\{%-?\s*docs\s+\w+\s*-?%\}/.test(h.text)) && (await packageDocs()) !== undefined) | ||
| // A failed or unavailable search is no evidence: stay silent. | ||
| .catch(() => false)) | ||
| const schemaFiles = reviewable.filter((f) => f.kind === "schema_yml") | ||
| touch(schemaFiles) | ||
| const sqlByModel = new Map([...ctxByPath.values()].filter((c) => c.newSql).map((c) => [modelNameFromPath(c.file.path).toLowerCase(), c.newSql!])) | ||
|
|
@@ -2410,7 +2424,7 @@ export async function runReview(input: OrchestrateInput): Promise<VerdictEnvelop | |
| ...detectUnitTestFixtures(file, oldContent, newContent), | ||
| ...snapshotYmlFindings(file, oldContent, newContent), | ||
| ...detectTestAdequacy({ file, oldContent, newContent, projectYml, layout: input.layout }), | ||
| ...(lanes.has("dbt_patterns") && input.grepProject ? await docRefFindings(file, oldContent, newContent, docExists) : []), | ||
| ...(lanes.has("dbt_patterns") && input.grepProject ? await docRefFindings(file, oldContent, newContent, docExists, projectHasDocs) : []), | ||
| ] | ||
| } catch (err) { | ||
| // One malformed schema file degrades that file only. | ||
|
|
@@ -2586,7 +2600,7 @@ export async function runReview(input: OrchestrateInput): Promise<VerdictEnvelop | |
| // Macros, data tests, snapshots, yml and seeds carry defects no model diff shows. | ||
| // Seeds go as a diff only: the full CSV is data, not logic. | ||
| const supporting = reviewable.filter( | ||
| (f) => AI_SUPPORTING_KINDS.has(f.kind) && f.status !== "deleted" && !AI_CREDENTIAL_FILE.test(f.path), | ||
| (f) => AI_SUPPORTING_KINDS.has(f.kind) && f.status !== "deleted" && !isCredentialPath(f.path), | ||
| ) | ||
| const contents = await Promise.all( | ||
| supporting.map((f) => (f.kind === "seed" ? undefined : getContent?.(f.path, "new")?.catch(() => undefined))), | ||
|
|
@@ -2600,6 +2614,10 @@ export async function runReview(input: OrchestrateInput): Promise<VerdictEnvelop | |
| touch(aiBudget.coverage ? selectAiFilesByQuota(aiFiles, aiBudget.coverage.quotas).sent : selectAiFiles(aiFiles, aiBudget.maxFiles)) | ||
| if (input.aiContextCard && anyManifest) await attachContextCards(aiFiles, input.runner) | ||
| const context = input.aiGraphContext ? await aiGraphContext(aiFiles.map((f) => f.path), input.runner, getContent) : undefined | ||
| // Files the PR changes that the AI may list and the verifier may read; never the user's exclusions or credentials. | ||
| const prFiles = (input.prFiles ?? input.changedFiles.map((f) => f.path)).filter( | ||
| (p) => !isExcludedPath(p, input.rubric.exclusions.excludeGlobs) && !isCredentialPath(p), | ||
| ) | ||
|
Contributor
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. [MAJOR] Verifier allowlist bypasses the credential-file exclusion const prFiles = (input.prFiles ?? input.changedFiles.map((f) => f.path)).filter(
(p) => !isExcludedPath(p, input.rubric.exclusions.excludeGlobs),
)The AI file list above (line ~2599) deliberately drops Fix: also filter
Contributor
Author
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. Good catch. Fixed in 7b5bb4b (the "verifier credential scope" part). One
The AI lane's supporting-file filter now uses the same predicate. Tests: |
||
| // The verifier reads engine SQL first (the same SQL the engine lanes saw), then compiled output. | ||
| const evidence: AiVerifyEvidence | undefined = input.aiVerify | ||
| ? { | ||
|
|
@@ -2611,6 +2629,7 @@ export async function runReview(input: OrchestrateInput): Promise<VerdictEnvelop | |
| prTitle: input.prTitle, | ||
| prBody: input.prBody, | ||
| grepProject: input.grepProject, | ||
| prFiles, | ||
| readFile: async (p, side, start, end) => numberedSlice(await getContent?.(p, side), start, end), | ||
| compiledSql: async (p, side) => { | ||
| const ctx = ctxByPath.get(p) | ||
|
|
@@ -2627,6 +2646,7 @@ export async function runReview(input: OrchestrateInput): Promise<VerdictEnvelop | |
| prTitle: input.prTitle, | ||
| prBody: input.prBody, | ||
| model: input.aiModel, | ||
| prFiles, | ||
| ...(evidence ? { evidence } : {}), | ||
| }) | ||
| const aiFindings = Array.isArray(res) ? res : res.findings | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -402,7 +402,19 @@ export function yamlParseFindings(file: ChangedFile, oldContent: string | undefi | |
| if (!/\.ya?ml$/i.test(file.path) || file.status === "deleted" || !newContent) return [] | ||
| const err = yamlError(newContent) | ||
| if (!err || (oldContent !== undefined && yamlError(oldContent))) return [] | ||
| const text = err.line ? newContent.split("\n")[err.line - 1] : undefined | ||
| // Some errors land one past the edit (an unterminated quote fails where the scan ends): anchor | ||
| // on the added line at or before the error line, else on the error line when a hunk shows it | ||
| // (a deletion-only edit), else on the file. An error with no line goes on the first added line. | ||
| const rows = [...walkDiffRows(file.diff)] | ||
| const added = rows.filter((r) => r.kind === "+") | ||
| const errLine = err.line | ||
| const at = | ||
| errLine === undefined | ||
| ? added[0] | ||
| : (added.find((r) => r.line === errLine) ?? | ||
| [...added].reverse().find((r) => r.line < errLine) ?? | ||
| rows.find((r) => r.kind === " " && r.line === errLine)) | ||
| const text = at?.text ?? (errLine ? newContent.split("\n")[errLine - 1] : undefined) | ||
| const f = finding( | ||
| file, | ||
| "yaml-parse-error", | ||
|
|
@@ -414,7 +426,7 @@ export function yamlParseFindings(file: ChangedFile, oldContent: string | undefi | |
| : `${err.message}${err.line ? ` (line ${err.line})` : ""}. The file parsed before this change; tools that read it now fail.`, | ||
| text, | ||
| ) | ||
| return [err.line ? { ...f, startLine: err.line, endLine: err.line } : f] | ||
| return [at ? { ...f, startLine: at.line, endLine: at.line } : f] | ||
| } | ||
|
|
||
| /** New models named like the public models a `.quickstart/quickstart.yml` lists, but missing from | ||
|
|
@@ -489,14 +501,17 @@ export function packageLockFindings(file: ChangedFile, isPackage: boolean): Find | |
|
|
||
| const DOC_REF = /\bdoc\s*\(\s*['"](\w+)['"]\s*\)/g | ||
|
|
||
| /** `doc('x')` names this change adds to a yml file that no docs block in the project defines: | ||
| * dbt fails to parse the project. Only when another `doc()` in the file resolves in the project, | ||
| * so docs kept in an installed package aren't mistaken for missing ones. */ | ||
| /** `doc('x')` names this change adds to a yml file that no docs block in the project or its | ||
| * installed packages defines: dbt fails to parse the project. Only when another `doc()` in the | ||
| * file resolves, or, when the file has no other `doc()`, the project keeps its own docs blocks | ||
| * (`projectHasDocs` also requires the packages' blocks to be known); so docs kept in an | ||
| * uninstalled package aren't mistaken for missing ones. */ | ||
| export async function docRefFindings( | ||
| file: ChangedFile, | ||
| oldContent: string | undefined, | ||
| newContent: string | undefined, | ||
| docExists: (name: string) => Promise<boolean>, | ||
| projectHasDocs?: () => Promise<boolean>, | ||
| ): Promise<Finding[]> { | ||
| if (!newContent || file.status === "deleted") return [] | ||
| const before = new Set([...(oldContent ?? "").matchAll(DOC_REF)].map((m) => m[1])) | ||
|
|
@@ -509,6 +524,7 @@ export async function docRefFindings( | |
| const others = [...new Set([...newContent.matchAll(DOC_REF)].map((m) => m[1]))].filter((n) => !missing.includes(n)).slice(0, 5) | ||
| let resolves = false | ||
| for (const n of others) if ((resolves = await docExists(n))) break | ||
| if (!others.length && projectHasDocs) resolves = await projectHasDocs() | ||
|
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. WARNING:
Contributor
Author
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. Fixed in 31cb5c4:
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
|
||
| if (!resolves) return [] | ||
| return missing.map((name) => | ||
| finding( | ||
|
|
@@ -517,7 +533,7 @@ export async function docRefFindings( | |
| "warning", | ||
| "sql_correctness", | ||
| `\`doc('${name}')\` has no docs block`, | ||
| `No \`{% docs ${name} %}\` block exists in the project's \`.md\` files, while the other \`doc()\` references in this file resolve there. dbt fails to parse the project on a \`doc()\` it can't resolve. Add the docs block, or fix the name.`, | ||
| `No \`{% docs ${name} %}\` block exists in the project's \`.md\` files or its installed packages, while ${others.length ? "the other \`doc()\` references in this file resolve" : "the project defines its own docs blocks"}. dbt fails to parse the project on a \`doc()\` it can't resolve. Add the docs block, or fix the name.`, | ||
| lines.get(name), | ||
| ), | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,17 +70,21 @@ export function blockingCategories(rubric: Rubric): Set<string> { | |
| return new Set(rubric.blockOn) | ||
| } | ||
|
|
||
| /** Findings that break `dbt parse` for the whole project, so a dev/sandbox/scratch folder doesn't excuse them. */ | ||
| const PROJECT_BREAKING_RULES = new Set(["dbt-project-rules:yaml-parse-error", "dbt-project-rules:doc-block-missing"]) | ||
|
|
||
| /** | ||
| * Apply the rubric's exclusion predicates. Returns the reason a finding should | ||
| * be dropped, or null to keep it. Centralizing this here (vs prompt text) is | ||
| * what keeps the false-positive rate down deterministically. | ||
| */ | ||
|
|
||
| export function exclusionReason(finding: Finding, rubric: Rubric): string | null { | ||
| const ex = rubric.exclusions | ||
| const isStaging = /(^|\/)stg_|(^|\/)staging\//.test(finding.file) || finding.model?.startsWith("stg_") | ||
| const isDev = /(^|\/)(dev|sandbox|scratch)\//.test(finding.file) | ||
|
|
||
| if (ex.skipNonProdModels && isDev) return "non-prod model (dev/sandbox/scratch)" | ||
| if (ex.skipNonProdModels && isDev && !PROJECT_BREAKING_RULES.has(finding.rule ?? "")) return "non-prod model (dev/sandbox/scratch)" | ||
|
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. WARNING: This exemption only keeps |
||
|
|
||
| if ( | ||
| ex.allowSelectStarInStaging && | ||
|
|
||
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 verifier cannot discover changed files after the first 40 paths, so a test added at path 41+ can be missed by the test-gap check; add a bounded file-list tool or otherwise expose all paths to the verifier.
Prompt for AI agents
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.
Same as r4627044412; tracked.