Skip to main content

Module index

Module index 

Source
Expand description

The applicability index: the tree that turns a subject into an ordered list of candidate policies.

plan/policy.md: “The tree indexes; the list evaluates […] a write matching nothing has paid only for a walk it already owed.” Two independent trees are built per subject shape — one from each policy’s decision applicability, one from its observation surface — because a policy can be told about an attempt without being asked to decide it.

Structs§

ClientIndex 🔒
The index for a subject keyed on its client alone: a grant or a token.
CollectionTrie 🔒
One collection’s trie, plus the action and account-kind filters each entry was declared with. Both are indexed in parallel with a synthetic per-policy mask recorded at insertion — kept as side tables rather than inline in PathNode so the trie stays generic over “a policy matched here” and each filter test stays one lookup, not a scan.
PathNode 🔒
A trie over changed-path segments, as segments splits them.
PolicyTree
The built applicability index: every registered policy’s predicate, and the decision and observation trees to route a subject through.
PolicyTreeBuilder
Builds a PolicyTree from a set of evaluators and the policies that use them.
ShapeIndex 🔒
The pair of trees every subject is routed through: decision and observation.
Trees 🔒
One tree per subject shape.
WriteIndex 🔒
The write-subject index: collection, then changed path, then action.

Functions§

segments 🔒
Split one path into the segments this index routes on: . separates them, and an [index] subscript is a segment of its own rather than part of the field name it follows.