MCPcopy Create free account
hub / github.com/compozy/agh / requireLifecycleIdempotency

Function requireLifecycleIdempotency

internal/task/manager.go:2743–2751  ·  view source on GitHub ↗
(actor ActorContext, key string, path string)

Source from the content-addressed store, hash-verified

2741}
2742
2743func 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
2753func (m *Service) validateParentConstraints(ctx context.Context, spec CreateTask) error {
2754 if strings.TrimSpace(spec.ParentTaskID) == "" {

Callers 3

EnqueueRunMethod · 0.85
ClaimRunMethod · 0.85
StartRunMethod · 0.85

Calls 1

NormalizeMethod · 0.45

Tested by

no test coverage detected