pub async fn evaluate_effects(
effects: &[Effect],
bag: &mut AttributeBag,
pdp: &Arc<dyn PdpResolver>,
plugins: &Arc<dyn PluginInvoker>,
delegations: &Arc<dyn DelegationInvoker>,
phase: DispatchPhase,
payload: &mut RoutePayload,
) -> StepsEvaluationExpand description
Walk an Effect list against the bag, dispatching PDP calls via pdp
and plugin invocations via plugins. Returns the phase’s overall
decision.
Semantics (DSL §3, §7.5):
Effect::When— evaluate the condition; if true, run the body in order with the same first-deny-wins logic.Effect::Pdp— call resolver; on Allow runon_allowreactions and continue; on Deny runon_denyreactions and return the deny (reactions can override with their own deny, but cannot turn a deny into an allow).Effect::Plugin— invoke; Allow continues, Deny returns.Effect::Delegate— mint downstream credential; writesdelegation.granted.*keys back into the bag; deny-on-failure unless the step’son_erroroverrides.Effect::Taint— record the label; never halts.Effect::FieldOp— apply a pipe chain toargs.X/result.X; may setargs_modified/result_modified.Effect::Sequential— run children in order, halt on first Deny.Effect::Parallel— run children concurrently, abort on first Deny.Effect::Allow— explicit no-op; continues the phase.Effect::Deny— halt with the supplied reason/code.
PDP / plugin errors map to a Deny with the error in the reason, per
the design’s fail-closed default (DSL §8.9). Pre-E4 evaluate_steps
is preserved as a deprecated alias that forwards here.