Skip to content

Commit 0b72844

Browse files
committed
Revert "fix: do not accidentally throw off serve results when test repairs fail"
This reverts commit 9d1d2f5. We will just reduce test repair attempts to 0 by default for now. The long-term solution is: - We don't do repair attempts at all. - or, we treat them as entirely separate assessments. That way they don't affect the score but can be still captured for the UI/report.
1 parent be59688 commit 0b72844

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

runner/eval-cli.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ interface Options {
4242
skipLighthouse?: boolean;
4343
maxTestRepairAttempts?: number;
4444
maxBuildRepairAttempts?: number;
45-
preserveBreakingTestRepairAttempts?: boolean;
4645
}
4746

4847
function builder(argv: Argv): Argv<Options> {
@@ -169,13 +168,6 @@ function builder(argv: Argv): Argv<Options> {
169168
description:
170169
'Number of repair attempts for discovered test failures (including a11y violations and ones from testCommand)',
171170
})
172-
.option('preserve-breaking-test-repair-attempts', {
173-
type: 'boolean',
174-
// See rationale for the default via:
175-
// https://github.com/angular/web-codegen-scorer/pull/69
176-
default: false,
177-
description: `Whether test repair attempts which break a build should be captured.`,
178-
})
179171
.strict()
180172
.version(false)
181173
.help()
@@ -229,7 +221,6 @@ async function handler(cliArgs: Arguments<Options>): Promise<void> {
229221
skipLighthouse: cliArgs.skipLighthouse,
230222
maxBuildRepairAttempts: cliArgs.maxBuildRepairAttempts,
231223
maxTestRepairAttempts: cliArgs.maxTestRepairAttempts,
232-
preserveBreakingTestRepairAttempts: cliArgs.preserveBreakingTestRepairAttempts,
233224
abortSignal: abortCtrl.signal,
234225
});
235226

runner/orchestration/build-serve-test-loop.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,8 @@ export async function attemptBuildAndTest(
218218

219219
let hasBuildFailure = attempt.buildResult.status !== BuildResultStatus.SUCCESS;
220220
attempt.buildFailedDuringTestRepair = hasBuildFailure;
221-
222-
// By default, we don't preserve breaking test repair attempts as they significantly
223-
// impact evaluation results by e.g. lacking serve results.
224-
// TODO: In the future we should consider exploring this further, or at least capture tokens.
225-
if (!hasBuildFailure || config.preserveBreakingTestRepairAttempts) {
226-
attemptDetails.push(attempt);
227-
lastAttempt = attempt;
228-
}
221+
attemptDetails.push(attempt);
222+
lastAttempt = attempt;
229223
// If we somehow introduced build errors via the repair loop, we abort
230224
// further repairs and capture the failed build. This is useful insight
231225
// as LLMs seem to regress when asked to repair violations.

runner/shared-interfaces.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export interface AssessmentConfig {
3030
skipLighthouse?: boolean;
3131
maxTestRepairAttempts?: number;
3232
maxBuildRepairAttempts?: number;
33-
preserveBreakingTestRepairAttempts?: boolean;
3433
abortSignal?: AbortSignal;
3534
}
3635

0 commit comments

Comments
 (0)