diff --git a/src/langbot/pkg/api/http/controller/main.py b/src/langbot/pkg/api/http/controller/main.py index b4718443f..e19552c65 100644 --- a/src/langbot/pkg/api/http/controller/main.py +++ b/src/langbot/pkg/api/http/controller/main.py @@ -1,6 +1,7 @@ from __future__ import annotations import asyncio +import importlib import os import typing @@ -20,12 +21,6 @@ from .groups import knowledge as groups_knowledge from .groups import resources as groups_resources from ...mcp.mount import MCPMount -# The traceability subsystem is self-contained and auto-registers its routes -# through ``group.group_class``. Importing it here (instead of from within the -# ``groups`` package) keeps the feature decoupled: the Core controller package -# contains no code that depends on it, only this single bootstrap import. -from ....operation_trace import routes as _operation_trace_routes # noqa: F401 - importutil.import_modules_in_pkg(groups) importutil.import_modules_in_pkg(groups_provider) importutil.import_modules_in_pkg(groups_platform) @@ -33,6 +28,13 @@ importutil.import_modules_in_pkg(groups_pipelines) importutil.import_modules_in_pkg(groups_knowledge) importutil.import_modules_in_pkg(groups_resources) +# The traceability subsystem is self-contained and auto-registers its routes +# through ``group.group_class``. Importing it here (instead of from within the +# ``groups`` package) keeps the feature decoupled: the Core controller package +# contains no code that depends on it, only this single bootstrap import. It +# runs after the package scan so its routes join the same registry. +importlib.import_module('langbot.pkg.operation_trace.routes') + class BoundedJSONRequest(quart.Request): """Parse bounded HTTP JSON bodies outside the shared event loop.""" diff --git a/src/langbot/pkg/persistence/alembic/versions/0032_operation_traceability.py b/src/langbot/pkg/persistence/alembic/versions/0033_operation_traceability.py similarity index 97% rename from src/langbot/pkg/persistence/alembic/versions/0032_operation_traceability.py rename to src/langbot/pkg/persistence/alembic/versions/0033_operation_traceability.py index f2e3a9c2d..45394ea4d 100644 --- a/src/langbot/pkg/persistence/alembic/versions/0032_operation_traceability.py +++ b/src/langbot/pkg/persistence/alembic/versions/0033_operation_traceability.py @@ -1,7 +1,7 @@ """add workspace operation traceability table -Revision ID: 0032_operation_traceability -Revises: 0031_merge_totp_assistant +Revision ID: 0033_operation_traceability +Revises: 0032_cert_artifact_digest Create Date: 2026-09-25 The table is append-only and tenant-owned. Fresh installs already receive it @@ -22,8 +22,8 @@ import sqlalchemy as sa from alembic import op -revision = '0032_operation_traceability' -down_revision = '0031_merge_totp_assistant' +revision = '0033_operation_traceability' +down_revision = '0032_cert_artifact_digest' branch_labels = None depends_on = None