Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
Fix empty decision_id handling: Ensure consistent UUID generation for boundary cases
KaifAhmad1ca3cd1ded55d
diff --git a/semantica/context/context_graph.py b/semantica/context/context_graph.pyindex d6ce8def..2eda4d3c 100644--- a/semantica/context/context_graph.py+++ b/semantica/context/context_graph.py@@ -944,8 +944,9 @@ class ContextGraph:"""from .decision_models import Decision- # Handle empty decision ID by generating UUID only if None (preserve empty string)- node_id = decision.decision_id if decision.decision_id is not None else str(uuid.uuid4())+ # Handle empty decision ID by generating UUID for both None and empty string+ # This ensures consistent behavior with Decision model's __post_init__ method+ node_id = decision.decision_id if decision.decision_id else str(uuid.uuid4())# Handle None metadatametadata = decision.metadata or {}