From eb9f38b10252c643482b9ebd748a383ecbe7bebe Mon Sep 17 00:00:00 2001 From: Typer_Body Date: Fri, 8 May 2026 00:53:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B9=E5=B7=B2=E8=A2=AB=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E7=9A=84=E8=B7=AF=E7=94=B1=E8=A7=84=E5=88=99=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=9A=84=E3=80=82=E6=A0=B9=E6=8D=AE=20botmgr.py:74-10?= =?UTF-8?q?0=20=E4=B8=AD=E7=9A=84=E6=B3=A8=E9=87=8A=EF=BC=8C=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E8=A7=84=E5=88=99=E5=B7=B2=E8=A2=AB=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=EF=BC=8CBot=20=E7=8E=B0=E5=9C=A8=E7=9B=B4=E6=8E=A5=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=88=B0=20Pipeline=20=E6=88=96=20Workflow=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/langbot/pkg/api/http/service/workflow.py | 2 +- .../pkg/persistence/migrations/dbm026_workflow_tables.py | 2 +- src/langbot/pkg/workflow/executor.py | 5 +---- tests/unit_tests/platform/test_routing_rules.py | 9 +++++++++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/langbot/pkg/api/http/service/workflow.py b/src/langbot/pkg/api/http/service/workflow.py index 869f1c25..2fe66e18 100644 --- a/src/langbot/pkg/api/http/service/workflow.py +++ b/src/langbot/pkg/api/http/service/workflow.py @@ -4,7 +4,7 @@ from __future__ import annotations import asyncio import uuid from datetime import datetime, timedelta -from typing import Any, Optional +from typing import Optional import sqlalchemy diff --git a/src/langbot/pkg/persistence/migrations/dbm026_workflow_tables.py b/src/langbot/pkg/persistence/migrations/dbm026_workflow_tables.py index 65f82117..69443348 100644 --- a/src/langbot/pkg/persistence/migrations/dbm026_workflow_tables.py +++ b/src/langbot/pkg/persistence/migrations/dbm026_workflow_tables.py @@ -119,7 +119,7 @@ class DBMigrateWorkflowTables(migration.DBMigration): # Update bots table: add binding_type column (default to 'pipeline' for backward compatibility) # Check if column exists first (SQLite doesn't support IF NOT EXISTS for columns) try: - result = await self.ap.persistence_mgr.execute_async( + await self.ap.persistence_mgr.execute_async( sqlalchemy.text("SELECT binding_type FROM bots LIMIT 1") ) except Exception: diff --git a/src/langbot/pkg/workflow/executor.py b/src/langbot/pkg/workflow/executor.py index 9250c44d..70b14c74 100644 --- a/src/langbot/pkg/workflow/executor.py +++ b/src/langbot/pkg/workflow/executor.py @@ -1136,7 +1136,7 @@ class DebugWorkflowExecutor(WorkflowExecutor): node_state.inputs = inputs debug_state.add_log( 'debug', - f'Node inputs resolved', + 'Node inputs resolved', node_id=node.id, data={'inputs': self._safe_serialize(inputs)} ) @@ -1223,9 +1223,6 @@ class DebugWorkflowExecutor(WorkflowExecutor): return {'completed': True} # Execute single node - node_map = {node.id: node for node in workflow.nodes} - edge_map = self._build_edge_map(workflow.edges) - debug_state.current_node_id = next_node.id await self._execute_debug_node(next_node, context, debug_state, workflow.settings.max_retries) diff --git a/tests/unit_tests/platform/test_routing_rules.py b/tests/unit_tests/platform/test_routing_rules.py index 3928f6f1..ca56024b 100644 --- a/tests/unit_tests/platform/test_routing_rules.py +++ b/tests/unit_tests/platform/test_routing_rules.py @@ -1,10 +1,19 @@ """ RuntimeBot.resolve_pipeline_uuid and _match_operator unit tests + +NOTE: These tests are for the deprecated routing rules feature. +Routing rules have been removed in favor of direct Pipeline/Workflow binding. +These tests are kept for backward compatibility but are skipped. """ +import pytest from unittest.mock import Mock +# Mark all tests in this module as skipped since routing rules are deprecated +pytestmark = pytest.mark.skip(reason="Routing rules feature has been removed. Bots now directly bind to Pipeline/Workflow.") + + class TestMatchOperator: """Test the _match_operator static method."""