From 7414c1e9ca608e52e82d794e32cabadcbcae5f8b Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Thu, 14 May 2026 02:30:37 +0000 Subject: [PATCH] review: clarify diff-coverage nudge gives explicit license to skip generated artifacts the one-time pre-flight nudge said "optionally read" but never told the agent it's free to retry without reading when every unread region is generated (lockfiles, codegen, snapshots, migration metadata). audit #677 surfaced ~21 runs/24h burning an extra model turn re-reading drizzle snapshots, pnpm-lock, and *.gen.ts files purely to satisfy the gate. mode prompts only mention generated content in the "skip self-review entirely" path, not the "in-progress substantive review" path, so the in-the-moment error message was the gap. behavior unchanged for legitimately-unread source regions. --- mcp/review.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcp/review.ts b/mcp/review.ts index fb6ce42..bec9048 100644 --- a/mcp/review.ts +++ b/mcp/review.ts @@ -712,7 +712,9 @@ function runDiffCoveragePreflight(params: { ctx: ToolContext }): void { .join("\n"); throw new Error( `diff coverage pre-flight: some TOC regions were not read before review submission. ` + - `this is a one-time nudge — optionally read the ranges below from ${coverageState.diffPath}, then call create_pull_request_review again with the same arguments. ` + + `this is a one-time nudge — read the ranges below from ${coverageState.diffPath} on a best-effort basis, then call create_pull_request_review again with the same arguments. ` + + `you are NOT obligated to read generated artifacts (lockfiles like pnpm-lock.yaml / package-lock.json / yarn.lock / Cargo.lock; codegen output like *.gen.*, *.pb.go, *.generated.*; snapshot/fixture dirs like __snapshots__/; migration metadata like drizzle/meta/, prisma migration SQL). ` + + `if every unread region is generated, retry immediately without reading. ` + `this pre-flight will not block again in this review session.\n\n` + `unread TOC regions:\n${unreadText}\n\n` + `${coverageState.lastBreakdown}`