43 — The local domain
BuiltRendered from 43-local-domain-log.md in the public repository. Edits belong there.
Every sandbox has a local domain (lcl_domain): its own node id space, stored as one document that both defines each node and records what it names.
Base structure
Every local domain starts with the same tree. Readers find each branch by its label, not its address, because insert_node can re-key any address.
1 local_domain
1-1 meta
1-1-1 glyphs 1-1-1-n a drawing (the eleven canonical glyphs, circle first)
1-1-2 documents 1-1-2-n a slot naming a datum document
1-1-2-1 anchor reserved
1-1-2-2 local_domain reserved
1-1-3 sources 1-1-3-n a pin: <msn>.<name> and a content hash
1-1-4 artifacts 1-1-4-k a kind: image, record, video, memo
1-1-4-k-n an artifact slot, under its kind
1-2 classes 1-2-1 archetypes, 1-2-2 datum_types, 1-2-3 events
1-3 objects the instance's own tree, free-form below hereThere is one root. A new top-level branch is filed under objects.
| Concern | Code |
|---|---|
| Labels, branches, kinds, glyph choices | micyte/core/datum_ops/local_domain.py |
| Seed rows for a new sandbox | seeded_local_domain_rows and seeded_anchor_rows in micyte/core/instance_baseline.py |
| Provisioning, called by every creator of a sandbox | local_domain_provision_runtime.py in the host application |
Row shapes
The value group of a datum address is its tuple count, so a row's shape follows from its address:
| Address | Row | Meaning |
|---|---|---|
4-3-N | [addr, lcl_id, <node>, title, <bits>, lcl_id, <glyph>] | A node with its glyph. The minimum written |
4-4-N | … lcl_id, <glyph>, lcl_id, <slot>] | A node that also refers to one thing |
4-4-N | … lcl_id, <glyph>, mss_source_binary, <hash>] | A source pin |
4-2-N | [addr, lcl_id, <node>, title, <bits>] | A node without a glyph. Read, not written while a glyph branch exists |
The fourth cell of a 4-4 row is the one thing the node refers to: a document slot, an artifact slot or a source pin. The branch the slot is under says which.
Writers keep every node at 4-3 or above: LclBuilder._add_row defaults the glyph to circle, set_node_icon will not remove a glyph, a created document's slot gets document, and an inserted group gets the default. A tree with no glyph branch keeps writing 4-2.
A title is one title babelette: at most 64 printable ASCII characters.
One definition row per node
A node has one definition row. Attaching a document moves the row from 4-3 to 4-4; detaching moves it back. NameIndex resolves a node by its first row in document order, so a second row would make its label depend on row order.
The anchor matches the tree
The anchor's lcl-SAMRAS magnitude encodes the set of nodes in the tree. A copied anchor keeps the source sandbox's magnitude, so the seed recompiles it and every editing verb recompiles it after writing. A node the magnitude contains but the log does not define is drawn as (undefined); check_denotation reports the mismatch.
References
A node that refers to a document names a slot, and the document is reachable at that slot. A source pin names a document in another instance (<msn>.<name>) and its version hash; the sources resolver reports fresh, stale, missing or unverifiable (micyte/core/sources.py). A stale pin is a fault; missing and unverifiable are reported, not gated.
The convention is a document
The base structure is also stated by the archetype library's own lcl_domain tree, and the seed reads it from there. micyte/core/datum_ops/local_domain_convention.py reads a tree into a Convention: branch labels, structural glyphs, canonical glyph titles, artifact and class kinds, and the class vocabularies it seeds (project_roles, project_facts; 44). The code's constants are the fallback for a store with no library; a test requires disagreements(stated, expected) to be empty.
The convention surface opens the library's tree in the Domain editor (set_node_icon, rename_node, move_node, insert_node) with a viewscope beside it.
Every tree pins the library's lcl_domain in its sources branch. The host's health report carries convention: fresh, stale(n) or library_disagrees(n). apply_convention adds the kinds and vocabulary a tree lacks, re-applies the structural glyphs, and moves the pin, in one write; it removes and renames nothing.
Trees in the older shape
read_log reads only the base structure. A tree without a local_domain root has no log to it, and every verb refuses it by name. The older shape (a root labelled documents with icons and documents beneath) is read only by migrate_local_domain_base._read_legacy_log, which converts it.