Expand description
Policy: what the runtime may do on its own.
Two parts:
Capabilities::unknown_plan, the rule that keeps the runtime from turning “I don’t know” into a duplicate side effect;RiskPolicy, which adds requirements by risk level and effect kind: approval, verification, no automatic retries.
Both are pure, so they can be tested exhaustively.
Structs§
- Capabilities
- The properties of an effect that decide how its unknown outcomes are resolved.
- Policy
Builder - Builds a
RiskPolicy: start a rule withfor_risk,for_kindorfor_risk_and_kind, then add requirements to it. - Requirements
- What a policy demands of an effect. Requirements only ever accumulate.
- Risk
Policy - Requirements by risk level and effect kind, applied to every effect the
runtime runs. Built with
PolicyBuilder; set withRuntimeBuilder::risk_policy.
Enums§
- Risk
Level - How much damage an effect could do if it went wrong. Set with
EffectBuilder::riskorEffectHandler::risk; defaults toLow. - Unknown
Plan - What to do with an effect whose last attempt has an unknown outcome.