-
feat: ChainRule condition steps — rule-based final hops for chains
released this
2026-08-03 19:00:16 +00:00 | 6 commits to master since this releaseA chain step of the form { rule: , conditionStep: true } is a
condition-gated hop instead of an edge traversal. It is valid only as the
FINAL step: the object is known, so the engine verifies the referenced rule
at (intermediate, object) for each current path. Enables a chain's object-side
hop to reference a defeasible/logical evidence (e.g.
member_of(user,*g){ gated(g,doc) } where gated is WHEN/UNLESS).- RuleEvaluator wires the ChainRule with itself so condition steps can
evaluate sub-rules recursively. - ChainRule constructor accepts the ruleEvaluator; the traversal loop handles
a final condition step (min-combined possibility, reliability product,
threshold respect). Non-final condition steps return condition_step_not_final. - The rule config is part of the chain cache key (JSON.stringify of steps).
Tests: chain-condition-step (grant/deny/missing-edge/non-final/parallel-max).
Downloads
- RuleEvaluator wires the ChainRule with itself so condition steps can