derive-depth-cycle-guard

IN premise

`_get_depth` sets `memo[node_id] = 0` before recursing to prevent infinite recursion on cyclic justification chains; cycles resolve to depth 0

Summary

When the system calculates how deep a node sits in the justification chain, it protects itself from getting stuck in loops by temporarily assuming any node it is currently visiting has depth zero. This means circular dependency chains will not cause the system to hang or crash — they just bottom out at zero, letting the depth calculation complete gracefully.

Dependents

These beliefs depend on this one:

Details

Sourceentries/2026/04/23/reasons_lib-derive.md