Skip to content

Commit aa73327

Browse files
Ignore non-material bounded-scope notes
1 parent ad4247b commit aa73327

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2715,7 +2715,7 @@ function executionOnlyLimitation(value: string): boolean {
27152715
}
27162716

27172717
export function expectedReviewScopeStatement(value: string): boolean {
2718-
const describesExpectedScope = /\b(?:bounded(?: review)? scope|bounded review instructions?|reviewed only the changed files?|limited to (?:the )?(?:supplied )?change set)\b/i.test(value)
2718+
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);
27202720
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);
27212721
return describesExpectedScope && !reportsMaterialConstraint;

tests/webhook-adapter.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,9 @@ test("distinguishes expected bounded review scope from material limitations", ()
11631163
assert.equal(expectedReviewScopeStatement(
11641164
"The review is limited to the supplied change set and supporting context and does not assess unrelated repository areas.",
11651165
), true);
1166+
assert.equal(expectedReviewScopeStatement(
1167+
"High confidence; the review was bounded to the supplied changed files plus directly relevant supporting context, and no material limitation remains.",
1168+
), true);
11661169
assert.equal(expectedReviewScopeStatement(
11671170
"I reviewed only the changed file because relevant dependency context was unavailable.",
11681171
), false);

0 commit comments

Comments
 (0)