Commit module changes only after successful execution
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user