Skip to content

Commit fba9084

Browse files
fix: normalize explicit no-limitation reviews (#13)
1 parent ed9fcb2 commit fba9084

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/adapter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2717,8 +2717,9 @@ function executionOnlyLimitation(value: string): boolean {
27172717
export function expectedReviewScopeStatement(value: string): boolean {
27182718
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)
27192719
&& /\b(?:changed files?|change set|supporting context|agent guidance|AGENTS\.md)\b/i.test(value);
2720+
const explicitlyDeniesMaterialLimitation = /\bno material limitations?\b/i.test(value);
27202721
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);
2721-
return describesExpectedScope && !reportsMaterialConstraint;
2722+
return (describesExpectedScope || explicitlyDeniesMaterialLimitation) && !reportsMaterialConstraint;
27222723
}
27232724

27242725
export function trustedValidationFindings(task: JsonObject, receipts: JsonObject[]): JsonObject[] {

tests/webhook-adapter.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,12 @@ test("distinguishes expected bounded review scope from material limitations", ()
11661166
assert.equal(expectedReviewScopeStatement(
11671167
"High confidence; the review was bounded to the supplied changed files plus directly relevant supporting context, and no material limitation remains.",
11681168
), true);
1169+
assert.equal(expectedReviewScopeStatement(
1170+
"High confidence. The changed file is directly malformed, and the failure is independently corroborated by syntax checking; no material limitation.",
1171+
), true);
1172+
assert.equal(expectedReviewScopeStatement(
1173+
"No material limitation, but relevant dependency context was unavailable.",
1174+
), false);
11691175
assert.equal(expectedReviewScopeStatement(
11701176
"I reviewed only the changed file because relevant dependency context was unavailable.",
11711177
), false);

0 commit comments

Comments
 (0)