Nordhavn / specs / nordhavn-site / atlas / Stack

nordhavn-site / atlasdata

Stack

Purpose

One published tree whole — a stack of layers, floor to top, under one name. A stack is what a project's drafts describe together: convene's stack carries its core, mix, surface, host, and app layers; this site's stack carries the atlas. The stack is the widest ground a mention can resolve against — a name spoken in one layer may reach a draft in another, because the layers of a stack share their vocabulary the way the book's team shares theirs. Layers keep their own names: two layers going by the same name would make "which mix?" unanswerable, so the stack refuses them.

Attributes

Invariants

Operations

bearing

Reports every Layer holding a draft that bears a given name Text, in the stack's order — empty when no layer does. Result: the Layers holding a draft bearing the name, in the stack's order — empty when none do

Scenarios

A stack holds its root and its layers

Given: a root Draft named "convene", a Layer named "core" holding a Draft named "Seal", and a Layer named "mix" holding a Draft named "Cell" When: a Stack named "convene" is created with them, core then mix Then: it is accepted, its root is the draft named "convene", and it holds "core" then "mix", in that order

Bearing finds every layer that speaks the name

Given: a Stack named "convene" holding a Layer "core" with a Draft named "Seal" and a Layer "mix" with a Draft named "Cell" When: bearing is performed with "Cell" Then: exactly the layer "mix" is reported

A name nobody bears reaches no layer

Given: a Stack named "convene" holding a Layer "core" with a Draft named "Seal" When: bearing is performed with "Tumbler" Then: no layers are reported

spoken of by