{
  "handle": "Gate",
  "mechanism": "Evaluates the truth-value of the target {{condition}} and yields a {{decision}}: proceed if the condition holds, halt if not, or debt (proceed with obligation recorded) when configured. Unlike a silent filter, a Gate produces a first-class Decision artifact that downstream systems can route on. Whether a halt stops only the item or the enclosing flow is a descendant's choice.",
  "gloss": "Filter payload if the target condition is not met",
  "failure_modes": [
    "Silent Loss: Important data dropped without alerting the operator."
  ],
  "invariants": [
    "Idempotent: Re-evaluating the gate with the same context yields the same result (within validity window).",
    "Every evaluation yields a first-class {{decision}}, including a false one."
  ],
  "parameters": [
    {
      "name": "on_failure",
      "type": "Enum",
      "range": "{halt, debt}",
      "description": "What a false condition yields: halt, or debt where proceeding with a recorded obligation is configured. Both are {{decision}} values the mechanism names."
    }
  ],
  "_meta": {
    "tier": 1,
    "ring": 0,
    "supersedes": [
      "sema:Gate#mh:SHA-256:206dc9be76b20fcc7c96b06c6c9eb8ce243565d02ce064b4206caaa46871a96d",
      "sema:Gate#mh:SHA-256:bc636a863f99226e579fa58c6016053d5940510270fe7b4f3314a418408728e8"
    ],
    "path": [
      "Infrastructure",
      "Primitives"
    ]
  },
  "sema_id": "sema:Gate#mh:SHA-256:664dd801873a87e8aa3d67499e27e7c47923d5c0cdd129af6c09a7531ed7de15",
  "sema_ref": "Gate#664d",
  "sema_stub": "664d",
  "dependencies": {
    "references": {
      "condition": "sema:Condition#mh:SHA-256:b480f3c4da11ba6d86f6d14e0fb8521268f3c4bb38588460f7ff4253ad8d78d5"
    },
    "yields": {
      "decision": "sema:Decision#mh:SHA-256:b1407127acd4a39314fc24b418310e4b95e0347e4e22f376151ab765e2dfd2c7"
    }
  },
  "sema_layer": "Infrastructure",
  "sema_category": "Primitives",
  "used_by": {
    "references": {
      "Branch": "sema:Branch#mh:SHA-256:b4aa8694de2b0da0d33b87e2ad99d1d64741a8d67437ab400a829f566f2ce80d",
      "Check": "sema:Check#mh:SHA-256:6890b221c38531710528cd84bbf3a957e29d9836dfc9c02669fc0a86709bcb00",
      "ComputeBudget": "sema:ComputeBudget#mh:SHA-256:4091ac7c6677342920dc53808d02830e35c5849f2af1bb9ba7749c576d37478e",
      "DogfoodFirst": "sema:DogfoodFirst#mh:SHA-256:76eea0e77af92abe85e0dda7c20710ca3f9b2dd0e243f2f08c3468b6c1d96204",
      "TriGate": "sema:TriGate#mh:SHA-256:04a9a7cc17d29dab76ee781b7d7a3f557f68d528788da12620a320ce53d6b44c"
    },
    "composes_with": {
      "LayeredCheck": "sema:LayeredCheck#mh:SHA-256:6d7379c20e7b733e77ee96409251b53d8e06133944506d9f7443b13178a38042",
      "MintWhenFriction": "sema:MintWhenFriction#mh:SHA-256:727e0e935cdf1f807e543d3a0da374c3a496b4b819913347e2623058e51d5371",
      "PatternDiscovery": "sema:PatternDiscovery#mh:SHA-256:742a4d59a47458bf5ba632097b9cc410228dbedc941a561e7cfa70f2c63cd602",
      "PhasedRefinement": "sema:PhasedRefinement#mh:SHA-256:a263384b14c029d80cb3cc3c0b7a8a87b2c63f6307a55ac2c0f82ad2f86779e4",
      "Taper": "sema:Taper#mh:SHA-256:5a7557a60ba8e0a07cd7d75f43ceb3b125c411e6eddf5bee63039775eab9ba7a"
    }
  }
}
