Reuse prepared execution snapshot ownership

This commit is contained in:
2026-10-09 01:08:46 +00:00
parent b7b4000aab
commit 80aecb646d
4 changed files with 200 additions and 7 deletions

View File

@@ -50,10 +50,12 @@ func (r *Runner) PrepareExecution(ctx context.Context, req domain.RunRequest) (*
return nil, err
}
executionSnapshot, err := clonePreparedRun(operation.run)
executionSnapshot := operation.run
extraParams, err := jsonvalue.CopyMap(executionSnapshot.EffectiveModelParams.ExtraParams)
if err != nil {
return nil, fmt.Errorf("%w: failed to copy prepared execution: %v", ErrInvalidRequest, err)
}
executionSnapshot.EffectiveModelParams.ExtraParams = extraParams
details, err := clonePreparedRun(executionSnapshot)
if err != nil {