Skip to content

Commit bbbbb67

Browse files
committed
fix: unexpected code path triggered due to incorrect retry check
We should not allow for an extra attempt that would try to re-enter the for loop but would not satisfy the `< maxAttempts` condition.
1 parent ac0fe24 commit bbbbb67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runner/orchestration/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export async function generateCodeAndAssess(options: AssessmentConfig): Promise<
189189
try {
190190
return await evaluate();
191191
} catch (e: unknown) {
192-
if (e instanceof TimeoutError && attemptIdx < maxAttempts) {
192+
if (e instanceof TimeoutError && attemptIdx < maxAttempts - 1) {
193193
continue;
194194
}
195195

0 commit comments

Comments
 (0)