chore(operation-trace): rebase migration onto master head, drop unused import

The pull request merge produced two Alembic heads: this branch's
0032_operation_traceability and master's 0032_cert_artifact_digest both
descended from 0031_merge_totp_assistant, so the integration and migration
jobs failed with "Multiple head revisions". Renumber the traceability
migration to 0033 and point it at master's head (0032_cert_artifact_digest),
restoring a single linear head.

Also replace the noqa'd unused import of the traceability routes with an
importlib bootstrap (addresses the CodeQL unused-import finding) and merge
origin/master to pick up the certification digest backfill.
This commit is contained in:
TyperBody
2026-09-27 02:50:28 +08:00
parent 7eac330f33
commit 1488dd3924
2 changed files with 12 additions and 10 deletions
+8 -6
View File
@@ -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."""
@@ -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