objectstate.live_context_resolver
Live context resolution service for configuration framework.
Provides cached resolution of config attributes using live values, avoiding redundant context building and resolution operations.
This service is completely generic and UI-agnostic: - No knowledge of ParameterFormManager or any UI components - No knowledge of steps, orchestrators, or domain concepts - Only knows about dataclasses, context stacks, and attribute resolution - Caller is responsible for providing live context data
Classes
Pure service for resolving config attributes with live values. |
- class objectstate.live_context_resolver.LiveContextResolver[source]
Pure service for resolving config attributes with live values.
Caches resolved config values to avoid expensive context stack building + resolution. Token-based invalidation ensures cache coherency.
Completely generic - works with any dataclasses and any context hierarchy. UI layer is responsible for: - Collecting live context from form managers - Providing the current token - Building the context stack
- resolve_config_attr(config_obj: object, attr_name: str, context_stack: list, live_context: Dict[Type, Dict[str, Any]], cache_token: int) Any[source]
Resolve config attribute through context hierarchy with caching.
Completely generic - no knowledge of UI, steps, orchestrators, or domain concepts.
- Parameters:
config_obj – Config dataclass instance to resolve attribute from
attr_name – Attribute name to resolve (e.g., ‘enabled’)
context_stack – List of context objects to resolve through (e.g., [global_config, pipeline_config, step])
live_context – Live values from form managers, keyed by type
cache_token – Current cache token for invalidation
- Returns:
Resolved attribute value