Skip to main content

Module multi_root

Module multi_root 

Source
Expand description

Multi-root cloud config — union sibling .X/ config trees (W206 layout (b)).

Part of R558-F4; the ticket annotation lives in .yah/docs/working/W206-yubaba-namespace-tenancy-axes.md.

Today a yubaba reconciler reads exactly one config tree (.yah/, via CloudConfig::load). W206 adds a second consumer (noisetable) that keeps its declarations in its own repo, materialized as a sibling .noisetable/ tree next to .yah/. Rather than annotate every TOML with a namespace (layout (a)), the recommended layout (b) gives each project its own config root and teaches the reconciler to union the roots.

This module is that union layer:

  • ConfigRoot — one .X/ directory plus the (tenant, namespace) every workload it declares belongs to. Namespace defaults to the directory name with the leading dot stripped (.noisetable → noisetable); a <dir>/namespace.toml marker can set the tenant and override the namespace. This is the per-directory invariant from W206’s open questions: one namespace per root, no per-file override.
  • MultiRootConfig — the loaded, validated union. Loading rejects two roots that claim the same (tenant, namespace) and validates that (tenant, namespace, name) is unique across every workload/service in the union (the safety net that makes friendly co-residence collision-proof).
  • discover — auto-find sibling .X/ roots under a parent directory.

Structs§

ConfigRoot
One config root and the (tenant, namespace) identity every workload it declares belongs to. See the module docs for the per-directory invariant this enforces.
LoadedRoot
A single loaded root: its (tenant, namespace) identity plus the CloudConfig read from its tree.
MultiRootConfig
The loaded, validated union of sibling .X/ config trees.

Functions§

discover
Auto-discover sibling .X/ config roots under parent.