Skip to content

Commit b38f458

Browse files
committed
refactor: check that Person is present. Other root-level nodes are optional
1 parent 6f4f25d commit b38f458

File tree

1 file changed

+6
-5
lines changed
  • bases/lif/semantic_search_mcp_server

1 file changed

+6
-5
lines changed

bases/lif/semantic_search_mcp_server/core.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@
5555
ALL_LEAVES.extend(root_leaves)
5656
logger.info(f"Loaded {len(root_leaves)} schema leaves for root '{root_node}'")
5757
except Exception as e:
58-
logger.warning(f"Failed to load schema leaves for root '{root_node}': {e}")
59-
60-
if not ALL_LEAVES:
61-
logger.critical("No schema leaves loaded from any root node")
62-
sys.exit(1)
58+
# Primary root (Person) is required; additional roots are optional
59+
if root_node == DEFAULT_ROOT_NODE:
60+
logger.critical(f"Failed to load schema leaves for required root '{root_node}': {e}")
61+
sys.exit(1)
62+
else:
63+
logger.warning(f"Failed to load schema leaves for optional root '{root_node}': {e}")
6364

6465
logger.info(f"Total schema leaves loaded: {len(ALL_LEAVES)}")
6566

0 commit comments

Comments
 (0)