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

Function normalizeRunBootRecovery

internal/task/manager.go:2730–2741  ·  view source on GitHub ↗
(recovery RunBootRecovery)

Source from the content-addressed store, hash-verified

2728}
2729
2730func normalizeRunBootRecovery(recovery RunBootRecovery) (RunBootRecovery, error) {
2731 normalized := recovery
2732 normalized.Action = normalized.Action.Normalize()
2733 normalized.Reason = strings.TrimSpace(normalized.Reason)
2734 normalized.SessionState = strings.TrimSpace(normalized.SessionState)
2735 normalized.Classification = strings.TrimSpace(normalized.Classification)
2736 normalized.Detail = strings.TrimSpace(normalized.Detail)
2737 if err := normalized.Validate("run_boot_recovery"); err != nil {
2738 return RunBootRecovery{}, err
2739 }
2740 return normalized, nil
2741}
2742
2743func requireLifecycleIdempotency(actor ActorContext, key string, path string) error {
2744 if actor.Actor.Kind.Normalize() == ActorKindHuman {

Callers 1

RecoverRunOnBootMethod · 0.85

Calls 2

ValidateMethod · 0.65
NormalizeMethod · 0.45

Tested by

no test coverage detected