From 43e63b1c3f6641de6ddd2227337b4c9b1104ee11 Mon Sep 17 00:00:00 2001 From: safishamsi Date: Sun, 30 Aug 2026 15:16:49 +0100 Subject: [PATCH] fix(robot): namespace the external-library stub id to avoid keyword collision (#3192) A user keyword named like an imported library (e.g. a keyword 'SeleniumLibrary') would mint the same id as the library stub. Namespace the stub id under robot_library so the two cannot collide; the display label keeps the raw library name. --- graphify/extractors/robot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graphify/extractors/robot.py b/graphify/extractors/robot.py index 4ad9df3b0..c224c3a3b 100644 --- a/graphify/extractors/robot.py +++ b/graphify/extractors/robot.py @@ -211,7 +211,10 @@ def extract_robot(path: Path) -> dict: elif raw not in _ROBOT_STDLIBS: # External library (SeleniumLibrary, RequestsLibrary, ...) - # stub node so suites sharing a library cluster together. - nid = _make_id(raw) + # Namespace the id so a user keyword that happens to share the + # library's name cannot collide with this stub (the label keeps + # the raw library name for display). + nid = _make_id("robot_library", raw) add_node(nid, raw, node.lineno) add_edge(file_nid, nid, "imports", node.lineno)