Cascade
PartialThe cascade lets an operator set a value once, high up, have it apply to everything below, shadow it on any one entity, and then see exactly why a given value won. It resolves variables, secrets and tags today; the same primitive resolves settings along the user axis instead of the fleet.
The structural chain
Section titled “The structural chain”A value is a binding: a cell owned at one rung of the fleet on the exclusive arc (core entities). Resolution runs for a component over its containment path, least specific first, and the most specific binding wins:
band 0 platform the install-wide bindingband 1 location tree campus -> building -> floor -> room (deepest wins)band 2 system tree hall -> room subsystem (deepest wins)band 3 component tree chassis -> card (deepest wins, the leaf)platformis a rung, not a floor. It is an admin’s decision for the whole install, written only with the install-wideplatform:<action>permission on top of the resource’s own (ADR-0057).- There is no root location. The location tree is a forest of tops, so a binding at one campus
misses the next, and a top added next quarter starts uncovered. “Everything” is
platform. - Within a band, depth decides: the nearest binding up the tree wins, weight-free.
- Secrets have no system band. A credential authenticates a session with the device itself, and the room a shared device serves is the wrong owner for it.
The precedence is a lexicographic key, (band, depth) today, compared field by field, so however
deep a tree runs it never overruns into another band.
Structural multi-membership (a component in N systems)
Section titled “Structural multi-membership (a component in N systems)”A component can be a member of several systems
(membership), but the chain it
resolves over is single-valued: two seeds in one band would leave the fold with no tiebreak. So the
resolution takes the system to resolve against. Given one, it resolves through that system, and
only if the component is a member. Given none, it seeds from the component’s primary membership,
which is all is_primary is for. GET /components/{name}/effective-tags?system=<ref> takes a system
today; the variable and secret reads resolve against the primary.
Combinators
Section titled “Combinators”What is resolved decides how bindings combine:
- Variables and secrets: scalar shadow. One value per name; the most specific binding wins.
- Tags: union on key, shadow on value. Keys accumulate down the chain; for each key the most specific binding’s value wins (tags).
Bindings cascade; declarations do not
Section titled “Bindings cascade; declarations do not”Two structures sit side by side, and only one is the cascade. The binding side is every rung above: something somebody decided, ordered by how specific the deployment is. The declaration side is what a thing is absent any decision: a default, a column on a definition row. A default is not a rung. It shadows nothing and nothing shadows it; the cascade falls through to it when no rung bound anything. “An admin chose this for everything” and “nobody chose, so the type’s declaration stands” are different facts.
A default lives on a definition row, so a kind with no definition table has none:
| Kind | Where its default is declared |
|---|---|
| setting | The default: tag on its field of the Settings struct |
| property | The classifier contract’s default_value (product_property and its siblings), read by EffectiveProperties |
| variable, secret, tag | None |
A property type carries a name, data type and validation, but no value: a default is what a thing is under a contract, and the contract is the classifier’s.
The resolve view
Section titled “The resolve view”For a component and a key, the resolve view returns the effective value, the winning binding (its
owner, band and depth), and the ordered bindings it shadowed. Each of
GET /components/{name}/effective-variables, .../effective-secrets and .../effective-tags
returns that list, every entry marked winner or shadowed, and the console draws it as the
ResolutionPanel on the component’s detail. A secret’s entries are masked like every other secret
read. To use it, see variables and secrets.
A worked example
Section titled “A worked example”Codec RM204 sits in Room RM204, on Floor 3 of the HQ Building on the HQ Campus, and is a member of the Huddle Room system.
RM204: precedence, most specific wins=================================================================== band depth binding owner poll-interval credential ---- ----- ---------------------------- ------------- ---------- 3 0 component RM204 - - 2 0 system Huddle Room 30s - 1 0 location Room RM204 - - 1 1 location Floor 3 - vault-b 1 3 location HQ Campus (a top) - vault-a 0 - platform 60s vault-z=================================================================== effective: poll-interval = 30s (system; shadowed platform 60s) credential = vault-b (Floor 3; shadowed HQ Campus, platform)The credential binding at HQ Campus covers HQ and nothing else; East Campus and the Service Depot
(a building at the top, with rooms straight off it) are covered only by the platform binding. The
dev seed a lab starts with carries four such tops, so the rule is inspectable.