From 3dc621618f115644a9af65cb33c542f91e37441e Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 20 Jul 2026 12:55:58 -0300 Subject: [PATCH] fix(tools): eager-import scan_chunks and knowledge_sql at package load Every other built-in tool is imported here specifically to fire its @ToolRegistry.register() decorator at package-load time; these two were missing, so their test_registered tests only passed when some unrelated test (via agent_manager_routes.py, channels_cmd.py, or deep_research_setup_cmd.py) happened to import the module first in the same process. Under pytest-xdist that's worker-distribution dependent, so adding an unrelated test file could flip either test from pass to fail. --- src/openjarvis/tools/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openjarvis/tools/__init__.py b/src/openjarvis/tools/__init__.py index 80ff0cb3..41d8e1b4 100644 --- a/src/openjarvis/tools/__init__.py +++ b/src/openjarvis/tools/__init__.py @@ -142,4 +142,14 @@ try: except ImportError: pass +try: + import openjarvis.tools.scan_chunks # noqa: F401 +except ImportError: + pass + +try: + import openjarvis.tools.knowledge_sql # noqa: F401 +except ImportError: + pass + __all__ = ["BaseTool", "ToolExecutor", "ToolSpec"]