uniac.load is the single runtime entrypoint. It takes a Service or System class, constructs an instance, validates that every annotated Node is set, and hydrates each Node’s .url from the deploy-time wiring.
Signature
- Input — a
ServiceorSystemclass (not an instance). Passing an instance raisesTypeError. - Output — a typed instance, with every
Nodehydrated.
What it does, in order
- Read
UNIAC_INIT_*env vars. For each__init__parameter, look forUNIAC_INIT_<UPPERCASE_NAME>. Coerce the string value to the parameter’s annotated type. Missing param + has default → use the default; missing param + no default → raiseLoadError. - Construct —
cls(**init_kwargs). - Validate — calls
_uniac_validate()on the result (seeNodeSpec). - Hydrate Nodes — reads
UNIAC_DEPS_JSONand writes each Node’s_uniac_url.
Supported init-parameter types
str, int, float, bool. Any other annotation, or a parameter with no annotation, raises LoadError.
Bool coercion is case-insensitive: "true" | "1" | "yes" | "on" are truthy; anything else is false.
Raises
| Exception | When |
|---|---|
LoadError | Required env var missing; unsupported init type; bad value. |
UniacValidationError | Annotated Node slot unset or wrong type. |
TypeError | spec_cls is not a class, or not a NodeSpec subclass. |

