Skip to main content
uniac.NodeSpec is the internal base class that both Service and System extend. User code rarely references it directly, but the two hooks it provides are what makes the framework non-magical.

Methods

_uniac_validate()

Called once by load after construction. Walks every class-level annotation across the MRO; for each annotation typed as a Node subclass, asserts that the corresponding instance attribute is set and is the right type. Raises UniacValidationError on mismatch. Records the owner relationship on each owned Node.

_uniac_walk()

Yields the directly-owned Node instances in declaration order. The CLI uses this during uniac deploy to extract the topology.

Why this matters

There is no annotation auto-instantiation. The annotation says “this slot must hold a Node of type X”; your __init__ puts the value there. _uniac_validate enforces the contract loudly at startup so wiring bugs surface immediately instead of at first request.