fix(operation-trace): satisfy ruff/codeql and drop a dead summary channel

- Remove the unused request_summary local: the stored summary is derived by the
  service from changes + the classified action, so handlers publishing
  quart.g.operation_log_summary was a dead channel that never reached the row.
- Drop the unused datetime import in the operation log model.
- Apply ruff format to the touched files so `ruff format --check` passes.
This commit is contained in:
TyperBody
2026-09-26 03:51:36 +08:00
parent 475420956c
commit becb6c78b4
6 changed files with 51 additions and 37 deletions
+2 -1
View File
@@ -413,12 +413,13 @@ class RouterGroup(abc.ABC):
# static route declaration cannot describe the runtime diff, e.g.
# the previous and the new role of a member. ``quart.g`` is
# request-local, so concurrent requests never share these values.
# The stored summary is derived by the service from ``changes`` and
# the classified action, so handlers only publish the diff itself.
changes = resolved_meta.get('changes')
detail = resolved_meta.get('detail')
request_changes = getattr(quart.g, 'operation_log_changes', None)
request_detail = getattr(quart.g, 'operation_log_detail', None)
request_resource_id = getattr(quart.g, 'operation_log_resource_id', None)
request_summary = getattr(quart.g, 'operation_log_summary', None)
if request_changes:
changes = request_changes
if request_detail: