One node in the datamodel explorer tree (sui-t36.7): a <data>
declaration, a system variable, a provider function, a fixture scenario
value, or a runtime-only location - the ADR-0003 tiers, plus live mode's
:runtime sibling for a location session.datamodel never named.
Struct and types only - the way StatifierUI.EventLog.Round and
StatifierUI.EventInjection.Entry are - because both
StatifierUI.DatamodelExplorer.Scope (authoring and live alike) and
sui-t36.8's renderer share this one shape.
Summary
Types
Which of ADR-0003's tiers this entry belongs to. :data and :runtime
are both tier 1 - a document <data id> declaration and, in live mode
only, a location written at runtime that session.datamodel's snapshot
did not name (an <invoke idlocation> or an empty <finalize>
auto-assign). :system is tier 2a (spec 5.10.1's system variables),
:function is tier 2b (predicator provider functions in scope), and
:scenario is tier 3 - the one tier that switches source between modes.
Types
@type t() :: %StatifierUI.DatamodelExplorer.Entry{ arity: non_neg_integer() | [non_neg_integer()] | nil, changed?: boolean(), children: [t()], d_index: non_neg_integer() | nil, declared_source: String.t() | nil, label: String.t(), location_source: String.t() | nil, name: String.t(), shape: StatifierUI.Shape.t(), tier: tier(), value: term() }
value- always a decoded Elixir value, never a$-tagged wire term. This is the invariant that lets oneStatifierUI.Shape.infer/1pass serve both authoring and live mode.changed?- live-mode only; defaults tofalse. Authoring mode never sets it.arity- set on:functionentries only, predicator'snon_neg_integer() | [non_neg_integer()]multi-arity form verbatim.declared_source- the tier-1 declared expression text, display only. Present only when the pane was given the chart source andvalue_location != location(docs/wire-format.md:335-348).location_source-effect.datamodel_change's raw author string, live mode only, display only.
@type tier() :: :data | :system | :function | :scenario | :runtime
Which of ADR-0003's tiers this entry belongs to. :data and :runtime
are both tier 1 - a document <data id> declaration and, in live mode
only, a location written at runtime that session.datamodel's snapshot
did not name (an <invoke idlocation> or an empty <finalize>
auto-assign). :system is tier 2a (spec 5.10.1's system variables),
:function is tier 2b (predicator provider functions in scope), and
:scenario is tier 3 - the one tier that switches source between modes.