Skip to main content

Module state

Module state 

Source
Expand description

STATE & DATA AUTHORITY (Ontology phase): deterministic attribution of state ownership per component from the fact layer.

Six subsections:

  • persistent: stores/data entities via WRITES edges (the existing component owns claims).
  • runtime: FIELD facts with mutable=true, STATE entities, REGISTRY entities.
  • reactive: REACTIVE entities (svelte/vue/react/mobx/signals state) via OWNS edges.
  • configuration: CONFIGURED_BY relationships (Configuration facts).
  • caches: WRITES/READS to cache-technology stores.
  • derived: PUBLISHES/SUBSCRIBES/CONSUMES topics + middleware/registry registrations.

Every line is COMPONENT <verb> TARGET (PROV)-style, deterministically sorted. Provenance is preserved verbatim from the underlying relationship — nothing is promoted.

Structs§

StateClaim
One structured state-ownership claim: component owns/reads/registers target (evidence provenance). verb is owns for write-derived ownership and reads for readers — atlas owns claims ignore reads so a reader is never promoted to owner. The structured bridge from the STATE & DATA AUTHORITY compiler into the atlas component owns claims.

Constants§

STATE_SECTIONS
Deterministic render order of the STATE & DATA AUTHORITY subsections.
S_CACHES
S_CONFIGURATION
S_DERIVED
S_PERSISTENT
S_REACTIVE
S_RUNTIME

Functions§

compile_state_authority
Attribute state ownership per component from the fact layer.
compile_state_claims
Emit per-component state claims over the same fact sets as compile_state_authority: WRITES to stores/caches, mutable FIELD / STATE / REGISTRY owners, CONFIGURED_BY configuration targets, topics (PUBLISHES/SUBSCRIBES/CONSUMES), and middleware/registry REGISTERS. Deterministic: sorted by (component, verb, target, provenance).
concept_occurrences
Live OCCURRENCE entities attached to a concept (OCCURS edges), sorted by id for determinism. Derived counts and provenance always come from these — concept count attributes are never stored or mutated at write time (Wave 13).
is_cache_store
Cache-technology store detection (store_refs with cache tech): an explicit technology hint or a cache-ish store name.
occurrence_count
Derived occurrence count of a concept — the count the schema/reactive compilers use (never a stored counter). Purge naturally lowers it.
occurrence_producer
Most frequent occurrence owner name of a concept (deterministic tie-break: lexicographic smallest), or None when the concept has no occurrences. The atlas schema producer — an owner symbol, never the concept/expr itself.
section_label
Human-readable subsection header for a section key.
state_authority_groups
Groups of symbol ids that SHARE state authority: distinct symbols writing the same store (data entities resolve to their owning store, so db.users and db.orders count as one target), read by the same CONFIGURED_BY configuration target, or owning the same REACTIVE state entity (Wave 11 — symbols mutating the same reactive state cohere). This is the shared-state-authority signal for the semantic clustering graph (+4 per pair inside a group).