mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-24 09:25:21 +08:00
refactor(operation-trace): isolate subsystem, fix install identity, merge migrations
- Move the operation-traceability service and its HTTP routes into a standalone pkg/operation_trace package; the Core controller package no longer depends on it (routes stay auto-discovered by the controller package scan). - Gate the hot path on one module-level boolean exposed as ap.operation_trace_active: while no Workspace has tracing enabled the route wrapper performs zero trace work and zero database round trips. The gate opens when a Workspace enables tracing and is primed once at startup for already-enabled Workspaces. - Record the installed extension identity for GitHub / marketplace / local / upload installs (owner/repo, author/name, filename) so the trace no longer shows a nameless "a plugin was installed" event and the card names the extension. - Merge migrations 0032 + 0033 into a single 0032_operation_traceability revision carrying the full table shape and an index set that matches the ORM. Tests: unit 5165 passed / integration 358 passed; ruff check + format clean.
This commit is contained in:
@@ -3,7 +3,7 @@ import quart
|
||||
from langbot.pkg.provider.modelmgr import errors as provider_errors
|
||||
from ....authz import Permission, has_permission
|
||||
from ....context import RequestContext
|
||||
from ....service import settings as settings_service
|
||||
from ......operation_trace import service as settings_service
|
||||
from ... import group
|
||||
from .query import resolve_include_secret
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import quart
|
||||
|
||||
from ....authz import Permission, has_permission
|
||||
from ....context import RequestContext
|
||||
from ....service import settings as settings_service
|
||||
from ......operation_trace import service as settings_service
|
||||
from ... import group
|
||||
from .query import resolve_include_secret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user