PolicySnapshot
yosoi.policy.PolicySnapshot
class PolicySnapshot(ImmutableModel):
Deeply frozen Rust-validated authoring and resolved behavior.
Attributes: policy: Immutable authored declaration retained at preparation time. effective_policy: Immutable Current selections and concrete execution budgets resolved by Rust. identity: Versioned digest binding this snapshot to resolved behavior.
Source: python/yosoi/policy.py:1580
Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.
Fields and class attributes
Section titled “Fields and class attributes”policy: _SnapshotPolicy
effective_policy: _SnapshotEffectivePolicy
identity: PolicyIdentity
Methods
Section titled “Methods”from_policy
Section titled “from_policy”@classmethod
def from_policy(cls, policy: Policy) -> Self:
Freeze a validated authored declaration and its resolved behavior.
Args: policy: Editable complete declaration to validate and snapshot now.
Returns: A deeply frozen snapshot unaffected by later authoring or registry edits.
Raises: PolicyError: Complete declaration or Current selection resolution fails.