@@ -10,15 +10,13 @@ import {
10
10
} from '../shared-interfaces.js' ;
11
11
import {
12
12
DEFAULT_MAX_REPAIR_ATTEMPTS ,
13
- DEFAULT_MAX_TEST_REPAIR_ATTEMPTS ,
14
13
} from '../configuration/constants.js' ;
15
14
import { ProgressLogger } from '../progress/progress-logger.js' ;
16
15
import { runBuild } from './build-worker.js' ;
17
16
import { repairAndBuild } from './build-repair.js' ;
18
17
import { EvalID , Gateway } from './gateway.js' ;
19
18
import { serveAndTestApp } from './serve-testing-worker.js' ;
20
19
import { runTest } from './test-worker.js' ;
21
- import { repairAndTest } from './test-repair.js' ;
22
20
import { BrowserAgentTaskInput } from '../testing/browser-agent/models.js' ;
23
21
24
22
/**
@@ -214,7 +212,6 @@ export async function attemptBuildAndTest(
214
212
215
213
// Run tests if test command is configured and build was successful
216
214
let testResult : TestResult | null = null ;
217
- let testRepairAttempts = 0 ;
218
215
219
216
if ( lastAttempt . buildResult . status === BuildResultStatus . SUCCESS && 'testCommand' in env ) {
220
217
testResult = await runTest (
@@ -227,41 +224,7 @@ export async function attemptBuildAndTest(
227
224
workerConcurrencyQueue ,
228
225
progress ,
229
226
) ;
230
-
231
- const maxTestRepairAttempts = gateway . shouldRetryFailedTests ( evalID )
232
- ? DEFAULT_MAX_TEST_REPAIR_ATTEMPTS
233
- : 0 ;
234
-
235
227
lastAttempt . testResult = testResult ;
236
-
237
- while ( ! testResult . passed && testRepairAttempts < maxTestRepairAttempts ) {
238
- testRepairAttempts ++ ;
239
- progress . log (
240
- rootPromptDef ,
241
- 'test' ,
242
- `Trying to repair app tests (attempt #${ testRepairAttempts + 1 } )` ,
243
- ) ;
244
-
245
- const attempt = await repairAndTest (
246
- evalID ,
247
- gateway ,
248
- model ,
249
- env ,
250
- rootPromptDef ,
251
- directory ,
252
- lastAttempt . outputFiles ,
253
- testResult . output ,
254
- 'The tests failed. Attempt to fix them. There are the following test errors:' ,
255
- contextFiles ,
256
- abortSignal ,
257
- workerConcurrencyQueue ,
258
- testRepairAttempts ,
259
- progress ,
260
- ) ;
261
- attemptDetails . push ( attempt ) ;
262
- lastAttempt = attempt ;
263
- testResult = lastAttempt . testResult ! ;
264
- }
265
228
}
266
229
267
230
return {
@@ -271,6 +234,5 @@ export async function attemptBuildAndTest(
271
234
repairAttempts,
272
235
axeRepairAttempts,
273
236
testResult,
274
- testRepairAttempts,
275
237
} ;
276
238
}
0 commit comments