Skip to main content

Module rule_distribution

Module rule_distribution 

Source
Expand description

Cluster-wide GovernanceRule distribution (WEFT-146).

Replaces the assumption that every node holds an independent static Vec<GovernanceRule> with a versioned rule set that can be gossiped, merged after split-brain, and used for cross-node escalation when local policy denies.

§Wire shape

Peers exchange RuleGossipEnvelope messages (JSON over mesh IPC or any other transport). Merge is last-writer-wins on (rule_id, version) with a deterministic tie-break on updated_at_unix then origin_node.

§Escalation

When local evaluation returns Deny, callers may consult RuleDistribution::escalate which records an EscalationRecord and — if a peer is known to hold a higher version of a matching rule — returns EscalationOutcome::Forward.

Structs§

EscalationRecord
Audit trail entry for an escalation.
RuleDistribution
In-memory cluster rule store with merge + escalation.
RuleGossipEnvelope
Gossip payload carrying a full or partial rule set.
VersionedRule
Versioned wrapper around a GovernanceRule.

Enums§

EscalationOutcome
Outcome of a cross-node escalation attempt.