Physics · Time
CausalBarrier
Enforcing strict event ordering
Definition
Mechanism
A middleware layer that buffers incoming messages and releases them to the agent ONLY when all their causal dependencies are met. Guarantees the agent never sees an 'impossible' state. It maintains a StateLock on the event processing queue, releasing it only when all causal predecessors have been observed.
Invariants
- Causal Ordering: Event E cannot be processed until all Dependencies(E) are processed
- Events before barrier cannot affect events after.
- No Impossible States: Agent state never violates causal consistency
Risks
Failure modes
Buffer overflow if dependencies never arrive.
Relationships
Builds on
Used by
References
Infrastructure
Handling relativistic event ordering
Reference
Parameters
on_undeliverableEnum, {block, drop, escalate}- What happens to a buffered message whose dependencies never arrive. The barrier never releases it out of order — that would breach causal ordering — so the choice is how long to hold it and what to do instead.
party_countInteger, [2, 100]- Participants tracked
timeoutDuration, [1s, 1h]- How long a message waits before on_undeliverable applies
