From 46307926489824a41ce2542d5ef3e33aae8cac4f Mon Sep 17 00:00:00 2001 From: Timothy Wayne Gregg <5861166+romgenie@users.noreply.github.com> Date: Tue, 14 Jul 2026 21:36:12 -0400 Subject: [PATCH] fix: normalize explicit no-limitation reviews --- src/adapter.ts | 3 ++- tests/webhook-adapter.test.ts | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/adapter.ts b/src/adapter.ts index 1f49d68..5bcb450 100644 --- a/src/adapter.ts +++ b/src/adapter.ts @@ -2717,8 +2717,9 @@ function executionOnlyLimitation(value: string): boolean { export function expectedReviewScopeStatement(value: string): boolean { const describesExpectedScope = /\b(?:bounded(?: review)? scope|bounded review instructions?|review(?:ed)? (?:was |is )?bounded to|reviewed only the changed files?|limited to (?:the )?(?:supplied )?change set)\b/i.test(value) && /\b(?:changed files?|change set|supporting context|agent guidance|AGENTS\.md)\b/i.test(value); + const explicitlyDeniesMaterialLimitation = /\bno material limitations?\b/i.test(value); const reportsMaterialConstraint = /\b(?:unable|could not|couldn't|missing|truncated|unavailable|uncertain|incomplete|not provided|not supplied|failed to inspect|relevant (?:dependency|file|context).{0,30}(?:not|missing|unavailable))\b/i.test(value); - return describesExpectedScope && !reportsMaterialConstraint; + return (describesExpectedScope || explicitlyDeniesMaterialLimitation) && !reportsMaterialConstraint; } export function trustedValidationFindings(task: JsonObject, receipts: JsonObject[]): JsonObject[] { diff --git a/tests/webhook-adapter.test.ts b/tests/webhook-adapter.test.ts index 63dd010..6d3cbea 100644 --- a/tests/webhook-adapter.test.ts +++ b/tests/webhook-adapter.test.ts @@ -1166,6 +1166,12 @@ test("distinguishes expected bounded review scope from material limitations", () assert.equal(expectedReviewScopeStatement( "High confidence; the review was bounded to the supplied changed files plus directly relevant supporting context, and no material limitation remains.", ), true); + assert.equal(expectedReviewScopeStatement( + "High confidence. The changed file is directly malformed, and the failure is independently corroborated by syntax checking; no material limitation.", + ), true); + assert.equal(expectedReviewScopeStatement( + "No material limitation, but relevant dependency context was unavailable.", + ), false); assert.equal(expectedReviewScopeStatement( "I reviewed only the changed file because relevant dependency context was unavailable.", ), false);