symfonic.core.nodes.context_injection¶
context_injection ¶
ContextInjectionNode — parallel context loader execution with collision detection.
Per ADR-PFX-005/013 and TDD §2.11: Runs all ContextLoaderRegistration entries concurrently via asyncio.gather. Detects state key collisions before merge.
Deprecated: ContextInjectionNode has been removed from the default pipeline. With zero loaders registered, it always returned {} and added overhead with no benefit. Hydration is now handled exclusively by SymfonicAgent._hydrate(). This module is retained for backward compatibility with consumers that register custom context loaders via graph._context_loaders.
ContextCollisionError ¶
Bases: ValueError
Raised when two context loaders write the same state key.
ContextLoaderRegistration
dataclass
¶
ContextLoaderRegistration(
loader: Callable[..., Any],
required: bool = False,
timeout_seconds: float = 5.0,
allow_collision_keys: set[str] = set(),
)
Registration entry for a context loader.
create_context_injection_node ¶
create_context_injection_node(
registrations: list[ContextLoaderRegistration],
) -> Callable[..., Any]
Factory for ContextInjectionNode.
.. deprecated::
create_context_injection_node is deprecated. ContextInjectionNode
has been removed from the default ReactLoopPreset pipeline. Hydration
is now handled exclusively by SymfonicAgent._hydrate().
This factory is retained for consumers that wire custom context loaders.