Keep detailed correction repair history in debug runs

This commit is contained in:
2026-11-11 12:31:08 +00:00
parent 6b724fd3cc
commit 04e0c2f913
6 changed files with 66 additions and 81 deletions

View File

@@ -99,7 +99,7 @@ func TestRepairBranchTerminalOutcomes(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if len(branches) != 1 || branches[0].Outcome != tc.outcome || len(client.calls) != tc.calls {
if len(branches) != 1 || branches[0].Outcome != tc.outcome || len(client.calls) != tc.calls || branches[0].AttemptCount != tc.calls || len(branches[0].Attempts) != 0 {
t.Fatalf("branches=%+v calls=%d", branches, len(client.calls))
}
if tc.calls == 2 && len(client.calls[1].Replay.Turns) != 2 {
@@ -192,7 +192,7 @@ func TestRepairInterruptionRetainsAttempt(t *testing.T) {
t.Fatal(err)
}
_, branches, err := repairCandidates(context.Background(), input, []int{1}, initial, "repair")
if !errors.Is(err, context.Canceled) || len(branches) != 1 || branches[0].Outcome != "interrupted" || len(branches[0].Attempts) != 1 {
if !errors.Is(err, context.Canceled) || len(branches) != 1 || branches[0].Outcome != "interrupted" || branches[0].AttemptCount != 1 || len(branches[0].Attempts) != 0 {
t.Fatalf("branches=%+v error=%v", branches, err)
}
}