neofoam.framework.initialization.execution¶
Execution layer for the lazy-init framework.
Given a list of
InitStep
objects, this layer:
Validates the dependency graph (
validation).Topologically sorts the steps using the graph package’s sorter (
ordering).Executes each step in order, capturing results as
InitResult(executor).Routes each result into the appropriate slot of a
Contextvia aCategoryRouter(context_builder).
The public entry point is execute_initialization() — one call
that runs all four stages and returns the populated Context. For
finer-grained control, the package re-exports the individual
building blocks (execute_step(), execute_lazy_inits(),
validate(), CategoryRouter, InitResult,
InitializationGraphError).
The routing layer is open for extension: register a new category
handler with CategoryRouter.register() and pass the router to
execute_initialization() to dispatch unknown categories
without modifying framework code.