Skip to main content

Module engine

Module engine 

Source
Expand description

evaluate — the pure conviction engine (§1, §3.2, §5).

Signals in, report out. No I/O, no keys, no capability checks, no clock: the caller passes now. Two clients holding the same inputs reach byte-identical conclusions, which is the whole reason the engine convicts and never sentences.

Structs§

LoadedPolicy
A policy plus the hash of the exact bytes it arrived as. The hash is never recomputed from a re-serialization — a client that re-encodes JSON has changed the policy.
MemberSignal
What the caller knows about one member before any judgement.
MessageSignal
One message in the evaluation corpus.
Signals
Everything evaluate reads. The caller owns fetching, decryption and the clock; the engine owns only arithmetic.

Enums§

EvalMode
Who is evaluating. A member’s client runs only stateless rules — word and link filters over the message in front of it — because everything else needs history it may not hold and authority it does not have. Admins and moderation bots run everything.

Functions§

evaluate
Evaluate every policy against the signals. Pure: same inputs, same bytes.
evaluate_as
evaluate with an explicit evaluator role.
merged_exempt
Union of a policy-level and rule-level exemption block.
refusing_rules
Which rules a policy would refuse a send under (cooperative prevention). Only Deterministic rules reach here — the validator already refused the rest.