Review Workflows
AIF can require human review before a provider or tool performs a side effect. A review pause is an execution outcome, not a UI-only flag.
Review Guarantees
- The pending operation and a canonical request hash are persisted.
- Provider and tool execution stop before the side effect.
- The audit trail records the review-required outcome.
- Approval or rejection is recorded with reviewer evidence.
- Resumption must match the original workspace, operation, and request hash.
- An approval is consumed once, preventing replay.
ReviewWorkflowService manages decisions and AifGateway validates approval when a governed operation resumes. Production deployments should use a persistent ReviewWorkflowRepositoryInterface implementation such as the RAD PDO review repository.
Host Application Responsibilities
The host application authenticates the reviewer, resolves permissions, and presents the pending request safely. The approval action should send the review UID and decision to a backend handler; it should not reconstruct or alter the original operation in the browser.
Review States
| State | Meaning |
|---|---|
| pending | Execution is paused and awaiting an authorized decision. |
| approved | The bound request may resume once. |
| rejected | Execution remains blocked. |
| expired | The review window closed before a decision. |
| cancelled | The host cancelled the pending operation. |
| consumed | A prior approval has already been used. |
See UIF Admin Contract for the presentation boundary.