@@ -8,17 +8,13 @@ import {
88 RootPromptDefinition ,
99 TestResult ,
1010} 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' ;
1512import { ProgressLogger } from '../progress/progress-logger.js' ;
1613import { runBuild } from './build-worker.js' ;
1714import { repairAndBuild } from './build-repair.js' ;
1815import { EvalID , Gateway } from './gateway.js' ;
1916import { serveAndTestApp } from './serve-testing-worker.js' ;
2017import { runTest } from './test-worker.js' ;
21- import { repairAndTest } from './test-repair.js' ;
2218import { BrowserAgentTaskInput } from '../testing/browser-agent/models.js' ;
2319
2420/**
@@ -214,7 +210,6 @@ export async function attemptBuildAndTest(
214210
215211 // Run tests if test command is configured and build was successful
216212 let testResult : TestResult | null = null ;
217- let testRepairAttempts = 0 ;
218213
219214 if ( lastAttempt . buildResult . status === BuildResultStatus . SUCCESS && 'testCommand' in env ) {
220215 testResult = await runTest (
@@ -227,41 +222,7 @@ export async function attemptBuildAndTest(
227222 workerConcurrencyQueue ,
228223 progress ,
229224 ) ;
230-
231- const maxTestRepairAttempts = gateway . shouldRetryFailedTests ( evalID )
232- ? DEFAULT_MAX_TEST_REPAIR_ATTEMPTS
233- : 0 ;
234-
235225 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- }
265226 }
266227
267228 return {
@@ -271,6 +232,5 @@ export async function attemptBuildAndTest(
271232 repairAttempts,
272233 axeRepairAttempts,
273234 testResult,
274- testRepairAttempts,
275235 } ;
276236}
0 commit comments