{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "CausalBarrier",
 "ref": "CausalBarrier#cf54",
 "hash": "sema:CausalBarrier#mh:SHA-256:cf54b35c9236d8fd2db3ca4f35ab5bdaac79c17052d9095aaa5fa6f143507809",
 "stub": "cf54",
 "layer": "Physics",
 "type": "Time",
 "summary": "Enforcing strict event ordering",
 "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#c9c2 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#e127 state never violates causal consistency"
 ],
 "parameters": [
  {
   "name": "on_undeliverable",
   "type": "Enum",
   "range": "{block, drop, escalate}",
   "description": "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."
  },
  {
   "name": "party_count",
   "type": "Integer",
   "range": "[2, 100]",
   "description": "Participants tracked"
  },
  {
   "name": "timeout",
   "type": "Duration",
   "range": "[1s, 1h]",
   "description": "How long a message waits before on_undeliverable applies"
  }
 ],
 "signature": [],
 "preconditions": [],
 "postconditions": [],
 "failure_modes": [
  "Buffer overflow if dependencies never arrive."
 ],
 "domain": "",
 "caution": "",
 "sources": [],
 "name": "CausalBarrier",
 "builds_on": [
  {
   "alias": "state_lock",
   "relation": "references",
   "library": "bootstrap",
   "slug": "StateLock",
   "ref": "StateLock#c9c2",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/StateLock"
  },
  {
   "alias": "agent",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Agent",
   "ref": "Agent#e127",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Agent"
  }
 ],
 "related": [],
 "used_by": [
  {
   "slug": "TimeWarpLog",
   "relation": "references",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/TimeWarpLog"
  }
 ],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/CausalBarrier",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/CausalBarrier.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
