@@ -8,17 +8,13 @@ import {
8
8
RootPromptDefinition ,
9
9
TestResult ,
10
10
} from '../shared-interfaces.js' ;
11
- import {
12
- DEFAULT_MAX_REPAIR_ATTEMPTS ,
13
- DEFAULT_MAX_TEST_REPAIR_ATTEMPTS ,
14
- } from '../configuration/constants.js' ;
11
+ import { DEFAULT_MAX_REPAIR_ATTEMPTS } from '../configuration/constants.js' ;
15
12
import { ProgressLogger } from '../progress/progress-logger.js' ;
16
13
import { runBuild } from './build-worker.js' ;
17
14
import { repairAndBuild } from './build-repair.js' ;
18
15
import { EvalID , Gateway } from './gateway.js' ;
19
16
import { serveAndTestApp } from './serve-testing-worker.js' ;
20
17
import { runTest } from './test-worker.js' ;
21
- import { repairAndTest } from './test-repair.js' ;
22
18
import { BrowserAgentTaskInput } from '../testing/browser-agent/models.js' ;
23
19
24
20
/**
@@ -214,7 +210,6 @@ export async function attemptBuildAndTest(
214
210
215
211
// Run tests if test command is configured and build was successful
216
212
let testResult : TestResult | null = null ;
217
- let testRepairAttempts = 0 ;
218
213
219
214
if ( lastAttempt . buildResult . status === BuildResultStatus . SUCCESS && 'testCommand' in env ) {
220
215
testResult = await runTest (
@@ -227,41 +222,7 @@ export async function attemptBuildAndTest(
227
222
workerConcurrencyQueue ,
228
223
progress ,
229
224
) ;
230
-
231
- const maxTestRepairAttempts = gateway . shouldRetryFailedTests ( evalID )
232
- ? DEFAULT_MAX_TEST_REPAIR_ATTEMPTS
233
- : 0 ;
234
-
235
225
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
226
}
266
227
267
228
return {
@@ -271,6 +232,5 @@ export async function attemptBuildAndTest(
271
232
repairAttempts,
272
233
axeRepairAttempts,
273
234
testResult,
274
- testRepairAttempts,
275
235
} ;
276
236
}
0 commit comments