mud_server.services.policy.activation

Layer 3 activation service logic.

This module owns activation pointer mutation, replay consistency checks, and scope overlay resolution used by runtime callers.

Functions

set_policy_activation(*, scope, policy_id, variant, ...)

Set one activation pointer for a scope and record audit history.

list_policy_activations(*, scope)

List active pointers for exactly one activation scope.

resolve_effective_policy_activations(*, scope)

Resolve effective scope activations with client-over-world overlay semantics.

get_effective_policy_variant(*, scope, policy_id)

Return effective active policy variant for one scope + policy id.

assert_activation_replay_consistency(*, scope)

Assert pointer table equals replayed activation-event history.

Module Contents

mud_server.services.policy.activation.set_policy_activation(*, scope, policy_id, variant, activated_by, rollback_of_activation_id=None)[source]

Set one activation pointer for a scope and record audit history.

When rollback_of_activation_id is provided, the target variant is read from that event after strict scope and policy-id checks.

mud_server.services.policy.activation.list_policy_activations(*, scope)[source]

List active pointers for exactly one activation scope.

mud_server.services.policy.activation.resolve_effective_policy_activations(*, scope)[source]

Resolve effective scope activations with client-over-world overlay semantics.

mud_server.services.policy.activation.get_effective_policy_variant(*, scope, policy_id)[source]

Return effective active policy variant for one scope + policy id.

mud_server.services.policy.activation.assert_activation_replay_consistency(*, scope)[source]

Assert pointer table equals replayed activation-event history.

This protects the core auditability invariant of Layer 3.