Portal Community

What Guard Rails Do

Guard rails enforce cross-cutting constraints that should not live inside individual executors:

Engine Discovery

All IGuardRail implementations are discovered by the IGuardRailsExecutor at startup. The executor receives the collection of registered guards via DI and runs them in phase order (Pre → executor → Post). Guards declare which phase(s) they participate in via SupportedPhases.

Built-In Guards

GuardPhaseWhat It Does
RateLimitingGuardPreLimits requests per second per scope (global/tenant/user)
InputValidationGuardPreValidates required input fields against a schema
TimeoutGuardPre + PostTracks execution time and blocks if timeout exceeded
PiiDetectionGuardPostScans output data for PII patterns (email, credit card, etc.)
CircuitBreakerGuardPreOpens circuit after consecutive failures, blocks until cooldown

Fail-Open Design

The guard infrastructure is designed to fail-open: if a guard throws an unexpected exception, the executor logs a warning but continues execution. This prevents a misconfigured or buggy guard from blocking all workflow executions. Only explicit GuardRailCheckResult.Blocked results stop execution.

Guard Rails vs Executor Logic Do not implement rate limiting, quota checks, or content policy inside executors. These concerns are orthogonal to the node's primary function and should be configured per-node via guard rail settings in Atlas Forms (IDs 13000–13007). This keeps executor code focused and testable.