Skip to main content

checkGuards()

checkGuards(graph, config?): readonly GuardViolation[]

Defined in: guards.ts:89

Check an execution graph for guard violations.

This is a pure function that analyzes a graph snapshot and returns detected violations without modifying the graph or producing side effects.

Parameters

ParameterTypeDescription
graphExecutionGraphThe execution graph to analyze.
config?GuardConfigOptional guard configuration.

Returns

readonly GuardViolation[]

Array of detected violations (may be empty).

Example

const violations = checkGuards(graph, { maxDepth: 5 });
if (violations.length > 0) {
console.log(`Found ${violations.length} violations`);
}