InvariantFilter
Rule-based message filtering
Mechanism
A strict communication firewall that intercepts Messages (incoming or outgoing) and evaluates them against an explicit set of RuleSet (Invariants). If a Message satisfies all predicates, it is permitted to pass. If it fails even one, it is blocked, dropped, or flagged for review. This enforces 'Contractual Safety' on the communication channel. It inspects every Message via a rigorous Check against defined predicates before allowing transit.
Invariants
- Atomic Blocking: If Predicate(M) is False, M is NOT forwarded.
- Fail-Closed: If evaluation errors (e.g. timeout), default to BLOCK.
- Isolation: The protected agent state is not mutated by evaluation.
Parameters
- action_on_fail: type=Enum, range=[DROP, REJECT, FLAG], description=What happens when a message violates a predicate
Preconditions
Postconditions
- Only compliant messages reach the destination
- Blocked messages are logged (optional)
Failure modes
- Incomplete Invariants: If the filter does not catch a specific edge case, bad data leaks through.
- False Positives: Overly strict invariants blocking legitimate messages.
- Latency: Complex predicate evaluation slowing down high-throughput streams.
Where this came from
—
Builds on
Identity
- Ref:
InvariantFilter#06cd - Hash: sema:InvariantFilter#mh:SHA-256:06cd61a5aac3f903998318dd4f8f95b4c76c420a41d127dc32a646cb4c641160
- Library: bootstrap 0.11.0, root a6a3d1ff0f98
- License: Not stated; check the repository