Commit module changes only after successful execution

This commit is contained in:
2026-11-16 14:42:24 +00:00
parent e2710d869e
commit 1c43264f6f
7 changed files with 388 additions and 191 deletions

View File

@@ -2,6 +2,7 @@ package runner
import (
"context"
"errors"
"fmt"
"slices"
@@ -278,6 +279,12 @@ func runRepairBranch(ctx context.Context, branchInput repairBranchInput) (repair
if coordinationErr != nil {
branch.Outcome = "interrupted"
result.approved = nil
var failure *ExecutionFailure
if !errors.As(coordinationErr, &failure) {
ref := failureReference(input.Spec, input.SectionIndex, outcomes.OperationCorrectionRepair)
ref.ProposalIndex = &original.ProposalIndex
coordinationErr = locateFailure(coordinationErr, "correction_repair", ref, input.SectionIndex != nil, result.operations)
}
} else if exhausted {
branch.Outcome = "exhausted"
}