Skip to content
YosoiDocs

FlowPolicy

yosoi.policy.FlowPolicy

class FlowPolicy(Model):

Independent fallback continuation for failures and cancellations.

Attributes: on_failure: Fallback for known step failures unless locally overridden. on_cancellation: Fallback for observed cancellation unless locally overridden. Unknown effects and unsafe state can force a hard stop.

Source: python/yosoi/policy.py:1106

Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.

on_failure: Continuation = Field(default_factory=Continue)
on_cancellation: Continuation = Field(default_factory=Continue)
def is_default(self) -> bool:

Return whether both fallbacks match Rust’s default Continue behavior.

Source: python/yosoi/policy.py:1118