Prepare shared reconciliation operations before evaluation migration
This commit is contained in:
@@ -68,11 +68,17 @@ func ExecuteOperation[T any](ctx context.Context, execution ExecutionContext[T],
|
||||
}
|
||||
switch prepared := operation.(type) {
|
||||
case contracts.DeterministicOperation[T]:
|
||||
if err := recordDomainEvidence(execution.Execution, "preparation-domain.json", prepared.Evidence); err != nil {
|
||||
return empty, err
|
||||
}
|
||||
return executeDeterministic(ctx, execution, prepared)
|
||||
case *contracts.DeterministicOperation[T]:
|
||||
if prepared == nil {
|
||||
return empty, errors.New("deterministic operation must not be nil")
|
||||
}
|
||||
if err := recordDomainEvidence(execution.Execution, "preparation-domain.json", prepared.Evidence); err != nil {
|
||||
return empty, err
|
||||
}
|
||||
return executeDeterministic(ctx, execution, *prepared)
|
||||
case contracts.PreparationLimit[T]:
|
||||
if err := recordDomainEvidence(execution.Execution, "preparation-domain.json", prepared.Evidence); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user