anagrapheus.beliefs.index¶
anagrapheus.beliefs.index
¶
The belief index's query surface.
The one question the rest of the stack cannot answer: which beliefs mention this
entity? doxastica's BeliefFilter is closed over four fields and can filter by a
belief id, but nothing in its seam looks inside one; the identity layer knows entities
and has never heard of a belief. So the join between them lives here, and without it
identity's re-key seam has no other side.
This is a projection over what was minted, not over what is believed. A belief id in the index says an id was minted, never that anything currently holds a belief under it — that is doxastica's question, asked with the id this index hands back.
BeliefIndex
¶
Reads the belief index the fold maintains.
Source code in src/anagrapheus/beliefs/index.py
beliefs_for
¶
Every belief id naming entity_id, oldest first.
The re-key seam's input. A belief naming the entity twice — sibling(a, a),
say — appears once.
Source code in src/anagrapheus/beliefs/index.py
beliefs_of
¶
entities_of
¶
The entities belief_id names, in argument order, or () if unknown.
Empty rather than raising: the index is a fold over a range of the log, so an id it has not seen is an ordinary answer — the mint may be above the position, or in another application's namespace entirely.