Page
Data Model
Events
Events are the ground truth. Everything else in Myria is derived from them.
An event contains:
event_idGenerated by Myria on ingest.source_event_keyOptional caller-supplied idempotency key.event_seqMonotonic append order assigned by PostgreSQL.timestampEvent time supplied by the emitter.channelWhere the event came from.participantsImmutable visibility scope.context_idOptional emitter hint.payloadOpaque JSON body.topic_hintsZero or more weighted hints from the emitter.internalEffective stored visibility flag after ingest policy.
Trusted vs Provisional Fields
Trusted at ingest:
participantschanneltimestamppayload
Provisional at ingest:
context_idtypetopic_hints- most semantic labels supplied by the emitter
The emitter does not supply canonical topic IDs.
Visibility Model
Participants are the access model.
Query rule:
- a node or event is visible only if
query.participants ⊆ node.participants
Tree rule:
- scope can stay the same or narrow as the tree goes downward
- scope never widens in place
This is what allows immediate subtree pruning during reference walks.
Topics
Topics are the only logical partitions over events.
Important consequences:
- there is no session-partition abstraction
- task-like and concept-like material are both represented as topics
- emitter hints do not define canonical topic identity
TopicIndex Nodes
TopicIndex has two storage node types:
internal_topicleaf_topic
Rules:
- only leaf nodes carry direct event refs
- internal nodes route and summarize
- leaves normally contain at least two event refs when the eligible set permits it
- singleton leaves are allowed only when there is no valid merge alternative
Node Identity
node_id is content-addressed.
It is derived from a canonical SHA-256 identity body that excludes tree pointers and presentation text.
Included in the identity body:
node_type- sorted
participants - sorted direct
event_ids for leaf nodes - sorted descendant leaf
node_ids for internal nodes - schema version
Excluded from the identity body:
- parent pointers
- child pointers
- edge positions
- summaries
- traversal caches
Snapshots
A snapshot captures:
- one semantic forest
- one
event_seqcutoff - one published retrieval surface
Each snapshot has:
snapshot_idparent_idevent_max_seq- status/version fields
- creation time
The active snapshot is immutable for readers.
Topics Table
The topics table stores exact topic metadata used for observability and exact topic lookup. In the current implementation, topic IDs are derived from leaf node IDs.