checkGuards()
checkGuards(
graph,config?): readonlyGuardViolation[]
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
| Parameter | Type | Description |
|---|---|---|
graph | ExecutionGraph | The execution graph to analyze. |
config? | GuardConfig | Optional 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`);
}