From aa6a1709e430326f78584278788bdcf46ea09d3a Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 30 Sep 2025 09:21:37 +0000 Subject: [PATCH] fix: capture all files in attempts Right now subsequent attempts only display the repaired files. This is good, but it makes it super hard to see the "final product" and is a bit confusing. We should go back to the original behavior where we display the full files on every displayed attempt. --- runner/orchestration/build-repair.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runner/orchestration/build-repair.ts b/runner/orchestration/build-repair.ts index f5f7eeb..0a44536 100644 --- a/runner/orchestration/build-repair.ts +++ b/runner/orchestration/build-repair.ts @@ -120,10 +120,12 @@ async function handleRepairResponse( progress ); + // Capture attempt's full files. Copy because `finalOutputFiles` can be + // mutated in subsequent repair attempts. + const attemptFullFiles = finalOutputFiles.map((f) => ({ ...f })); + return { - // Log the `outputFiles` from the repair response specifically, because - // we want a snapshot after the current API call, not the full file set. - outputFiles: repairResponse.outputFiles, + outputFiles: attemptFullFiles, usage: repairResponse.usage, reasoning: repairResponse.reasoning, buildResult,