Expand description
Human approval before an effect runs.
An effect that requires approval
(EffectBuilder::require_approval,
EffectHandler::requires_approval)
goes Pending → AwaitingApproval before its first attempt. The record is
durable, so a pending approval survives restarts. Decisions come from two
places:
- the runtime’s
ApprovalProvider, asked when the effect needs a decision and again on every later call while none has been made. It may answer at once (a CLI prompt), or returnApprovalDecision::Deferredand let the decision arrive later (Slack, a dashboard); - an operator, through
Runtime::approveorRuntime::deny.
Approval is asked once: an approved effect is never asked again, even if it retries. The precondition is checked again after approval, since the decision may have taken a while.
Structs§
- Approval
Request - What an approver is asked to decide.
- CliApproval
- Asks at the terminal: prints the request and reads
yorn.
Enums§
- Approval
Decision - An approver’s answer.
Traits§
- Approval
Provider - Decides whether effects that require approval may run.