---
library: "bootstrap"
slug: "Gate"
name: "Gate"
ref: "Gate#664d"
hash: "sema:Gate#mh:SHA-256:664dd801873a87e8aa3d67499e27e7c47923d5c0cdd129af6c09a7531ed7de15"
type: "Primitives"
layer: "Infrastructure"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/Gate"
---

# Gate

Filter payload if the target condition is not met

Infrastructure · Primitives

## Mechanism

Evaluates the truth-value of the target [Condition](https://semahash.org/vocabularies/bootstrap/patterns/Condition.md) and yields a [Decision](https://semahash.org/vocabularies/bootstrap/patterns/Decision.md): 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.

## Invariants

- Idempotent: Re-evaluating the gate with the same context yields the same result (within validity window).
- Every evaluation yields a first-class [Decision](https://semahash.org/vocabularies/bootstrap/patterns/Decision.md), including a false one.

## Parameters

- 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](https://semahash.org/vocabularies/bootstrap/patterns/Decision.md) values the mechanism names.

## Failure modes

- Silent Loss: Important data dropped without alerting the operator.

## Where this came from

—

## Builds on

- [Decision](https://semahash.org/vocabularies/bootstrap/patterns/Decision.md) (yields)
- [Condition](https://semahash.org/vocabularies/bootstrap/patterns/Condition.md) (references)

## Used by

- [Branch](https://semahash.org/vocabularies/bootstrap/patterns/Branch.md) (references)
- [Check](https://semahash.org/vocabularies/bootstrap/patterns/Check.md) (references)
- [ComputeBudget](https://semahash.org/vocabularies/bootstrap/patterns/ComputeBudget.md) (references)
- [DogfoodFirst](https://semahash.org/vocabularies/bootstrap/patterns/DogfoodFirst.md) (references)
- [LayeredCheck](https://semahash.org/vocabularies/bootstrap/patterns/LayeredCheck.md) (composes_with)
- [MintWhenFriction](https://semahash.org/vocabularies/bootstrap/patterns/MintWhenFriction.md) (composes_with)
- [PatternDiscovery](https://semahash.org/vocabularies/bootstrap/patterns/PatternDiscovery.md) (composes_with)
- [PhasedRefinement](https://semahash.org/vocabularies/bootstrap/patterns/PhasedRefinement.md) (composes_with)
- [Taper](https://semahash.org/vocabularies/bootstrap/patterns/Taper.md) (composes_with)
- [TriGate](https://semahash.org/vocabularies/bootstrap/patterns/TriGate.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: Gate#664d
- Hash: sema:Gate#mh:SHA-256:664dd801873a87e8aa3d67499e27e7c47923d5c0cdd129af6c09a7531ed7de15

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/Gate
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/Gate.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
