28 lines
948 B
Python
28 lines
948 B
Python
|
|
"""Execution graph read model — critical_path / gate_fulfillment."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from typing import Any
|
||
|
|
|
||
|
|
from steering.eval_context import SteeringEvalContext
|
||
|
|
from steering.graph.execution_engine import compute_execution_graph_state
|
||
|
|
|
||
|
|
|
||
|
|
def compute_execution_graph_read_model(ctx: SteeringEvalContext) -> dict[str, Any]:
|
||
|
|
from services.execution_plan import list_dependencies_for_initiative
|
||
|
|
from steering.strategies.next_action.execution_ready import (
|
||
|
|
gate_horizon_scope_for_method,
|
||
|
|
)
|
||
|
|
|
||
|
|
gate_scope = gate_horizon_scope_for_method(
|
||
|
|
ctx.binding.primary_method_key, ctx.tenant_ctx, ctx.initiative_id
|
||
|
|
)
|
||
|
|
dependencies = list_dependencies_for_initiative(
|
||
|
|
tenant_id=ctx.tenant_ctx.tenant_id, initiative_id=ctx.initiative_id
|
||
|
|
)
|
||
|
|
return compute_execution_graph_state(
|
||
|
|
actions=ctx.actions,
|
||
|
|
dependencies=dependencies,
|
||
|
|
scope_roadmap_item_id=gate_scope,
|
||
|
|
)
|