Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions report-app/src/app/pages/report-viewer/report-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ <h2>Generated applications</h2>
@if (initialAttempt?.buildResult?.status === 'error') {
<span class="status-badge error">Initial build failed</span>
}

@if (hasBuildFailureDuringA11yRepair(result)) {
<span class="status-badge error"
>Build failed after a11y repair</span
>
}
</div>
</div>
</expansion-panel-header>
Expand Down
4 changes: 4 additions & 0 deletions report-app/src/app/pages/report-viewer/report-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,8 @@ export class ReportViewer {

return `wcs run --prompt=${result.promptDef.name} --env=<path to ${report.details.summary.environmentId} config>`;
}

protected hasBuildFailureDuringA11yRepair(result: AssessmentResult): boolean {
return result.attemptDetails.some(attempt => attempt.buildFailedDuringA11yRepair);
}
}
6 changes: 3 additions & 3 deletions runner/orchestration/build-serve-loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ export async function attemptBuild(
progress,
);

let hasBuildFailure = attempt.buildResult.status !== BuildResultStatus.SUCCESS;
attempt.buildFailedDuringA11yRepair = hasBuildFailure;
attemptDetails.push(attempt);
lastAttempt = attempt;

// If we somehow introduced build errors via the Axe repair loop, we abort
// further a11y repairs and capture the failed build. This is useful insight
// as LLMs seem to regress when asked to repair a11y violations.
if (attempt.buildResult.status !== BuildResultStatus.SUCCESS) {
break;
}
if (hasBuildFailure) break;

// Re-run serving & tests after Axe repair.
// This allows us to check if we fixed the violations.
Expand Down
3 changes: 3 additions & 0 deletions runner/shared-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ export interface AttemptDetails {
/** LLM reasoning messages for generating these files. */
// Note: May not be set in older reports.
reasoning?: string;

/** Whether the build failed during an accessibility repair attempt. */
buildFailedDuringA11yRepair?: boolean;
}

/** Statistics related to the build process of the generated applications. */
Expand Down
Loading