fix(pipeline): use action_type-derived phase order in ontology generator
LLM merge_key phases (e.g. "submission") don't always match PHASE_ORDER keys. Derive phase order from action_type via get_phase_order() instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ logger = logging.getLogger(__name__)
|
|||||||
# PHASE ORDERING (imported from ontology)
|
# PHASE ORDERING (imported from ontology)
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
from services.control_ontology import PHASE_ORDER
|
from services.control_ontology import PHASE_ORDER, get_phase, get_phase_order
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
@@ -142,7 +142,8 @@ def generate_ontology_dependencies(controls: list[dict]) -> list[Dependency]:
|
|||||||
obj = parsed["normalized_object"]
|
obj = parsed["normalized_object"]
|
||||||
if obj:
|
if obj:
|
||||||
ctrl["_parsed_mk"] = parsed
|
ctrl["_parsed_mk"] = parsed
|
||||||
ctrl["_phase_order"] = PHASE_ORDER.get(parsed["phase"], 6)
|
# Use action_type to derive phase order (more reliable than LLM phase name)
|
||||||
|
ctrl["_phase_order"] = get_phase_order(parsed["action_type"])
|
||||||
groups[obj].append(ctrl)
|
groups[obj].append(ctrl)
|
||||||
|
|
||||||
dependencies: list[Dependency] = []
|
dependencies: list[Dependency] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user