(actor ActorContext, key string, path string)
| 2741 | } |
| 2742 | |
| 2743 | func requireLifecycleIdempotency(actor ActorContext, key string, path string) error { |
| 2744 | if actor.Actor.Kind.Normalize() == ActorKindHuman { |
| 2745 | return nil |
| 2746 | } |
| 2747 | if strings.TrimSpace(key) == "" { |
| 2748 | return fmt.Errorf("%w: %s.idempotency_key is required for non-human actors", ErrValidation, path) |
| 2749 | } |
| 2750 | return nil |
| 2751 | } |
| 2752 | |
| 2753 | func (m *Service) validateParentConstraints(ctx context.Context, spec CreateTask) error { |
| 2754 | if strings.TrimSpace(spec.ParentTaskID) == "" { |
no test coverage detected